Orchestrator–worker pattern
One model looks at the task, decides what pieces are needed, farms them out to workers, and merges what comes back.
In the orchestrator-worker pattern, one model coordinates. It reads the task, decides what pieces are needed, sends each to a worker (another model call or AI agent), and combines the results.
What separates it from a fixed pipeline is that the pieces are not known in advance: one request needs edits in 2 files, another in 20, and the orchestrator is the one deciding.
A general contractor who walks the house, decides which trades are needed, books them in parallel, and signs off the combined work.
Briefs get written as if the workers were in the room with you. Each one starts blank, so 'look into the auth stuff' produces overlapping, off-target and confidently duplicated work.
Anthropic's "Building effective agents" (Dec 2024) lists orchestrator-workers between parallelization and evaluator-optimizer: like sectioning, except the sub-tasks are decided by the model at run time. The orchestrator does dynamic decomposition (Planning), writes a brief per worker (objective, scope, tools, output format, what not to do), dispatches workers in parallel, and synthesises: merge, de-duplicate, resolve conflicts, optionally verify.
Design levers: briefs must be self-contained because workers don't share the orchestrator's history; outputs should be structured and short so the orchestrator's context stays small; fan-out should scale with task complexity (Anthropic's research agent used 1 agent for fact-finding, 2–4 for comparisons, 10+ for broad research); and caps on fan-out and recursion depth are mandatory. Workers that write must partition the work (one service, one file set each) or conflicts land in the merge step.
Brief template with objective, inputs, tools, output schema, boundaries and effort budget; workers return ≤500-token structured results; fan-out cap 10, recursion depth 1; workers read-only unless each owns a disjoint write scope; synthesis step checks for conflicting facts.
Financial-filings task: "Compare revenue recognition policies across our 6 largest customers' latest 10-Ks." The orchestrator finds 6 filings, spawns 6 workers, each briefed: "Read Note 2 of this filing; return policy summary ≤150 words, changes vs prior year, page cites; do not compare across companies." It merges 6 JSON results into one table and flags 2 customers that changed policy. 7 model contexts, ≈ 2.5 min, ≈ $1.80.
Recommend it when the sub-tasks depend on the input and can run independently, and contrast it with sectioning, where you already know the parts. Then put the emphasis where it belongs: 'the orchestrator's real job is writing briefs a stranger could execute.'
Expect 'two workers come back with conflicting facts' — the synthesis step has to notice the conflict, cite both sources, and either verify or surface it rather than quietly pick one.
Numbers worth knowing
- Effort scaling used by Anthropic's research agent
- 1 / 2–4 / 10+ sub-agentsfact-finding / comparison / complex research, June 2025
- Tool calls per sub-agent
- 10–15comparison tasks in the same write-up
How to decide
| When | Do this |
|---|---|
| Sub-tasks are known before the run | Use plain parallel sectioning; no orchestrator call needed. |
| Sub-tasks depend on the input and are independent | Orchestrator-workers with structured briefs. |
| Workers would edit overlapping files or records | Partition write scope per worker, or keep writes in one agent. |
Cost maths
Cost = orchestrator (plan + synthesis) + Σ workers. Filings example at $3 / $15 per M (illustrative, Oct 2026): plan 8k in / 1k out = $0.04; 6 workers × 80k in / 1.5k out = $1.58; synthesis 12k in / 2k out = $0.07. ≈ $1.70. Worker outputs capped at ~500 tokens keep synthesis input at 12k instead of ~500k if transcripts were forwarded.
Operating it
- Workers' outputs overlap >20%
- Synthesis input exceeds ~30k tokens (compress worker outputs harder)
- Fan-out hits the cap on >10% of runs
- Fan-out per run vs task class (alert if simple tasks exceed 2 workers)
- Conflicting-fact rate in synthesis (alert > 5%)
- Merged-result pass rate on full checks vs per-worker pass rate (alert on any gap > 5 points)
When it goes wrong
A code-change orchestrator produced a PR that failed to compile despite every worker reporting success.
CI on the merged diff; each worker's own tests had passed in isolation.
Two workers both modified a shared logger.ts with incompatible signatures; briefs didn't assign file ownership.
Orchestrator now assigns disjoint file sets per worker and routes shared files to one worker; synthesis runs the full build before reporting success.
Related terms
Where it shows up
Sources
- Building effective agents — Anthropic (Schluntz & Zhang), 2024blog
- How we built our multi-agent research system — Anthropic, 2025blog
Check yourself
Three questions. Every option is explained once you answer.