SproutStackSproutStack home

Multi-Agent Orchestration

5 min readBeginner-friendlyFree to read

Read a little, play a little. No scary maths, and no rush.

Share:

One agent, then more, only when earned

A single agent with good tools and a tight loop handles most tasks. Multi-agent earns its complexity when sub-tasks need genuinely different context or tools — a researcher agent browsing docs, a coder agent writing patches, a reviewer agent checking the diff — and cramming all three roles into one prompt makes it sloppy at everything. If one well-scoped agent still works, stay there; coordination between agents is a new failure surface, not a free upgrade.

Three shapes that cover most cases

  • Orchestrator-worker: one agent plans and dispatches, workers execute narrow sub-tasks and report back. Easiest to debug — there's one place decisions get made.
  • Pipeline: fixed hand-off order (research → draft → fact-check → format). Predictable, but rigid — bad fit when the next step genuinely depends on what the last one found.
  • Peer debate/review: two agents critique each other's output before it ships. Catches more errors, costs roughly double the tokens — reserve it for high-stakes outputs.

The part that actually breaks: shared state

Chat history is not shared state. If Agent B needs to know what Agent A decided, write it down in a structured form — a task ledger, a scratchpad object, a database row — rather than trusting B to correctly infer it from a long transcript. Give each agent the narrowest context it needs, not the full history by default; narrower context means fewer ways for one agent's mistake to poison another's reasoning.

A worked example: a research report

Question: "How are mid-sized retailers using AI for inventory, and what goes wrong?"

  • The orchestrator splits it into three sub-questions (forecasting, automated reordering, reported failures) and writes them into a task ledger.
  • Three research workers run in parallel, each with a search tool. Each returns findings in a fixed structure: claim, source link, confidence.
  • A writer drafts the report from the structured findings only, not from the workers' raw transcripts.
  • A reviewer checks every claim against its source and sends unsupported claims back.

Running the research in parallel cuts wall-clock time, but total tokens roughly triple. The structured hand-offs are what keep it debuggable: when a claim is wrong, the ledger shows which worker produced it and from which source.

Failure modes that only appear with many agents

  • Ping-pong: two agents keep asking each other for clarification and never finish.
  • Duplicated work: two workers research the same thing because neither knew the other had it.
  • Contradictory decisions: agents act on different assumptions about the same fact.
  • Error amplification: one worker's mistake becomes the next agent's trusted input.

The fixes are the same each time: one owner for every decision, explicit structured hand-offs, and step and budget limits on the whole system, not just on each agent.

Measure before splitting

Before adopting a multi-agent design, run it against a single well-built agent on the same eval set and compare success rate, cost, and latency. Keep the extra agents only if they win clearly enough to pay for the complexity.

Remember this

  • Default to one agent; split only when roles and tools genuinely diverge.
  • Orchestrator-worker is the easiest shape to debug — start there.
  • Shared state belongs in an explicit structure, not implied by chat history.

Check your understanding

5 questions · first-try answers earn the most XP

1. When does splitting one agent into several genuinely earn its complexity?
2. Why is chat history not adequate as shared state between agents?
3. Which orchestration shape is easiest to debug, and why?
4. Why does the chapter say to give each agent the narrowest context it needs?
5. What does peer review between two agents cost, and when is it worth it?

My notes

Saved in this browser. Highlight a line above and save it, or write it in your own words.

Nothing saved yet. Your highlights will live here.

References

Finished reading?

Ticking it here also ticks the chapter in the sidebar, the section count and your streak — it is all one number.

Related chapters

Spotted a mistake or want a topic covered? Report an issue

📬 An occasional email when new lessons land

New lessons and showdowns, no more than a few times a month. No spam, unsubscribe anytime. We store your email only to send the newsletter.