Catalog / Orchestration
Orchestrator–workers
A lead agent decomposes the task, delegates subtasks to specialised workers running in parallel, and synthesises their results.
Reference task used across all patterns: "My order arrived damaged. Can I get a refund?"
Topology
Run
07 steps
Ready to run
Play runs the whole scenario. Step advances one event at a time so you can read what happens.
Metrics
| Wall-clock time | 0.0 s |
|---|---|
| Tokens processed | 0 |
| Estimated cost | $0.000 |
| Orchestrator context | 0% |
All steps
Normal run
- Request arrives. A single agent owns the task end to end. At this point its context holds only the customer's message.
- Plan. The orchestrator decomposes the request into three independent subtasks. Planning is where the large model earns its cost.
- Dispatch in parallel. Each subtask goes to a worker with its own clean context. The three workers start at the same moment.
- Workers execute. Workers call tools and read documents in isolation. None of that material enters the orchestrator's context.
- Condensed results return. Each worker returns one structured fact instead of its full transcript.
- Synthesise. The orchestrator combines three short facts into a single decision.
- Respond. Refund approved. Wall-clock time is bounded by the slowest worker, not the sum of all three.
Outcome: correct answer. The large model only planned and decided. Heavy reading ran in parallel, in isolated contexts, and came back as compact facts.
Failure mode
- Request arrives. Identical start to the normal run.
- Plan. The orchestrator produces the same three subtasks.
- Dispatch in parallel. Workers start in parallel, as before.
- Workers execute. Nothing has gone wrong yet.
- Raw transcripts return. Workers return everything they saw: raw tool output, logs and the full policy document.
- Context saturates. The orchestrator's window is nearly full. The order number sits mid-log and is lost in the middle of the context.
- Incorrect response. The order was found, yet the orchestrator asks the customer for it again. Roughly twenty times the cost for a worse answer.
Failure: orchestrator context overload. The lead agent is a single point of failure and its context is the scarcest resource in the system. Mitigation: workers return short, structured results, never raw transcripts.
Execution trace
Reference
- Problem
- The task exceeds one context window, and the subtasks cannot be listed before work begins.
- Analogy
- A head chef reads the ticket, calls tasks to the line cooks and plates the dish. The chef does not chop onions.
- Use when
- Subtasks are independent and parallelisable: research, changes spanning many files, checking one case against several sources.
- Avoid when
- Steps are tightly sequential, or a better prompt on a single agent would suffice. Budget for several times the tokens of one agent.
- Typical failure
- Context overload in the lead agent; the orchestrator as a single point of failure.
- Also known as
- Orchestrator-workers (Anthropic)Supervisor (LangGraph)Coordinator (Google)Magentic manager (Microsoft, related)
- Related patterns
- Handoff (alternative)
Space play or pause → next step ← previous step R reset F failure mode