Multi-agent systems are easy to sketch and hard to operate. Each extra agent adds latency, cost, a new failure surface, and another prompt to keep in sync. Add one only when it buys something specific.
Four topologies, in order of preference
- Single agent with tools. One reasoning loop, many tools. Start here. It is the easiest to trace, test, and secure.
- Pipeline. Fixed stages, each an agent or a function: extract, validate, act. Use it when the order is known in advance.
- Supervisor and workers. A coordinator delegates sub-tasks to specialists. Use it when sub-tasks need different tools, models, or permissions.
- Graph or swarm. Agents hand off dynamically. Use it rarely, and only with strong tracing.
Reasons that justify splitting
- Permission isolation. The agent that reads customer email should not hold the credentials that issue refunds.
- Context isolation. A worker with a clean, small context outperforms one carrying forty thousand tokens of unrelated history.
- Model fit. A cheap model for classification, a stronger one for planning.
- Independent evaluation. A specialist with a narrow job has a narrow, testable success criterion.
Reasons that do *not* justify splitting: it matches the org chart, it looks impressive in a diagram, or the single prompt got long. A long prompt is a refactoring signal, not necessarily a topology signal.
The costs to price in
Every hop adds a model call. Every handoff loses information unless you pass a structured summary. Every agent boundary is a place where an error can be reinterpreted as fact by the next agent. Measure end-to-end latency and success rate for the single-agent baseline first; a topology change should beat it by a margin you can name.
Make handoffs contracts
Pass typed messages between agents: a task, its inputs, constraints, and a definition of done. Return typed results with a status field, not free text the next agent must interpret. This one habit prevents most multi-agent confusion.
Rule of thumb
If you cannot say in one sentence what each agent is *responsible for* and what it is *forbidden* to do, the boundaries are not ready.