Skip to content

Six effective-agent patterns

Phase 3 continues. Lesson 8 built the substrate: a 30-line loop, the stop_reason dispatch, tool_choice steering, and the four loop disciplines. This lesson is the catalog of canonical shapes the substrate takes for common jobs. The single capability this lesson builds: pick the right pattern for a given task, recognize each pattern in the wild, and sketch its minimal implementation on the loop substrate from lesson 8.

The framework is the Anthropic engineering post Building Effective AI Agents by Erik Schluntz and Barry Zhang (2024-12-19), which names five workflow patterns and one agent pattern. That is the “six effective-agent patterns” Phase 0 names. You will know each pattern’s verbatim Anthropic definition (prompt chaining: decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one; routing: classifies an input and directs it to a specialized followup task; parallelization: LLMs can sometimes work simultaneously on a task and have their outputs aggregated programmatically, with sub-types sectioning and voting; orchestrator-workers: a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results; evaluator-optimizer: one LLM call generates a response while another provides evaluation and feedback in a loop; the autonomous agent: agents begin their work with either a command from, or interactive discussion with, the human user. Once the task is clear, agents plan and operate independently), each pattern’s when-to-use criterion and named examples, the key distinction between parallelization (subtasks pre-defined) and orchestrator-workers (subtasks determined dynamically by the orchestrator), the two success indicators for evaluator-optimizer (feedback measurably improves output and the LLM can give such feedback) and the three to four round cap, the three explicit warnings about the autonomous agent (higher costs and compounding errors; extensive testing in sandboxed environments with appropriate guardrails; thoughtfully-designed toolsets and documentation), the four-question decision tree for picking the simplest fit, composition patterns for production (route into chains; orchestrate into per-worker chains; vote at the end), and the cross-pattern principle (the post’s summary thesis, verbatim): Success in the LLM space isn’t about building the most sophisticated system. It’s about building the right system for your needs.

Every substantive claim verifies against the Anthropic engineering post at anthropic.com/engineering/building-effective-agents.

This is lesson 9 of 12 of Track 22, the second lesson of Phase 3 (agent patterns). Lesson 8 built the loop substrate; this lesson catalogs the canonical shapes that substrate takes. Lesson 10 (next) adds Agent Skills (durable instructions each pattern can lean on) and Claude Code (a worked agent harness reading Skills). Lesson 11 covers Subagents and Claude Managed Agents, the primitives that patterns 4 (orchestrator-workers) and 6 (autonomous agent) use to spawn focused inner loops inside outer ones. Lesson 12 closes the track by shipping any of these patterns to production.

The cross-track companion is Track 20 (AI Agents and Tool Use) for the deeper engineering discipline of running multi-pattern systems (especially pattern 6) in production over time.

Prerequisites: lessons 1-8 of this track. Lesson 8 is load-bearing: the 30-line agent loop is the substrate every pattern in this lesson sits on top of. Lesson 3 is also worth keeping in mind: pattern 2 (routing) is the cleanest place to apply the effort-and-model dial deliberately (easy queries to a smaller model). Lesson 7 (cost-and-staleness levers) becomes load-bearing for patterns 4 and 6 specifically (cache shared prefix; opt in to compaction; enable tool result clearing).

Soft recommended: an Anthropic Console account at https://platform.claude.com/ and an API key (lesson 1). The try-it-yourself in this lesson is reasoning, not coding (walk the decision tree on three real tasks); the lesson 8 try-it-yourself is the coding companion for those who want to implement the patterns end-to-end.

None. This lesson is taxonomic and structural: per-pattern definitions, when-to-use criteria, named examples, and a four-question decision tree. The math (per-model token costs, max_iterations discipline, cost-vs-staleness arithmetic) lives in lessons 3, 7, and 8 and stacks underneath whichever patterns you adopt.

The single capability this lesson builds: pick the right pattern for a given task, recognize each pattern in the wild, and sketch its minimal implementation on the loop substrate from lesson 8 (per the Phase 0 lesson 9 capability mapping). Concretely, you will be able to:

  • State the six effective-agent patterns (prompt chaining, routing, parallelization with sectioning and voting sub-types, orchestrator-workers, evaluator-optimizer, autonomous agent) with the verbatim Anthropic definitions and the workflow vs agent classification
  • State each pattern’s when-to-use criterion and at least one named example from the post (translation chains, customer-service routing, content-moderation sectioning, vulnerability-review voting, multi-file code change orchestration, literary translation evaluator, SWE-bench autonomous agent)
  • Distinguish parallelization from orchestrator-workers (parallelization predefines subtasks at code-write time; orchestrator-workers picks them at runtime based on the specific input)
  • Verify the two success indicators for evaluator-optimizer (feedback measurably improves output AND the LLM can provide such feedback) and apply the three to four round cap to prevent oscillation
  • Walk the four-question decision tree to pick the simplest pattern that fits a given task, and compose 2 to 3 patterns when production needs it (route into chains, orchestrate into per-worker chains, vote at the end)
  • Read time: about 16 minutes
  • Practice time: about 15 minutes (the try-it-yourself walks the decision tree on three real tasks and writes a one-sentence justification per pick, plus flashcards for retrieval)
  • Difficulty: standard. The taxonomy is small (six patterns) and the verbatim definitions are short; the discipline is matching pattern to task without reaching for pattern 6 by default. The hardest skill is recognizing the orchestrator-workers vs parallelization distinction (subtasks predefined vs subtasks chosen at runtime); the easiest is recognizing the routing opportunity (distinct input categories appear in most production stacks).