Multi-Agent System
A multi-agent system is a setup where several AI agents, each with its own instructions and tools, divide a task between them and pass work or messages to one another.
Also known as: MAS, agent teams, orchestrator-worker agents
How it works
Instead of one agent holding every tool and instruction, the work is split. Common patterns include:
- Orchestrator and workers: a lead agent breaks a task into parts, hands each to a specialist agent and combines the results.
- Pipeline: agents run in sequence, such as extract, then validate, then write.
- Reviewer: one agent drafts and another checks the draft against rules.
Agents inside one application usually share memory through the orchestrating code. Agents built by different teams or vendors need a shared protocol, which is the gap the Agent2Agent (A2A) protocol, now a Linux Foundation project, is designed to fill.
Why it matters
Splitting work keeps each agent's context short and its tool list small, which tends to improve reliability, and it lets parts of the task run in parallel. Anthropic reported in 2025 that its multi-agent research system outperformed a single agent on its internal research evaluation, while using many times more tokens. That trade-off is the core decision: more agents mean more cost, more latency and more places for errors to compound. Use a multi-agent design when the task genuinely breaks into independent parts or needs separate permissions. For a linear task, a single agent with good tools is simpler to test and cheaper to run. Tracing each hand-off is essential, which is why AgentOps practices matter once several agents are in production.
Multi-Agent System in depth
Deciding whether you need more than one agent
The page above describes the patterns. The harder question is whether to use them. A useful test is to sketch the task as a single agent first, with its tools and instructions, and look for specific pressure points:
- Too many tools. When one agent has dozens of tools, it starts choosing the wrong ones. Splitting by domain helps.
- Separate permissions. If one step reads customer data and another sends emails, separate agents with separate credentials limit damage from prompt injection.
- Genuinely parallel work. Researching ten suppliers at once is faster with workers than in sequence.
- Independent review. A checker with its own instructions catches errors a drafter misses.
If none of these apply, a single agent with good tools is less costly, faster and easier to test.
Example: a procurement assistant
Example: a manufacturer wants help comparing supplier quotes. An orchestrator agent receives the request and the quotes. It hands each PDF to an extraction worker that returns line items as structured output. A comparison worker normalizes units and terms and builds a table. A policy reviewer agent checks the shortlist against approved-vendor and payment-term rules, and flags exceptions. The orchestrator assembles a recommendation for the purchase manager, who approves or edits it. No agent can place an order; the approved recommendation is entered in the ERP by a person or by a separate, tightly scoped step after approval.
Engineering the hand-offs
Most multi-agent failures happen between agents, not inside them. Practical rules:
- Define each hand-off as a typed message with a schema, not free text.
- Pass only the context each agent needs, which keeps prompts short and limits data exposure.
- Set limits on steps, tokens and time for each agent and for the whole run.
- Make retries idempotent, so a repeated step does not create duplicate records.
- Trace every hand-off with a shared run ID, so a final answer can be followed back through each agent.
Frameworks such as LangGraph, CrewAI, Microsoft AutoGen and the agent SDKs from major model providers offer orchestration building blocks. Across teams or vendors, the A2A protocol handles agent-to-agent messages and the Model Context Protocol handles tool access.
Evaluating a multi-agent system
Evaluate at two levels. End to end: did the run produce a correct, complete result, and at what token cost and latency? Per agent: did the extraction worker get fields right, did the reviewer catch planted errors? Compare against a single-agent baseline on the same tasks; if the multi-agent version is not clearly better, keep it simple. Our how AI agents work explainer and agent autonomy tool help decide how much each agent should do unsupervised.
Common mistakes
Typical problems are agents that loop by handing work back and forth, errors that compound as one agent's mistake becomes the next one's input, cost that grows with every added agent, and no single owner for the final output. AgentOps practices and human approval points address these. Gepton builds these systems in workflow automation agents and runs them in AgentOps and managed agents.
Questions about Multi-Agent System
Something else? Send us your question and an engineer replies with next steps.
Do agents in a multi-agent system need to use the same model?
No, and often they should not. A worker that extracts fields from documents may run well on a small, fast model, while an orchestrator that plans and judges may need a stronger one. Mixing models is a form of model routing inside one workflow. Evaluate each agent's role separately to choose its model, and record which model each agent used in the trace.
How do you stop agents from looping forever?
Set hard limits: a maximum number of steps per agent, a maximum number of hand-offs per run, a token budget and a wall-clock timeout. When a limit is reached, the run stops and is handed to a person with its trace, rather than retrying silently. Clear completion criteria in each agent's instructions also help, as does tracking repeated identical hand-offs, which are a reliable sign of a loop.