Agent Orchestration · 7 min read
Agent orchestration patterns: supervisor, pipeline, router, handoff and swarm
Five common ways to wire multiple AI agents together, when each one fits, and the specific ways each one breaks. Plus the question to ask first: do you need more than one agent at all?
Once one agent works, the next idea is usually more agents. Splitting the work can help. It can also turn one debuggable program into a small distributed system that fails in confusing ways.
This post covers five common patterns — supervisor, pipeline, router, handoff and swarm — when to use each, and how each breaks.
First: do you need more than one agent?
Microsoft’s architecture guide on agent orchestration opens with a ladder of complexity, and it’s the right place to start:
- A direct model call: one well-written prompt, no tools. Enough for classification, summarisation, translation.
- A single agent with tools: one agent that loops through model calls and tool calls. The guide calls this “often the right default”.
- Multi-agent orchestration: several specialised agents coordinating.
Use the lowest level that reliably works: each step up adds coordination overhead, latency and cost. The guide’s good reasons to go multi-agent are prompts grown too complex, too many tools for one agent, or security boundaries that need separate access.
Cost is the other reason to pause. Anthropic reported that agents used about 4× the tokens of a chat, and its multi-agent research system about 15×. That system beat a single agent by 90.2% on Anthropic’s internal research evaluation — but research splits naturally into parallel searches. Anthropic names poor fits: tasks where every agent needs the same context, tasks with many inter-agent dependencies, and most coding tasks.
The five patterns at a glance
| Pattern | Who decides what runs next | Good fit | Typical failure |
|---|---|---|---|
| Pipeline | Your code, fixed order | Staged work: extract → transform → check | Errors flow downstream unchecked |
| Router | A classifier, once, at the start | Clearly separable request types | Misrouting with no way back |
| Supervisor | A central agent, every step | Tasks that split into sub-tasks | Bottleneck; “translation” loss |
| Handoff | The current agent | Specialists needed one at a time, order unknown | Ping-pong between agents |
| Swarm | Any agent, to any other | Open conversations across many domains | Hard to trace, hard to stop |
Pipeline
A pipeline chains agents in a fixed order; each one works on the previous one’s output. Microsoft also calls it sequential orchestration or prompt chaining. The key property is that your code, not a model, decides what runs next.
Use it when the work has clear stages that depend on each other: draft → review → polish, or parse → enrich → validate.
Avoid it when stages could run in parallel or the work needs backtracking.
How it fails: a weak early stage poisons everything after it. The fix is cheap: validate each stage’s output (a schema check, a rule or a small judge model) and stop the run rather than pass bad input on.
Router
A router classifies the request once and sends it to one specialist. Microsoft’s guide points out that if the right agent is obvious from the first message, you don’t need agents negotiating handoffs — a simple dispatcher that classifies and forwards is enough.
The classifier can be a small, cheap model, since it only has to pick a label from a fixed list.
How it fails: a wrong route sends the whole conversation down the wrong path with no way back. Add a fallback route, log each decision, and let specialists say “this isn’t mine” so the request can be re-routed.
Supervisor
A supervisor (also called orchestrator–worker) is a central agent that plans, delegates sub-tasks to workers, collects their results and decides what to do next. Workers report back to the supervisor; only the supervisor talks to the user.
Anthropic’s research system is this pattern: a lead agent plans, starts subagents that search in parallel, then combines what they find. Their write-up is unusually honest about early failures — the lead spawned 50 subagents for simple queries, subagents searched endlessly for sources that didn’t exist, and agents distracted each other with too many updates. Two fixes stood out:
- Write proper delegation briefs. Each subagent needed an objective, an output format, guidance on tools and sources, and clear task boundaries. Vague briefs led to duplicated work.
- Scale effort to the task. Their guidance: simple fact-finding gets one agent and 3–10 tool calls; direct comparisons get 2–4 subagents; complex research may use more than 10.
A brief template along those lines:
Objective: <one sentence — what you must find or produce>
Scope: <what is in, what is explicitly out>
Tools/sources: <which to use, which to avoid>
Output: <exact format, max length>
Stop when: <condition, or a max of N tool calls>
How it fails: the supervisor becomes a bottleneck. In Anthropic’s system, the lead waited for each batch of subagents to finish, so one slow worker held everything up. There’s also “translation” loss: in LangChain’s benchmark, the supervisor did slightly worse than a swarm because it paraphrased workers’ answers before passing them on. LangChain reported a nearly 50% improvement for their supervisor after removing handoff messages from workers’ context and adding a forward_message tool, so the supervisor could pass a worker’s reply on unchanged.
Handoff
In a handoff, the active agent decides whether to handle the request itself or pass full control to a better-suited agent — think of a support triage agent passing a billing dispute to a billing agent. Only one agent works at a time.
Use it when you need specialists one at a time but can’t know the order from the first message. If the route is obvious up front, use a router.
How it fails: agents bounce a task back and forth, or a handoff drops context the next agent needed. Microsoft lists infinite handoff loops as a reason to avoid the pattern. Put a cap on handoffs per conversation, pass a short structured summary with each handoff rather than nothing (or everything), and make “hand to a human” an explicit destination.
Swarm
A swarm is handoff without a fixed shape: any agent can transfer to any other, and whichever agent is active talks to the user directly. In LangChain’s benchmark — a modified τ-bench retail task with up to six irrelevant “distractor” domains added — the swarm slightly beat the supervisor, while a single agent with every tool loaded dropped off sharply once two or more distractor domains were added. The single agent’s token use also climbed with each distractor domain; the swarm’s and supervisor’s stayed roughly flat.
That’s the real case for multiple agents: isolation. Each agent sees only its own tools and instructions, so irrelevant context doesn’t drag it down.
How it fails: with no central owner, it’s hard to see why a conversation ended up where it did, or to guarantee it ends. Swarms need tracing and hard limits more than any other pattern.
Two patterns that pair with these
Microsoft’s guide adds two more: concurrent (fan-out/fan-in), where agents work on the same input in parallel and results are merged by voting, scoring or a summarising model; and maker–checker, where one agent produces and another checks against clear acceptance criteria, with an iteration cap and a fallback such as escalating to a person. Real systems mix patterns — a router in front, a pipeline for intake, fan-out for analysis and a checker at the end is a normal design.
How multi-agent systems actually fail
A UC Berkeley-led study, Why Do Multi-Agent LLM Systems Fail?, annotated 1,642 execution traces from seven open-source multi-agent frameworks and grouped failures into 14 modes under three headings:
- System design issues: agents ignoring their task or role, repeating steps, losing conversation history, or not knowing when to stop.
- Inter-agent misalignment: conversations resetting, agents not asking for clarification, withholding information, ignoring each other’s input, or saying one thing and doing another.
- Task verification: stopping too early, or checking results incompletely or incorrectly.
Most are orchestration problems, not model problems. Targeted fixes helped but didn’t solve everything: in one framework, clearer role specifications raised task success by 9.4%, and adding a high-level check of the final result against the task objective raised it by 15.6%.
Trade-offs to keep in mind
- Tokens: every agent re-reads instructions and context. Microsoft recommends smaller models for simple agents (classification, extraction, formatting) and tracking tokens per agent.
- Latency: every hop adds at least one model call, which users of real-time products like voice will feel.
- Context: decide what each agent receives — the full history, a summary, or just a fresh instruction. Less is usually better.
- Reliability: treat agents like services — timeouts, retries, validation between steps, and checkpoints so long runs can resume.
- Security: least privilege per agent, and guardrails at every hop.
Where to start
- Start with one agent and good tools. Move to multiple agents only when you can name the problem: too many tools, conflicting instructions, a security boundary, or genuinely parallel work.
- Prefer code-decided flows (pipeline, router) over model-decided ones (handoff, swarm) when the path is predictable. They’re cheaper and far easier to debug.
- Write delegation briefs, not one-line instructions, and pass summaries, not transcripts.
- Set hard limits: max agents, max handoffs, max iterations — and a defined fallback when one is hit.
- Trace every hop from day one, and add a final check against the original task before anything reaches the user.
A later post covers the other half: evaluating multi-agent systems with tracing, per-agent checks and end-to-end tests.