By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
When you're building a multi-agent system, you face a choice about how agents coordinate. Should one agent orchestrate the others? Should they hand off work like a relay? Should everything run in parallel? Most frameworks hide these decisions behind abstractions, but the underlying patterns are always the same six shapes. Recognizing them helps you understand what any system is actually doing, and which pattern fits your problem.
One coordinator agent receives a request and decides which specialist to call. Each specialist is treated as a tool—the coordinator invokes it, gets a result back, and continues. The coordinator owns the flow.
This works well when decisions are clear-cut: a user asks for something, the supervisor routes to the right expert, collects the answer. It's easy to reason about because control is centralized. The downside is that the supervisor becomes a bottleneck if it needs to make complex decisions or if specialists need to talk to each other.
Instead of a central coordinator, peers pass control to each other. Whoever holds the baton talks to the user. This pattern suits workflows with distinct stages that must happen in some order but don't fit a strict pipeline.
A support ticket flow is the classic example: triage the issue, then route to billing or technical support, and those teams might hand off back and forth. Each agent is autonomous; there's no single point of control. The trade-off is that you need to think carefully about when and why each agent hands off, and error handling becomes more complex.
A pipeline is a fixed sequence: output of one step feeds into the next. It's predictable, cheap to run, and straightforward to test. Use it when you know the order of operations won't change.
A graph (DAG) is a generalization: some steps run in parallel, others wait for dependencies. Use it when subtasks have overlapping structure but don't need to run one after another.
Graphs are more flexible than pipelines but also harder to debug. You need to track which steps are blocked and why.
A critic loop pairs a generator with a reviewer. The generator produces output; the reviewer checks it against criteria. If it fails, the generator tries again. This continues until the output passes or you hit a retry limit.
This pattern is useful for quality gates, but it's expensive because you're running agents multiple times. Set a reasonable retry limit or you'll burn tokens.
A hierarchy stacks supervisors: a top coordinator delegates to team leads, who each manage specialists. This scales to large systems, but each level adds latency and cost. Use it only when you actually need multiple layers.
Patterns nest: a supervisor's specialist can itself be a pipeline, and a pipeline step can be a swarm.
You rarely use one pattern in isolation. A supervisor might delegate to a pipeline. A pipeline step might be a swarm of agents handing off to each other. The key is recognizing the shape at each level so you can reason about latency, cost, and failure modes.
| Pattern | Control flow | Best when | Watch out for |
|---|---|---|---|
| Supervisor | Central, dynamic | Clear specialists, one point of control | Supervisor becomes a bottleneck and single point of failure |
| Handoff / swarm | Decentralised, dynamic | Conversations that change owner | Ping-pong loops between agents |
| Pipeline | Fixed | Steps known in advance | Rigid when inputs vary |
| Graph / DAG | Fixed structure, parallel | Independent subtasks, merge point | Merge step needs a clear schema |
| Critic loop | Iterative | Quality-critical output | Endless revision without a round cap |
| Hierarchy | Nested | Large systems | Latency and cost per level |
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.