Multi-Agent Systems/Lesson 2 of 5

Orchestration Patterns

Supervisors, hierarchies, pipelines, and swarms

Advanced 15 minBuilder
What you'll be able to do
  • Name and explain the five canonical multi-agent orchestration patterns and how control flows in each
  • Identify the failure mode and latency/accuracy trade-off that comes with each pattern
  • Read and sketch a supervisor, a pipeline, and a swarm in current frameworks (LangGraph, OpenAI Agents SDK, Google ADK)
  • Choose the right pattern for a problem — and compose patterns into hybrids when one isn't enough
  • Apply Anthropic's effort-scaling and task-description discipline to avoid duplicated or dropped work
At a glance

Once you have more than one agent, the hard part isn't the agents — it's how they coordinate. This lesson catalogs the five canonical orchestration topologies (supervisor, hierarchical, pipeline, swarm, blackboard), shows what each looks like in code, names their failure modes, and gives you a decision rule for picking — and composing — them.

  1. 1Five shapes for a team of agents
  2. 2Supervisor / orchestrator-worker
  3. 3Hierarchical teams
  4. 4Sequential pipelines
  5. 5Network / swarm / handoff
  6. 6Blackboard / shared-state
  7. 7Choosing — and composing — a pattern

Five shapes for a team of agents

Here is the simplest way to think about it: a multi-agent system is just a group of agents plus a rule for who goes next and how they share what they know. That rule — the topology — is the whole game. Get it right and specialization pays off; get it wrong and you get loops, dropped work, and a bill three times bigger than a single agent. The agents themselves are the easy part; the wiring between them is where systems succeed or fail.

As of 2026 the field has converged on five canonical topologies:

  1. Supervisor / orchestrator-worker — one boss delegates to workers and synthesizes results.
  2. Hierarchical teams — supervisors of supervisors; nested delegation for large systems.
  3. Sequential pipeline — an assembly line; each stage feeds the next, no boss.
  4. Network / swarm / handoff — peers pass control directly to one another.
  5. Blackboard / shared-state — agents read and write a common workspace instead of talking directly.

The most important thing to internalize early: these are composable building blocks, not a forced choice. Real production systems are almost always hybrids — a supervisor at the top routing into pipeline sub-workflows, or hierarchical routing that bottoms out in a swarm. Learn each shape in isolation first, then mix.

Key insight

The two questions every pattern answers

Every topology is just an answer to two questions: (1) Who decides what happens next? (a central agent, the previous stage, the agents themselves, or a controller watching a shared state) and (2) How does information move? (through a hub, down a line, peer-to-peer, or via a shared workspace). Keep these two axes in mind and the five patterns stop being a list to memorize.

Supervisor / orchestrator-worker

Picture a team lead handing out assignments. A single orchestrator agent receives the task, breaks it into pieces, hands each piece to a specialized worker, collects what comes back, and writes the final answer. The defining rule: workers never talk to each other — every bit of coordination flows through the supervisor, like a hub with spokes. This is the pattern Anthropic used for its multi-agent research system and the one most frameworks ship first.

Why reach for it: routing decisions are made by a single agent with full context, and the centralized flow is auditable — you can see exactly who was asked to do what. It's the natural fit for compliance environments and tasks with clear, dynamic decomposition.

The costs are real. The supervisor is a single point of failure: if it hallucinates a bad plan, the error cascades to every worker. Every step also pays for a routing LLM call (the orchestrator bottleneck), and naive sequential delegation adds latency. The classic bug is a routing loop — the supervisor keeps re-selecting the same worker without making progress.

python
# LangGraph: the supervisor pattern is a first-class package
from langgraph_supervisor import create_supervisor
from langgraph.prebuilt import create_react_agent

researcher = create_react_agent(model, tools=[web_search], name="researcher")
coder = create_react_agent(model, tools=[run_python], name="coder")

app = create_supervisor(
    agents=[researcher, coder],
    model=model,
    prompt="Route research to 'researcher' and code to 'coder'. Synthesize their outputs.",
).compile()

Hierarchical teams

Now scale that team lead up to a whole company. When one supervisor would drown — imagine 50 specialized workers all reporting to a single agent — you nest the structure. A root agent delegates to sub-supervisors, each of which manages its own pool of leaf workers. This is not simply running several supervisors side by side; the defining feature is the nested delegation chain: root → sub-supervisor → worker.

