Lesson 08.02 · Phase 08 · Multi-Agent Systems

Orchestrator–worker

One agent plans, several agents work in parallel, one agent writes the answer. It's the most useful multi-agent pattern, and the easiest to overuse.

Learning objectives

  • Implement the orchestrator–worker pattern in three phases: plan (fan-out), parallel work, and synthesis (fan-in).
  • Make the orchestrator's plan machine-checkable: JSON, validated, with one repair attempt and a safe fallback.
  • Isolate worker failures so one crash or timeout degrades the answer instead of killing the run.
  • Measure the cost of coordination in model calls and tokens, and decide when it's worth paying.

A single agent with a long task does everything in sequence, in one ever-growing context window. Ask it to research two frameworks, compare them, and list the risks, and you get three jobs in one transcript. The early research crowds out room for the analysis, and nothing runs in parallel.

Loading the full lesson…