Multi-agent systems — study guide

The concept's fragments, read in order.

For your capstone An agent that does a task you currently do by hand

The pipeline is already a multi-agent design of the plainest shape: sort, then draft, then check, in an order your code fixed in advance. Each boundary between those stages is an interface where information can drop, and with nobody watching, an error crosses it quietly.

The draft stage writes its reply to drafts/req-3017.json and hands the checker that path and a one-line summary, not its transcript. The checker never saw how the draft was written; it judges it against the written reply policy and an account lookup of its own. It may send the draft back twice, then the request goes to you. Every call from every stage is logged under req-3017.

More than one agent

An agent is a program that calls a model in a loop: it reads its transcript so far, picks a tool, reads the result, and carries on until the model gives a final answer or a stop condition ends the run. A multi-agent system runs several of those loops on one job. Each loop has its own transcript, its own instructions and its own tools, and something coordinates them: either ordinary code that calls them in a fixed order, or another agent that decides at runtime who works next.

The appeal is easy to state. A job too big for one context can be cut into pieces that each fit. A narrow piece of work can get narrow instructions and only the tools it needs. Independent pieces can run at the same time. And a second agent can check the first one's work. The costs are just as real and much less visible: every boundary between two agents is a place where information gets dropped, the system makes more model calls, and when the final answer is wrong there are more places it could have gone wrong.

So a multi-agent design is a tradeoff to argue for, not an upgrade to reach for. What follows is the case for splitting and the bill for it, the few common shapes a split takes, what a handoff between agents has to carry, where shared state lives and who may write it, and when one well-scoped agent is simply the better design. That last case comes up more often than the diagrams suggest.

Reasons to split the work

the same work in one context, or split across several one agent the task subtask A material subtask B material subtask C material every result, kept one context holds everything coordinator and workers coordinator holds the task, the plan, short results worker A brief + A material worker B brief + B material worker C brief + C material brief short result brief short result brief short result each worker's context holds only its own share
The same three-part task held two ways: one agent keeps the task and every subtask's material in a single growing context, while a coordinator hands each worker only a brief, each worker's context holds just its own subtask's material, and only short results travel back.

The first reason is a separate context for each piece. A single agent's transcript grows with every tool call, so by the time it reaches the third subtask it is still carrying everything it read for the first two. Split the job and each worker starts fresh, holding only its brief and the material for its own piece. The coordinating agent receives the worker's short result, not the dozens of tool calls that produced it, so its own context stays small too.

The second is specialization. A worker that only searches, or only writes tests, can get instructions written for that one job and only the tools that job needs. Narrow instructions are easier to get right, and a narrow tool set also limits what that worker can do when it is wrong.

The third is parallel work. Pieces that do not depend on each other can run at the same time, which shortens the elapsed time of the whole job. It does not shorten the total work: every worker still makes its own calls, so the job finishes sooner while costing more.

The fourth is independent review. A model asked to check and fix its own reasoning, with nothing new to go on, often fails to improve it and sometimes makes it worse. A reviewer that did not write the draft and never saw the author's transcript reads the result like an editor who did not write the draft: free of the author's assumptions, they notice what the author keeps reading past. It helps most when it checks against evidence the author did not produce, such as test results, tool output or written acceptance criteria, because a reviewer with the same blind spots can approve the same mistake.

What splitting costs

Every handoff loses information, in both directions. On the way out, the worker knows only what its brief says: the coordinator's reasoning, the user's earlier remarks, and the dead ends already tried all stay in a transcript the worker never sees. On the way back, the coordinator gets a summary, and summaries flatten detail. Specific file names become "the relevant files", exact line numbers become "the authentication module", and a summary of a summary loses more again.

The system also makes more calls. Every worker needs its own copy of the task description, its instructions and its tool definitions, so the same preamble is sent again on each branch, and then the coordinator pays once more to read and merge what comes back. One vendor's 2025 account of its own research system reported agents in its data using roughly four times the tokens of a chat exchange, and its multi-agent system roughly fifteen times; that is one system's self-reported figure, not a rule, but the direction is not in doubt.

Failures get harder to find. A wrong final answer could have started in any agent or in any handoff, and runs do not repeat exactly. The practical answer is to record every agent call and every handoff under one shared identifier for the task, including what each agent was given and what it returned, so you can walk backwards from the bad result to the first agent whose output stopped matching its input.

