Handbooks  /  Multi-Agent Orchestration
Handbook~15 min readAgentsworked math + runnable code
The Multi-Agent Orchestration Handbook

More agents,
more problems.

A team of specialist agents sounds obviously better than one — a researcher, a coder, a critic, all working together. So teams reach for elaborate multi-agent architectures, and are surprised when the result is slower, pricier, and worse than a single good agent. The reason is a law you can't argue with: coordination cost grows quadratically with the number of agents, while the useful work only divides linearly. Beyond a point, every agent you add costs more to coordinate than it contributes. This handbook is where that curve turns, and how to stay on the right side of it.

01

The team fantasy

The appeal of multi-agent systems is intuitive: decompose a hard task, assign each part to a specialist agent, run them in parallel, combine the results. It mirrors how human teams tackle big problems, and it promises both parallelism (do things at once) and specialization (each agent focused on what it's good at). So a lot of ambitious AI systems are built as elaborate agent org-charts.

And often they underperform a single well-built agent. The failure isn't that the agents are bad — it's that coordinating them costs more than anyone budgeted. Agents have to share context, reconcile conflicting results, wait on each other, and recover when one goes off-track, and all of that is overhead that a single agent simply doesn't pay. The question isn't "would a team be nice?" but "does the parallel benefit exceed the coordination cost?" — and the coordination cost has a shape that makes the answer "no" more often than you'd think.

The one-sentence version

Coordination overhead grows quadratically with the number of agents while useful work divides only linearly, so past an optimal point more agents make the system slower — often a single agent wins.

02

Coordination isn't free

Here's the cost nobody prices in. When agents must coordinate, the work isn't just "N agents doing their bit" — it's the communication between them. Every pair of agents that needs to share context or reconcile a result is a coordination link, and the number of pairs in a group of N is N(N−1)/2 — it grows quadratically. Two agents: 1 link. Five agents: 10 links. Ten agents: 45 links. The overhead explodes far faster than the headcount.

Meanwhile the useful work only divides linearly: split a job across N agents and each does about 1/N of it. So you're trading a linear speedup against a quadratic overhead. For small N the speedup wins; as N grows, the quadratic term catches up and then overwhelms it. This is the same reason human teams hit diminishing returns — adding people adds meetings faster than it adds output. A single agent, by contrast, has zero coordination overhead, which is why it's such a strong baseline and so often the right default.

03

Where it turns

Put the two forces together and you get a U-shaped cost curve. Total cost falls at first as agents parallelize the work, hits a minimum at some optimal number, then rises as coordination overtakes the shrinking marginal speedup. There's a best N — and it's usually small.

The U-curve: adding agents helps, then hurts
N = 1All the work, zero coordination — the baseline.
Add agentsWork divides (−), coordination grows (+) — net win while parallelism dominates.
Optimal N*The minimum — where marginal speedup = marginal coordination cost.
Too manyCoordination dominates → slower, pricier, more error-prone.

Where the minimum sits depends on two things: how parallelizable the task is (more independent work → more agents pay off) and how expensive coordination is (cheaper coordination → more agents optimal). A tightly-coupled task where every step depends on the last has almost no parallelism, so its optimal N is 1 — a single agent. A task that fans out into many independent sub-tasks with light coordination can profitably use several. The math pins down exactly where.

04

The overhead math

Model total cost as parallelized work plus pairwise coordination. Work W divides across N agents; coordination costs c per pair, and there are N(N−1)/2 pairs:

cost(N)  =  W / N  +  c · N(N−1)/2

First term (work) shrinks like 1/N; second (coordination) grows like N². Their sum is a U-curve with a minimum.

Two consequences fall out. Adding agents past the minimum makes it worse — the quadratic term wins — and the optimal N depends on the ratio of work to coordination cost:

cheap coordination (small c)  ⟹  larger optimal N ;    pricey coordination  ⟹  smaller (often N=1)

Halve the coordination cost and more agents pay off; make it expensive and a single agent wins. The runnable version below computes the cost curve, shows more agents hurting past the optimum, and finds the best N.

RUN IT YOURSELF

Find the optimal team size

Multi-agent cost is a tug-of-war. Work divides linearly across N agents (the speedup), but coordination pairs grow as N(N−1)/2 (the overhead) — 1 pair at 2 agents, 45 at 10. Total cost is work/N plus coordination-cost times pairs, a U-curve: adding agents helps until coordination dominates, then more agents cost more, not less. A single agent has zero coordination overhead. And cheaper coordination shifts the optimal team size larger. Change the work, coordination cost, or agent count and find where the minimum sits.

CPython · WebAssembly
05

Patterns that scale

The way to beat the quadratic wall is to constrain who coordinates with whom. The best patterns route coordination through a hub or a line instead of a full mesh:

PatternHow coordination flows
Orchestrator-workersA coordinator splits the task, dispatches to workers, and synthesizes — coordination is hub-and-spoke (linear), not every-pair.
Sequential handoffA pipeline: each agent does its stage and passes to the next — coordination is a chain, not a mesh.
Specialist routingRoute each request to the single best-suited agent — no ongoing coordination at all.
Free-for-all meshEvery agent talks to every other — the quadratic trap; avoid at scale.

Orchestrator-workers is the workhorse: because the coordinator is the only hub, communication grows with the number of workers, not with the number of pairs, keeping overhead near-linear even as you add specialists. It also composes with everything else — each worker is itself a bounded agent loop, and the orchestrator applies the same agent patterns at the team level. The design lesson is blunt: don't build a democracy of agents that all confer; build a clear hierarchy or pipeline where coordination is deliberately limited, and add agents only where you can point to real parallel work.

06

Pitfalls

The cardinal error is reaching for multi-agent by default — building an agent team for a task a single agent handles fine, and paying the coordination tax for nothing. Start with one agent; add more only when you can name the specific parallelism that will pay for the coordination. A close cousin is the full-mesh design where every agent talks to every other: it hits the quadratic wall fastest, and it's usually a hierarchy or pipeline in disguise that just hasn't been structured yet.

Two more. Error compounding: each agent hand-off is a chance to lose context or propagate a mistake, so a longer chain of agents is a longer chain of failure points — more agents can mean lower reliability, not just higher cost. And context duplication: agents that each carry the full context multiply your token bill, so coordination overhead is a cost line too, not only a latency one. The through-line: multi-agent is a real tool for genuinely parallel, specialized work — but it is not a free upgrade. Respect the quadratic, keep the team small and the coordination structured, and default to one agent until the task demands more.

Worth knowing

"More agents" is not a capability upgrade — it's a coordination cost. Because overhead grows quadratically and each hand-off adds a failure point, a single well-built agent beats a sprawling team on most tasks. Add agents only for real, nameable parallelism, and route coordination through a hub or pipeline, never a full mesh.

Frequently asked

Quick answers

What is multi-agent orchestration?

Coordinating several LLM agents on one task — e.g. an orchestrator splitting work among specialist workers — for parallelism and specialization.

Why can more agents be worse?

Coordination overhead grows quadratically (N(N−1)/2 pairs) while work divides only linearly, so past a point adding agents costs more than it saves.

When to use multiple agents?

When the task has real, independent parallelism large enough that the speedup beats the coordination cost — otherwise prefer a single agent.

What patterns scale?

Orchestrator-workers (hub-and-spoke), sequential handoff (pipeline), and specialist routing — anything but a full every-pair mesh.

Finished this one? 0 / 99 Handbooks done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.