1.3 — Agent Patterns and Frameworks

CCDV-F Domain 1 · Task 1.3

What You Need to Know

The Five Workflow Patterns

Pattern Mechanism
Prompt chaining Fixed sequence; each call works on the previous output; optional programmatic gates
Routing Classify input and send to specialised follow-up (different prompt, tool set or model per category)
Parallelization Sectioning (independent subtasks side by side) or voting (same task several times for diverse answers)
Orchestrator-workers Central model breaks the task down at runtime and delegates; subtasks not known in advance
Evaluator-optimizer Generator + evaluator that scores against explicit criteria; critique loops back until pass

Telling the Patterns Apart

  • Chaining vs routing: fixed sequence vs classification decision
  • Sectioning vs orchestrator-workers: subtasks known in advance vs decided at runtime
  • Voting vs evaluator-optimizer: independent repeated attempts aggregated by code vs feedback loop with critique
  • Gate vs evaluator-optimizer: fixed pass/fail in a one-way sequence vs looped critique

Memory Is a Design Decision

An agent remembers nothing between sessions unless the design adds a mechanism. Anthropic’s memory tool (memory_20250818) gives create/read/update/delete over files in /memories. Your application executes each operation client-side. Safeguards live in your handler (reject path traversal, track file sizes, cap view returns).

Context as a Constraint

Context rot: recall degrades as token counts grow. Documented moves: compaction, structured note-taking, sub-agent architectures. Compaction summarises and starts a new window with the summary (Agent SDK does this automatically).

Framework Identities

  • LangGraph — low-level orchestration; model control flow as a graph; durable executions; human-in-the-loop
  • Pydantic AI — typed Python agent SDK; validated output types
  • Strands Agents — model-driven loop; minimal orchestration code; from Amazon production systems

Key Concept: The requirement profile justifies a pattern, never sophistication. Plain code beats a framework for a fixed pipeline.

Exam Traps

  • Choosing sectioning when the model must discover subtasks at runtime (or vice versa)
  • Assuming an agent keeps yesterday’s decisions between sessions by default
  • Recommending LangGraph for typed output validation, or Pydantic AI for graph-shaped control flow
  • Choosing voting when the requirement is a critique fed back into the next draft

Check your understanding

Practice Scenario

A subtitling team automates broadcast subtitle files, and every file must meet a published style code. They want one model call to draft and a second to grade the draft against the style code, feeding the critique back until the draft passes or three rounds have elapsed. Which workflow pattern is this?

Report issue

Log in to save your progress.

You've finished the free part of CCDV-F

The lessons stay free. Pro unlocks the other 24 CCDV-F practice scenarios and the 53-question timed mock exam, plus everything for every other exam.

See plans

Cancel anytime. Or €199 a year, which saves 17%.

Not sure yet? Try 10 free mock exam questions.