And mistakes travel. A wrong assumption made early is written into every later brief, and each agent downstream builds on it in good faith; cascading errors of this kind are a failure mode in their own right. One study of multi-agent failures sorted fourteen distinct failure modes into three groups, problems in how the system was specified, in how agents coordinated, and in how the work was checked, and found no single group dominating. Among the coordination failures: an agent pressing on with a wrong assumption instead of asking.

Three common shapes

three shapes, and who decides the next step in each supervisor and workers supervisor splits, then combines task result task result worker worker fixed pipeline stage 1: gather its output stage 2: draft its output stage 3: check producer and reviewer producer reviewer draft critique approves accepted next step decided by the supervisor agent next step decided by your code, in advance next step decided by the reviewer's verdict
Three common shapes for splitting work: a supervisor agent sends tasks to workers and combines their results, so an agent decides the next step; a fixed pipeline passes each stage's output to the next, so ordinary code decides the order; and a producer sends a draft to a reviewer who returns critique until it approves, so the reviewer's verdict decides when the loop ends.

In the first shape, a supervisor agent reads the task, splits it into pieces, sends each piece to a worker, and combines what comes back. It decides at runtime how many workers to use and what each one does, working like a general contractor who splits a building job into trades, hands each one a written scope, and then assembles and inspects the results without doing the trades itself. This suits jobs whose pieces differ from one run to the next. Its weak points are the supervisor itself, which every result has to pass through, and the split: a piece cut in the wrong place leaves a worker without context it needed.

In the second, a fixed pipeline, the stages run in an order your code decides in advance: gather, then draft, then check, each stage handed the previous stage's output. Nothing is choosing who goes next, so the system is predictable and comparatively easy to test and debug. The price is that the stages run one after another, so their delays add up, and a mistake in an early stage flows into every stage after it.

In the third, a producer drafts and a reviewer critiques the draft against stated criteria; the producer revises and the loop repeats until the reviewer approves. Each round costs more calls and more time, and without a round limit and clear acceptance criteria the loop can go on without the draft getting any better.

Tools and write-ups give these shapes many different names, and real systems mix them. The question that cuts through the vocabulary is who decides the next step: an agent, your code, or a verdict. A rough rule from practice: use a pipeline when the steps are known and stable, a supervisor when the needed pieces vary, and a reviewer when review can reliably find fixable defects.

What a handoff must carry

the receiver knows only what the handoff carries sender its whole transcript stays behind writes the handoff goal: what and why inputs it needs boundaries and tools output shape done when all it sees receiver starts with only the handoff; it never saw the sender's transcript returns: a compact result plus pointers to its evidence, not its transcript
A handoff is everything the receiving agent will know: the sender writes a message carrying the goal, the inputs it needs, its boundaries and tools, the output shape and what done means, while the sender's own transcript stays behind; the receiver sends back a compact result with pointers to its evidence rather than its whole transcript.

A worker agent starts with an empty transcript and the handoff. Whatever the sender knows but did not write down does not exist for the receiver: the worker cannot scroll back through a conversation it was never part of. It is like a shift handover, where the person coming on knows only what the person going off wrote down or said, and anything left out is simply not known on the next shift. In a common setup the delegation message is the only content passed from the coordinator to the worker, so that message has to work as a contract, not a topic line.

Five things belong in it. The goal: the outcome wanted and what it will be used for. The inputs: the facts, decisions already made, and paths or references to the material the worker will need. The boundaries: what is in scope, what is out, which tools it may use, what it may change, and when to stop and report back instead of carrying on. The output shape: the structure, level of detail, and evidence the result must include, ideally a structured format the coordinator can check and merge without reinterpreting. And what done means, so the worker knows when it has finished.

A vague brief fails in predictable ways. The worker guesses the scope, guesses wrong, and does duplicate work or leaves gaps. One write-up describes a one-line instruction to research a supply shortage that sent different workers to different time periods while others repeated the same searches. Specific beats short: a brief can be brief, as long as it carries what the receiver needs to act alone.

The return trip deserves the same care. A good result is compact and self-contained, with pointers to its evidence, such as the files it wrote and the sources it read, rather than the worker's whole transcript. The next reader cannot ask what the worker was thinking, so the result has to stand on its own, and it is worth checking against its expected shape before anything downstream relies on it.

Where shared state lives

