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

ActorLead agentWorker

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 time0.0 s
Tokens processed0
Estimated cost$0.000
Orchestrator context
0%
Illustrative values. They show proportions between patterns, not benchmarks.

All steps

Normal run

  1. Request arrives. A single agent owns the task end to end. At this point its context holds only the customer's message.
  2. Plan. The orchestrator decomposes the request into three independent subtasks. Planning is where the large model earns its cost.
  3. Dispatch in parallel. Each subtask goes to a worker with its own clean context. The three workers start at the same moment.
  4. Workers execute. Workers call tools and read documents in isolation. None of that material enters the orchestrator's context.
  5. Condensed results return. Each worker returns one structured fact instead of its full transcript.
  6. Synthesise. The orchestrator combines three short facts into a single decision.
  7. 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

  1. Request arrives. Identical start to the normal run.
  2. Plan. The orchestrator produces the same three subtasks.
  3. Dispatch in parallel. Workers start in parallel, as before.
  4. Workers execute. Nothing has gone wrong yet.
  5. Raw transcripts return. Workers return everything they saw: raw tool output, logs and the full policy document.
  6. Context saturates. The orchestrator's window is nearly full. The order number sits mid-log and is lost in the middle of the context.
  7. 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

Model workingSending a message

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

Space play or pause   next step   previous step  R reset   F failure mode