Hierarchy is the only topology that scales cleanly to large enterprise deployments (50+ agents). It also mirrors how real problems decompose: a research org has departments, departments have teams, teams have specialists. Each level keeps its own routing decision small and in-context.

Frameworks implement this by treating a whole sub-team as a single callable — the parent just "calls the team" the way it would call any tool. In Google ADK, a parent LlmAgent calls a sub-agent workflow through AgentTool, so the sub-team looks like an ordinary function call. CrewAI bakes hierarchy in at the framework level: a top-level planner decomposes a goal into sub-goals that crews execute. Microsoft's AutoGen lineage (now folding into the Microsoft Agent Framework) used a GroupChat with a hierarchical manager.

python
# Google ADK: a parent agent calls sub-teams as tools
from google.adk.agents import LlmAgent
from google.adk.tools.agent_tool import AgentTool

research_team = LlmAgent(name="research_lead", sub_agents=[scout, analyst])
writing_team = LlmAgent(name="writing_lead", sub_agents=[drafter, editor])

root = LlmAgent(
    name="director",
    tools=[AgentTool(research_team), AgentTool(writing_team)],
)

Sequential pipelines

A pipeline is an assembly line. Each agent does one job, then passes its work to the next station down the line. Agents run in a strict, fixed order; each stage transforms its input and hands the output to the next. The most important and most-missed fact: there is no orchestrator. Stage N receives stage N−1's output and passes to stage N+1. No agent decides the routing — the wiring is the routing. That's the key differentiator from the supervisor, where a central agent chooses each next step.

This makes pipelines the easiest pattern to reason about. Each stage is independently debuggable and profileable, and you can put a cheap, fast model on the easy stages and a strong model only where it's needed. The trade-offs are equally clear: no parallelism, total latency is the sum of every stage, and a failure in any stage stalls everything downstream. Pipelines shine for linear, deterministic work: ETL, document processing (extract → summarize → format), and CI/CD-style flows.

python
# Google ADK ships SequentialAgent as a native primitive
from google.adk.agents import SequentialAgent

pipeline = SequentialAgent(
    name="doc_pipeline",
    sub_agents=[extractor, summarizer, formatter],  # run in this exact order
)

In LangGraph the same shape is a directed graph with sequential edges (extract -> summarize -> format -> END). Either way, you are choosing determinism and debuggability over flexibility and speed.

Network / swarm / handoff

Now throw away the boss entirely. Instead of routing through a center, agents hand control to each other directly — like a phone call being transferred between departments. A billing agent that realizes a question is really about refunds simply hands off to the refunds agent, which takes over the conversation. Coordination is peer-to-peer; there is no hub.

OpenAI's experimental Swarm library pioneered the handoff primitive — but note: Swarm is now archived/educational-only. The production successor is the OpenAI Agents SDK (March 2025), whose built-in primitives are Handoffs, Guardrails, and Tracing. On a handoff the system prompt switches to the new agent's, but conversation history is preserved — the receiving agent picks up the live thread rather than starting cold. LangGraph implements the same idea with Command objects (Command(goto=..., graph=Command.PARENT)) and ships a langgraph-swarm package.

The appeal is latency and context continuity: handoffs are fast — no intermediary routing call — and the receiving agent inherits the live conversation. LangChain's benchmarks found the swarm can match or slightly exceed the supervisor on task accuracy for customer-service-style workloads because sub-agents respond to users directly without a translation step. The trade-offs are harder auditing and the signature failure mode: ping-pong loops, where two agents bounce control back and forth. The standard mitigation is a hard hop limit (e.g., max 3 handoffs tracked in state).

python
# OpenAI Agents SDK: declare which agents A can hand off to
from agents import Agent

refunds = Agent(name="Refunds", instructions="Handle refund requests.")
billing = Agent(
    name="Billing",
    instructions="Handle billing. Hand off refund questions.",
    handoffs=[refunds],
)

Blackboard / shared-state

Imagine specialists gathered around a shared whiteboard. Nobody speaks to anyone directly; instead each person reads what's on the board and adds their own contribution when they have something useful. That's the blackboard pattern: agents don't talk to each other at all — they read from and write to a shared workspace (the blackboard), and a control component decides which agent acts next. Coordination is emergent: each specialist watches the shared state, contributes when it can, and the solution accretes. This is ideal when agents are loosely coupled and you don't know the completion order up front.

Don't confuse this with broadcasting full conversation history to everyone (the GroupChat/AutoGen approach, where a 4-agent, 5-round debate costs 20+ LLM calls). A proper blackboard is a structured store of named outputs, not a transcript. Google ADK uses session.state as the whiteboard, and the critical discipline is that each agent writes to a unique output_key — that's what prevents the classic blackboard bug: race conditions, where two agents clobber the same slot. Anthropic's research system used a shared task queue plus a completion registry in exactly this spirit, which also makes the workflow fault-tolerant: an agent can crash and another can pick up unfinished items.

python
# Google ADK: agents share session.state; unique output keys avoid races
from google.adk.agents import LlmAgent

researcher = LlmAgent(name="researcher", output_key="research_notes")
critic     = LlmAgent(name="critic",     output_key="critique")
writer     = LlmAgent(name="writer",     output_key="final_draft")
# Each reads prior keys from state; none overwrites another's slot.

Choosing — and composing — a pattern

The first rule is counterintuitive: don't pick a pattern yet. Start with the cheapest thing that could work. Anthropic's explicit guidance is to optimize a single agent first, and move to multi-agent only when evaluation shows that single agent plateauing. Multi-agent workflow adoption accelerated sharply through 2025 — and many deployments added coordination cost with no measurable benefit. Don't be that deployment.

When you do go multi-agent, match the pattern to the shape of the problem:

PatternReach for it when…Watch out for
SupervisorRouting accuracy and auditability matter; decomposition is dynamicOrchestrator bottleneck, routing loops
HierarchicalLarge scale (50+ agents) or nested sub-problemsDepth adds latency and complexity
PipelineThe task is linear and deterministicNo parallelism; one stage stalls all
SwarmLatency dominates and domain boundaries are clearPing-pong loops, harder to audit
BlackboardAgents are loosely coupled; timing is unpredictableRace conditions on shared keys

And compose freely: a supervisor on top with pipeline sub-workflows, or hierarchical routing that bottoms out in a swarm. Whatever you pick, give each subagent a clear objective, an output format, tool guidance, and explicit task boundaries — without that, agents duplicate work or leave gaps.

Tip

Anthropic's effort-scaling rule

Don't spawn a swarm for a lookup. Anthropic embeds concrete scaling rules in its orchestrator: 1 agent for simple fact-finding, 2–4 for direct comparisons, 10+ only for genuinely complex research. Matching agent count to task difficulty is one of the highest-leverage things you can tune — and improving tool descriptions cut task completion time 40% in their system.

Try it: Refactor a supervisor into a swarm

Build a tiny customer-support system with two specialist agents (Billing and Refunds) using LangGraph or the OpenAI Agents SDK.

  1. Supervisor version: wire both workers under a supervisor that routes each user message. Log every routing decision.
  2. Swarm version: rebuild it so Billing can hand off directly to Refunds (and vice versa) with no central router. Add a hop_count to state and refuse to hand off after 3 hops.
  3. Compare: run the same five test messages (including one ambiguous "I was double-charged, give me my money back") through both. Record routing decisions, total latency, and any loops.

Write three sentences: which version routed the ambiguous case correctly, which was faster, and which you'd ship for an auditable compliance setting. This makes the supervisor-vs-swarm trade-off concrete in your own hands.

Key takeaways

  1. 1Five canonical topologies cover the field: supervisor, hierarchical, pipeline, swarm/handoff, and blackboard — and most real systems are hybrids of them.
  2. 2The patterns differ on two axes: who decides what happens next, and how information moves (hub, line, peer-to-peer, or shared workspace).
  3. 3Supervisor buys auditability and centralized control at the cost of a routing bottleneck; swarm buys latency and context continuity at the cost of harder auditing and ping-pong loops.
  4. 4Pipelines have no orchestrator and blackboards have no direct messaging — confusing either with the supervisor is the most common conceptual error.
  5. 5Start with one optimized agent; add a pattern only when evaluation proves the single agent plateaus, and give every subagent a clear objective, output format, and boundaries.

Quiz

Lock in what you learned

Check your understanding

0 / 4 answered

1.What most distinguishes a sequential pipeline from the supervisor pattern?

2.In the swarm/handoff pattern, what is the signature failure mode and its standard mitigation?

3.Which statement about the blackboard / shared-state pattern is correct?

4.According to Anthropic's guidance, when should you move from a single agent to a multi-agent system?

Go deeper

Hand-picked sources to keep learning