Multi-agent systems: the smallest number that still works
By Abdul Asim ·
What is a multi-agent system?
A multi-agent system is an application in which two or more LLM-driven agents, each with its own instructions and tools, work on parts of one task and pass work or results between them. Something has to coordinate them, and that coordination is agent orchestration. My rule is to use the smallest number of agents that still does the job: usually one, sometimes two, rarely more.
If you are new to the building block itself, read what an AI agent is first. This guide assumes you know what one agent with tools looks like and are asking whether you need several.
Do you need more than one agent?
Often not. Every extra agent adds a handoff, another prompt to maintain, more tokens and another place for context to get lost. The research agrees that this is not free. A 2025 study, Why Do Multi-Agent LLM Systems Fail?, annotated over 1,600 traces from seven popular multi-agent frameworks, found 14 distinct failure modes grouped into system design issues, misalignment between agents and weak task verification, and reported that these systems often show minimal gains over simpler setups on popular benchmarks.
In my experience, a split is justified by one of four concrete reasons:
- Different permissions. The part that proposes actions should not hold the right to run them.
- Context that no longer fits. One agent cannot hold all the instructions, tools and material it needs without losing focus.
- Independent work in parallel. Subtasks that do not depend on each other can run at the same time and be merged.
- Independent review. A checker with different instructions catches what the producer missed.
"It mirrors our team structure" and "the framework example had five agents" are not on that list. Before splitting, try one agent with better tools and a clearer stopping rule. The agentic AI hub shows where a single agent sits inside a larger system.
Agent orchestration patterns
These are the orchestration shapes I reach for, starting from the cheapest:
| Pattern | How it works | Use it when | Watch for |
|---|---|---|---|
| One agent, many tools | A single loop calls whichever tool fits | Default for most tasks | A tool list so long the model picks badly |
| Router | One classification step sends the request to a specialist | Requests fall into clear types | Misrouted requests with no fallback |
| Sequential handoff | One agent finishes a stage and passes control to the next | Stages need different skills or permissions | Context dropped at the boundary |
| Orchestrator and workers | A coordinator splits the task, workers return results, the coordinator merges | Subtasks are truly independent | Cost multiplies; the coordinator loses track |
| Producer and checker | One agent drafts, another reviews against written criteria | Output must be verified before release | A checker that approves everything |
Frameworks implement these in different ways. AutoGen models the system as agents that converse with each other, mixing model calls, human input and tools. Other SDKs model it as explicit handoffs. None of these patterns needs a framework to start: a router is a classifier call and an if statement, and a sequential handoff is one function returning a typed object to the next.
Agent handoff: what should pass between agents?
In the OpenAI Agents SDK documentation, a handoff lets one agent delegate a task to another, and the model sees each available handoff as a tool it can call. The design questions are the same in any stack: what context crosses the boundary, in what shape, and who owns the final result.
My defaults for every handoff:
- Pass a typed object, not the whole chat history: the goal, the constraints, what has been done and the evidence so far.
- Validate that object at the boundary, so a malformed handoff fails immediately instead of three steps later.
- Give exactly one agent or one piece of code ownership of the final answer.
- Tag every handoff with a request ID so the trace reads as one story.
- Never let a handoff widen permissions. The receiving agent gets only the tools its stage needs.
How I keep multi-agent architecture small in practice
Split by permission, not by topic. In the security-testing workflow I built for Odva AI, planning and execution are separate roles. A language model supports test planning, but its proposals pass an authorized-scope gate, and risky ones go to a human reviewer before the executor runs anything against the authorized target. Findings are then validated against a Pydantic schema and stored with evidence. Whether you call the planner and executor two agents or two stages, the principle is the same: the part that generates ideas does not hold the permission to act on them.
One agent, many tools. For Permit Signal, one conversational agent turns each question into semantic queries plus location and property filters, and a hybrid retriever runs spatial lookup, vector search, BM25 and SQL as ordinary code. A multi-agent design would give each retrieval method its own agent and make them negotiate. One agent calling a deterministic retrieval layer does the same job with no inter-agent handoffs to debug. I describe that pattern in agentic RAG.
Make the checker a different kind of thing. In the leadership-reporting workflow I built for Center for Creative Leadership, the checks around the drafting model are a data-validation layer before it, an analysis-validation layer after it, and a team lead's approval in Outlook. Where I have used a model as the checker, as in the AI report-quality checkpoint for Balto, I treat it as a filter that catches weak drafts, not as sign-off. A reviewer that shares the producer's blind spots adds cost without adding much safety.
Where multi-agent LLM systems fail
- Lost context. An agent receives a summary of a summary and works on the wrong version of the goal.
- Duplicated or conflicting work. Two workers solve the same subtask differently and the merge step picks one at random.
- Nobody verifies the end result. Each agent checks its own piece and the assembled answer is never tested as a whole.
- Cost and latency spiral. Agents that ask each other for clarification can loop until a budget stops them, if there is one.
- Injection travels. Text that one agent read from a document or web page becomes input to the next. OWASP describes this indirect prompt injection risk for external content, and a chain of agents gives it more places to land. I cover defences in prompt injection.
- Permission creep. Tools get added to whichever agent is convenient until one agent can do everything. OWASP's excessive agency guidance is a useful checklist for pulling that back.
Testing and observing a multi-agent system
Trace every request end to end, across all agents, with one ID. Log each handoff payload, each tool call and each model response. Without that, a wrong answer could have come from any of five places and you will guess.
Evaluate at two levels. Test each agent on its own stage with fixed inputs, then test the whole system on realistic tasks with a known good outcome. The second set catches handoff failures the first cannot. I set out how I build those test sets in LLM evaluation, and how tracing fits the rest of the stack in AI agent architecture.
Set hard limits too: a maximum number of steps per request, a token budget and a timeout. When a limit trips, the system should stop and say so, not return a half-finished answer that looks complete.
A short decision checklist
- Start with one agent and good tools.
- Add a second agent only for a reason you can name: permissions, context size, parallel work or independent review.
- Define the handoff object and validate it.
- Give one component ownership of the final answer.
- Put human approval before any high-impact action.
- Trace, budget and evaluate the whole chain, not only its parts.
If you are designing an orchestration layer now and want it reviewed before it grows, my custom agentic AI system engagement starts by finding the smallest number of agents your process actually needs.