shared state: one writer per region, anyone may read coordinator worker A worker B shared store, outside every agent plan and task list output A output B sole writer sole writer sole writer any agent including workers reads any region writing another's region: refused the store outlives the agents; their contexts do not
Shared state lives in a store outside every agent, divided into regions that each have exactly one writer: the coordinator writes the plan and task list, worker A writes its own output, worker B writes its own output; any agent may read any region, but a write into a region it does not own is refused.

Some things more than one agent needs: the plan, the list of tasks and their status, decisions already made, and the artifacts the work produces. None of that can live inside an agent's context. A context is working memory that disappears when the loop ends, the same disappearing ink as a container's writable layer. Shared state belongs in a store that outlives every agent, such as files on disk, a database, or an object bucket, which is the ephemeral-state rule applied to agents: keep the durable state out of the disposable compute.

Pass references, not copies. A worker writes its output to the store and hands back a path or an id with a short summary; the coordinator reads only what it needs. That keeps every context lean, saves the cost of pushing large outputs through each transcript, and avoids the game of telephone where an artifact is paraphrased at each hop until the copies disagree.

Then decide who may write what, and give each piece of state one writer. The coordinator owns the plan and the task list; each worker owns its own output; anyone may read any of it. Think of each region like a shared ledger that anyone may read but only its one named keeper may change, so two people never write over each other's entries, and enforce it with permissions on the store where you can rather than relying on each agent's instructions. When two agents write the same field, the second write can silently replace the first, and some agent frameworks simply keep whatever was written last unless you define a merge rule. If several agents must add to one place, make it append-only and merged by a rule you define, or have each return a separate result for the coordinator to combine.

A shared store is also a shared risk. Whatever one agent writes there, every other agent will read, so a wrong entry, or text planted by someone outside, can spread through the whole system and survive restarts. Treat what is in the store as data to check, not as instructions to follow.

When one agent is better

The honest default is one agent. A well-scoped single agent, with good tools and a clear stop condition, keeps all of the context in one transcript, loses nothing at handoffs, and gives you one place to look when it goes wrong. The published comparisons back this caution. A controlled study (2025, revised 2026) that held prompts, tools and compute constant across six benchmarks found that splitting helped on a financial-analysis benchmark whose work divides into independent streams, hurt in every arrangement tested on a short sequential planning task, and gave losses in every arrangement, mostly small, on a coding benchmark; results on the other three benchmarks were mixed. The stronger the single agent, the less adding more agents helped.

The pattern is about coupling. Splitting pays when pieces are independent: many separate searches, many documents to read, findings that can be gathered separately and merged. It hurts when the pieces share many small decisions, because those decisions are exactly what a handoff drops. Writing code is the usual example, since each part depends on choices made in the others; one published account of a research system that gained from parallel workers noted that coding offers fewer pieces that can truly proceed independently. Short tasks that fit comfortably in one context get little from a split besides the overhead.

Often the better design is not an agent at all. If you know the steps in advance, ordinary code that calls a model at each fixed step is cheaper, more predictable and easier to test than a set of agents deciding the steps for themselves.

So split for a reason you can name and measure: a context that genuinely does not fit, independent pieces whose parallel speed you need, or a reviewer that can check against evidence of its own. Compare the result against a well-prompted single agent given a similar budget, because otherwise an apparent gain may just be the extra computation. And when you do split, cut where the least has to cross the boundary.

Splitting on purpose

Multi-agent designs are tempting because they draw like an org chart: a manager, some specialists, a reviewer, arrows between them. The trouble is that the arrows are where the work gets lost. That matters most when agents run with no person watching, whether that is a pipeline doing a job you used to do by hand or a reviewer working alongside the process that ships your app. There, an error that crosses a boundary does so quietly, and nobody is reading the transcripts as they scroll past.

So treat every boundary you draw as an interface to design and test. Decide what the handoff carries and what comes back. Decide where shared state lives, outside every agent, and who may write each piece of it. Make sure a bad final answer can be traced back across each boundary to where it started. And keep asking whether one agent, or plain code calling a model at fixed steps, would do the job with fewer places to break.

Running several agents reliably raises a further set of questions: what happens when one crashes halfway through, how work waits its turn, and how a retried step avoids doing the same work twice. Those belong to where agents run, which builds on this concept. The design question comes first, and it is the one this concept answers: split only where the split earns its cost.

Next on your path to An agent that does a task you currently do by hand: