Track 04 · Multi-agent & integrationLesson 01 of 11
Supervisor, router or swarm?
Pick the multi-agent shape that fits the task, and know what each one costs.
- Lesson library · reference
- 45 min read
- 60 min hands-on
- Pro
What you'll be able to do
01- Decide whether a use case needs more than one agent at all, and defend "one agent with good tools" when it does not.
- Explain the six common topologies (router, supervisor, hierarchical, swarm/handoff, network/blackboard, pipeline), how control and context flow in each, and what each costs in model calls and latency.
- Choose between shared state and message passing for a given boundary, and justify the choice in terms of coupling, leakage and debuggability.
- Diagnose the characteristic multi-agent failures (loops, conflicting outputs, lost context, unassignable blame) from a trace, and name the guard that prevents each.
- Implement a router and a supervisor with a max-hops guard and loop detection, and map the same design onto the framework or platform the customer already runs.
Before you start
- The agent loop, written by hand: every agent in a topology is one of these loops, with its own stop conditions.
- Agent or workflow? Choosing the autonomy level: most edges in a good topology are deterministic.
- Subagents, skills and code mode: how a single agent decomposes its own work. This file is one level up.
- Context on a budget: what to keep, compress and cut: coordination overhead is mostly context cost.
- Comfort reading a trace with nested spans.
The short version
A multi-agent system is several agent loops, each with its own instructions, tools, permissions and often its own owner, connected by a topology that decides who acts next and what each agent gets to see. The router classifies once and dispatches once. The supervisor (orchestrator-workers) calls workers, reads their results and decides the next step until it finishes. A hierarchy stacks supervisors. A swarm lets agents hand control to each other directly. A blackboard coordinates agents through a shared store. A pipeline runs agents in a fixed order. Each topology trades control, cost and latency differently, and each adds failure modes a single agent does not have: loops, contradictions, lost context and the question "which agent did this?". Go multi-agent when you need isolation (context, permissions, ownership) or parallelism, not because the org chart has boxes.
Key takeaways:
- The first design question is "why not one agent with these tools?" Answer it in writing.
- Every hop costs a model call, tokens and latency. Supervisors add a call per hop; parallel fan-out cuts wall-clock time but not tokens.
- Put the routing decision in code where you can (a deterministic router, a pipeline edge) and in a model only where the input really varies.
- Every topology needs a hop budget, loop detection, an owner for the final answer, and agent IDs on every trace span.
- Share typed state inside a trust boundary; pass messages with contracts across one.
Pro lesson
The rest of this lesson is in Pro.
The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.
- Every stage and specialisation, in full
- Every lab and every role project
- Halden weeks 2–10, on your record
- Every drill, live in the playground
- All solutions, plus the server judge
- Lab Assistant and every Teach with AI