>

Pattern 02 · AI Architecture

Multi-Agent Systems that stay controllable

A production pattern for decomposing complex work across specialist agents — with planning, shared state, policy gates, and human approval where the stakes demand it.

1 + N
start with one agent; add N only on eval evidence
100%
of tool calls logged, attributed, and replayable
3
budgets per run: tokens, time, tool calls

01 · PROBLEM

Single agents collapse on multi-step work

A single agent with a long prompt works until the task needs real decomposition: research a topic, analyze data, write code, then verify the result. Context windows fill with intermediate state, tool-call sequences get confused, and there's no separation between "doing the work" and "checking the work." The failure mode is confident, expensive wandering.

This pattern covers orchestrated specialist agents for workflows like incident triage, research synthesis, data-analysis pipelines, and software tasks — where planning, execution, and verification are distinct jobs with distinct tools and distinct risk profiles.

02 · WHEN TO USE

Fit and anti-fit

  • Tasks decompose into 3+ distinct phases with different tools (search → analyze → act → verify).
  • Verification must be independent of execution (the builder shouldn't grade its own work).
  • Some steps are high-stakes (write to prod, send to customer) and need approval gates.
  • You can define task-level success criteria for evaluation.

Don't use it when a single agent with tools passes your evals — every additional agent adds latency, cost, and coordination failure modes. Multi-agent is an optimization for proven decomposition problems, not a starting architecture.

03 · ARCHITECTURE

Reference architecture

Multi-agent system architectureMulti-agent system architecture: a user request enters an orchestrator that plans and delegates to specialist worker agents with tools, coordinated through shared state, behind a policy gate with human approval. Control plane Worker agents Oversight User request Orchestrator / plannerdecompose · delegate · merge Shared state & memorytask graph · artifacts · history Researchersearch · read · summarize AnalystSQL · data · charts Buildercode · tests · PRs Criticverify · red-team Tool & API layerallowlisted · sandboxed · scoped creds Policy gatecost · risk · compliance Human approvalhigh-stakes actions Result & audit trailcitations · diffs · log Eval harnesstask suite · replay · regression Failure handlingretries · escalation · circuit breaker Observabilitytraces · token $ · latency Rule of thumb: start with one agent + tools. Add orchestration only when evals show the single agent failing at decomposition — coordination is a cost, not a feature.

The orchestrator plans and delegates; workers are narrow specialists; shared state is the single source of truth; and the policy gate plus human approval sit between the agents and anything irreversible.

04 · COMPONENTS

What each piece does

ComponentResponsibilityBuild/buy notes
Orchestrator / plannerDecomposes the request, assigns subtasks, merges results, handles failuresOften the smartest model you can afford; planning quality dominates outcomes
Worker agentsNarrow specialists (researcher, analyst, builder, critic) with constrained tool setsKeep prompts small and role-specific; workers should be boring and predictable
Shared state & memoryTask graph, artifacts, conversation history — visible to all agentsThe difference between "agents" and "a group chat"; design the schema first
Tool & API layerAllowlisted tools with scoped credentials, executed in sandboxesTools are the real attack surface — see Security
Policy gateEvaluates cost, risk, and compliance rules before high-impact actionsDeterministic rules first; LLM judgment only where rules can't reach
Human approvalExplicit sign-off for irreversible or externally visible actionsDesign the approval UX as carefully as the agent — approvers need context, not just a button
Eval harnessTask suite with graded outcomes, replay, and regression trackingTask-based evals (did it complete the workflow?) beat conversation evals

05 · FLOW

How work moves through the system

F1
Plan. The orchestrator decomposes the request into a task graph with dependencies, assigns owners, and sets per-task budgets.
F2
Execute in parallel where possible. Workers pull tasks from shared state, call their scoped tools, and write artifacts back — never passing large payloads through chat.
F3
Critique independently. The critic agent verifies outputs against the task criteria using different tools than the builder used.
F4
Gate. The policy gate checks cost/risk/compliance rules; high-stakes actions pause for human approval with full context attached.
F5
Merge & report. The orchestrator assembles the final result with citations, diffs, and a complete audit trail.
F6
Learn. Traces feed the eval harness; recurring failure patterns become new regression tasks or tighter worker prompts.

06 · TRADEOFFS

Decisions with real costs

DecisionOption AOption BOur default
TopologyCentral orchestrator — simpler to reason about, single bottleneckDecentralized / swarm — resilient, much harder to debugCentral orchestrator; decentralize only with proven need
Worker modelsOne strong model everywhere — simple, expensiveSmall models for workers, strong for planner/critic — cheaper, more prompt workTiered: strong planner + critic, efficient workers
CommunicationNatural-language handoffs — flexible, lossyStructured artifacts (JSON schemas) — rigid, reliableStructured artifacts; language only for summaries
AutonomyFull autonomy — fast, riskyHuman-in-the-loop everywhere — safe, slowRisk-tiered: autonomous for reversible, approval for irreversible

07 · SECURITY

The tool layer is the attack surface

  • Least-privilege tools: each worker gets only the tools its role needs, with scoped credentials (read-only DB roles, sandboxed shells).
  • Prompt-injection containment: tool outputs are untrusted data; workers must not treat them as instructions. The critic re-validates any instruction-like content from tools.
  • Credential hygiene: agents never see raw secrets — tools broker authenticated calls server-side.
  • Blast radius: destructive tools (delete, deploy, send) require policy-gate pass and human approval; there is no "agent root."

08 · GOVERNANCE

Accountability for autonomous work

  • Full audit trail: every plan, delegation, tool call, and approval is logged with timestamps and attributed to an agent and a human owner.
  • Approval policies as code: which actions need human sign-off is versioned policy, not tribal knowledge.
  • Kill switches: per-run and global stops, plus automatic termination on budget breach or loop detection.
  • Change control: worker prompts, tool allowlists, and policies are versioned; evals gate every change.

09 · COST

Where the money goes

  • Tokens multiply: N agents × their context × retries. A 5-agent workflow can cost 10–20× a single-agent call for the same task — budget per run, not per call.
  • Retries dominate: the critic loop is where cost accrues; cap iterations and make "escalate to human" cheaper than "try again."
  • Model tiering is the biggest lever: planner and critic on frontier models, workers on efficient ones.
  • Observability isn't free — full traces at high volume need a retention and sampling strategy.

10 · IMPLEMENTATION

A phased path that de-risks

P0
Single agent + tools (2–4 weeks). Prove the task is solvable and build the eval suite. Most teams should stop here until evals say otherwise.
P1
Add the critic (2–3 weeks). Independent verification is the highest-value second agent; it catches the failures users would.
P2
Orchestrate (4–6 weeks). Split execution into specialists only for decomposition patterns the evals prove. Add shared state schema, policy gates, and human approval.
P3
Operate (ongoing). Trace analysis, budget tuning, failure-pattern mining, and gradual autonomy expansion as trust is earned.

Engagement tie-in: our Agentic AI Workforce offering builds these systems as production engineering, and the Agentic AI Readiness Assessment tells you whether your use cases are agent-ready.

11 · RELATED

Keep exploring

Enterprise RAG

Grounded retrieval is the knowledge layer most agent systems need underneath.

Read pattern →

Agentic AI Workforce

Our flagship offering: production agent systems, deployed and operated.

Explore offering →

Evaluating AI Agents

Our engineering brief on what to measure before you trust an agent in production.

Read article →

Start here

Talk to an Architect

Bring your hardest AI, data, or modernization problem. We'll tell you plainly whether we can help — and what it takes.

FAQ

Questions we hear

When the work decomposes into genuinely different skill profiles (research vs. code vs. verification) and a single context window can't hold the plan, the tools, and the working state. If one agent with good tools passes your evals, ship that.

Budgets per task and per run, kill switches on loops, and a critic agent that can terminate unproductive branches. Most runaway cost comes from retry loops with no termination condition — make termination a first-class design decision.

Debuggability. You need full traces: which agent did what, which tool calls were made, what the intermediate states were. Without replayable traces, every failure is a mystery.