A multi-agent system architecture splits one AI task across several specialised agents (for example a planner, parallel workers, a tester and a reviewer) that coordinate through an orchestrator, a pipeline or shared state, with explicit contracts for every handoff. Use it when the work divides into independent parts or needs separate security boundaries. Otherwise, a single agent with good tools is cheaper, faster and easier to debug.
That trade-off is real. Anthropic reported that its multi-agent research system beat a single top-tier agent by 90.2% on an internal research eval, but it used about 15 times the tokens of a chat interaction (Anthropic). This guide covers when the extra cost pays, the six patterns that matter, how agents should talk to each other, how these systems fail, and the architecture we run every day in YITEC's AI Software Factory.
What is a multi-agent system?
The term is older than LLMs. Classic multi-agent systems (MAS) came from distributed AI and robotics: autonomous agents with their own goals, negotiating through message protocols. The LLM-era version is narrower and more practical. Each "agent" is a model call in a loop with its own system prompt, tools and context window. The agents usually share one goal, and a designer decides who talks to whom.
Three properties define the modern version:
- Specialisation. Each agent has a narrow role and a short, focused prompt.
- Context isolation. Each agent sees only what its job needs.
- Coordination. Some structure (orchestrator, pipeline, router or shared store) decides the order of work and merges results.
If you are still choosing between a plain LLM feature and an agent, start with our explainer on agentic AI vs generative AI.
Single agent first: when multi-agent is worth it
Microsoft's architecture guidance puts it plainly: use the lowest level of complexity that reliably meets your requirements, and treat a single agent with tools as the right default for many enterprise cases (Microsoft). Anthropic's earlier advice is the same: find the simplest solution and add complexity only when it improves outcomes (Anthropic).
Multi-agent architecture earns its cost in four situations:
- The work parallelises. Research across many sources, or software features that touch different files, can run side by side.
- One prompt has become too big. When a single agent juggles 40 tools and five roles, accuracy drops. Splitting roles shortens each prompt.
- Parts need different permissions. A reviewer should not be able to merge; a public-facing assistant should not hold shell access.
- You need independent checking. A tester or critic that did not write the work catches more than self-review.
It is a poor fit when every step depends on the last, when all agents need the same large context, or when the task is too low-value to justify several times the token spend. Anthropic notes that most coding tasks have fewer parallel subtasks than research, which is why our factory parallelises across work orders, not inside one function.
Six multi-agent system design patterns
Most production systems combine two or three of these. The table compares them; the sections below show where each one appears in our own builds.
| Pattern | How it works | Best for | Cost and latency | Main failure mode |
|---|---|---|---|---|
| Orchestrator-worker | A lead agent splits the task and dispatches workers, then merges results | Parallel, decomposable work | High tokens, low wall-clock time | Poor task splits; duplicated work |
| Hierarchical supervisor | Supervisors manage sub-teams; a top agent watches supervisors | Large, long-running programmes | Highest overhead | Information lost between levels |
| Sequential pipeline | Fixed stages, each consuming the previous stage's output | Repeatable processes with clear gates | Moderate; latency adds up per stage | Early errors flow downstream |
| Router | A classifier sends each request to one specialist | Mixed inbound traffic | Low; one extra hop | Misrouting with high confidence |
| Peer debate | Several agents propose or argue; a judge decides | Design choices, hard judgement calls | High per decision | Agents converge on a shared mistake |
| Blackboard (shared state) | Agents read and write a common store instead of messaging | Long tasks with many contributors | Moderate | Stale or conflicting writes |
Orchestrator-worker
A planner turns a goal into units of work, and workers execute them in parallel. In our factory a planner agent on a frontier reasoning model reads the business analyst's clickable prototype and writes a plan, UAT cases and a manifest of work orders with dependency edges. Workers then build each order in its own git worktree.
Hierarchical supervisor
Supervisors manage the managers. Our factory runs a supervisor agent every 3 hours to unblock stuck production lines, and a "doctor" that checks every line, host and environment every 3 minutes, fixing known faults and spawning a fixer agent for anything new.
Sequential pipeline (handoff)
Each production line is a fixed pipeline: intake, plan, develop, QA, review, then merge or escalate. A line loops up to 5 to 7 rounds before a "briefer" agent escalates to a human with a plain-language summary of what is blocked and why.
Router
A router classifies and dispatches. Our internal coordination portal lets anyone file a ticket; an AI manager routes it to the right running agent session, waits for the answer and reports back.
Peer debate
For a national data-integration gateway, rival architect agents each proposed a full design and a critic agent merged the best of each; the design was chosen in about 30 minutes. Debate is expensive per decision, so we reserve it for decisions that are expensive to reverse.
Blackboard (shared state)
Shared artifacts beat long message chains. Every agent in a line reads the same plan.md, uat.md and an architecture document written by an "Architect" agent. Git is the blackboard, which gives us history and diffs for free.
Communication: handoff contracts, MCP and A2A
Most multi-agent failures start at a handoff where one agent assumed something the next one did not know. The fix is a typed contract: a schema for what goes in, what comes out and what counts as done. Here is a simplified illustration of a work-order handoff:
work_order:
id: WO-0142
items: 11 # we batch 8-15 related items per order
depends_on: [WO-0139]
inputs: [prototype_screens, plan.md#section-4]
acceptance:
uat_cases: [UAT-0871, UAT-0872, UAT-0880]
evidence: browser_screenshots_per_case
limits: { max_rounds: 6, on_fail: escalate_with_brief }
Two open protocols cover the wiring around these contracts. The Model Context Protocol connects an agent to tools and data. A2A, now stewarded under the Linux Foundation, connects agents to other agents without sharing their internal memory or tools. In the A2A project's own words, MCP connects an agent to tools, APIs and data, while A2A connects it to other agents. Inside one system you control, structured outputs plus shared artifacts are often enough; A2A matters most when agents cross team or vendor boundaries.
State, memory and context isolation
Isolation is the point of having several agents, so enforce it physically, not only in prompts:
- Separate workspaces. Each worker gets its own git worktree and branch, and each work order gets its own preview stack for testing.
- Condensed returns. Workers hand back summaries and evidence, not their full transcript. This keeps the orchestrator's context small (see our guide to context engineering).
- Durable state. Long runs need a workflow engine. Our factory runs on Temporal; in a crash test we killed the worker at step 3 of 12, and the run resumed at step 4.
- Explicit memory. Lessons learned go into versioned files that an improver agent updates every night, so tomorrow's agents start smarter than today's.
Failure modes in multi-agent systems
The best public taxonomy so far comes from a Berkeley-led study that annotated more than 1,600 traces across 7 multi-agent frameworks and found 14 failure modes in three groups: system design issues, inter-agent misalignment, and task verification (Cemri et al.). Our production logs show the same three groups, and each has a structural fix:
| Failure we saw | Structural fix we use |
|---|---|
| An agent reports "fixed" without reproducing the bug | Rule: no "fixed" without a reproduction; evidence is required in the handoff |
| A feature is called working because a health check is green | QA agent drives a real browser through every UAT case and saves screenshots |
| Parallel merges collide | A resolver agent settles conflicts under an integration lock; merges batched 6 to 10 and bisected if red |
| Loops that never converge | Round caps, then escalation to a human with a written brief |
| Cost blow-ups from tiny tasks | Batch 8 to 15 related items per work order: about 6x faster and 10x cheaper per feature |
Evaluating a multi-agent system
Evaluate the outcome, each agent and the trajectory. Fix the scorer before the experiment; a lenient self-score is worthless. In one of our projects an agent's own scoring reported 69% and 75%; the official scorer said 56% and 63%, and only the official numbers count. Per-agent evals check each contract (were the work orders complete, was the test evidence real), and trajectory review catches loops and lost context. Our full method is in AI agent evaluation: metrics, frameworks and CI gates.
Governance at agent, system and organisation level
- Agent level: least-privilege tools. A reviewer comments; it cannot merge.
- System level: gates that agents cannot bypass, such as tests, signed builds and integration locks.
- Organisation level: a named human owns each release. In our factory, production needs an admin to press the button, a database dump first, and a release branch with a merge request.
How YITEC does it: a reference build
Our AI Software Factory is a multi-agent system that ships production software, so its numbers are a fair test of the architecture above:
- Scale: up to 26 parallel production lines and 30 agents running at once, with 18 agents on one product at peak.
- Orchestration: rmux, our in-house agent multiplexer, spawns and supervises role-based agents across several model vendors; Temporal keeps every work order durable; Prometheus, Grafana and Langfuse watch the hosts and the model calls. The details and lessons are in AI agent orchestration in production.
- Speed: on the government Resolution 57 KPI platform, 22 features were built, browser-tested and merged by agents on day one, and the system reached public production about 27 hours after the first commit. Seven weeks later it stood at 4,459 commits and 77 releases.
- Review: AI reviewer bots completed 1,623 reviews on 899 merge requests, a median of 7.7 minutes each. The backend merge gate dropped from 4 hours to 81 minutes.
- Parallel audit: for a national data-integration gateway, parallel auditor agents found issues that were all fixed before go-live. Every UAT case was an automated test, and more than a thousand cases passed with none open.
The same patterns run our national-scale software factory and the agentic AI development work we do for clients. To see whether your workflow needs one agent or twenty, look at our services or talk to our engineers.
FAQ
What is a multi-agent system in AI?
Single agent vs multi-agent: which should I use?
What is a key advantage of multi-agent systems?
How do you evaluate a multi-agent system?
Is a multi-agent system the same as agentic AI?
Sources
- How we built our multi-agent research system (Anthropic, 2025)
- Building effective agents (Anthropic, 2024)
- AI agent orchestration patterns (Microsoft Azure Architecture Center)
- Why Do Multi-Agent LLM Systems Fail? (Cemri et al., arXiv 2503.13657)
- A2A Protocol (Linux Foundation)
- What is the Model Context Protocol (MCP)?



