Use multiple agents only when the work has genuinely different responsibilities, tools, context boundaries, or parallel branches that benefit from independent ownership. Keep a deterministic workflow or one agent when the task is short, the same context serves every step, and failures are easy to diagnose. Add an orchestrator last: complexity must buy measurable reliability, latency, or maintainability.

Decide

Whether specialization beats a simpler baseline

Artifact

A runnable router with contained degradation

Prerequisite

A typed task contract and representative cases

Architecture decision tree
  1. Q1
    Is the sequence known?Yes → typed workflow
  2. Q2
    Can one context own it?Yes → single agent
  3. Q3
    Do branches truly specialize?Yes → multi-agent
  4. GATE
    Can failure be contained?No → simplify
Add agency only when the simpler branch cannot meet the contract and the added handoffs remain typed, observable, and recoverable.

Architecture spectrum

Workflow first, agency only where uncertainty demands it#

Evidence trailSource 1
  1. 01

    Deterministic workflow

    Known sequence, typed inputs, explicit branches, predictable failure handling.

  2. 02

    Single agent

    One context, several tools, dynamic choice inside a bounded task.

  3. 03

    Multi-agent system

    Specialized contexts or tools, independent branches, explicit handoffs and synthesis.

Positive signals

Four reasons specialization may pay for itself#

Evidence trailSource 1Source 2

Specialization helps when one component researches, another computes, another checks policy, and a final component synthesizes evidence. It can also isolate sensitive tools or parallelize independent searches.

The boundary must be contractual: input, output, tool access, timeout, retry and failure owner. “Let the agents talk” is not an architecture.

Topology menu

Choose a coordination pattern before choosing a framework#

Evidence trailSource 1
  1. 01

    Prompt chain

    Use a fixed sequence when each stage transforms and validates the previous result.

  2. 02

    Parallel fan-out

    Run independent analyses together, then aggregate only evidence that meets the same contract.

  3. 03

    Router and specialists

    Classify the request, send it to one bounded specialist, and keep an explicit fallback.

  4. 04

    Evaluator and optimizer

    Let one component draft and another critique against a rubric, with a hard iteration limit.

Sanitized product pattern

A conversational analytics system is more than chat#

In a production conversational analytics product, a user request may require intent classification, data retrieval, statistical computation, comparison and explanation. The interface looks like one conversation, but the responsibilities behind it are different.

The useful pattern is not the number of agents. It is routing cheap or deterministic paths early, preserving continuity for follow-up questions, and requiring the final answer to carry the evidence produced by each specialist.

Failure containment

Design handoffs for partial failure#

Evidence trailSource 3

Every extra agent creates another place for context loss, timeout and contradictory output. Give the orchestrator a deadline, a retry budget and a degraded response path.

Trace each handoff and tool result with stable identifiers. If a final answer is wrong, the team must distinguish bad routing, bad evidence, bad specialist output and bad synthesis.

Architecture experiment

Make the complex design beat a simpler baseline#

Run the same representative set through the typed workflow, the single-agent version, and the proposed multi-agent design. Compare task completion and critical failures first; then inspect p95 latency, cost per successful task, human intervention, and the fraction of runs that degrade gracefully.

Promote the multi-agent design only when the gain survives repeated runs and can be attributed to specialization or containment. If quality ties while latency, cost, and diagnosis worsen, the simpler design is the result—not a prototype you failed to outgrow.

Reference implementation

Run the baseline, specialist, and failure path

This sanitized, dependency-free implementation distills a pattern used in a production conversational system: cheap paths stay simple, specialized work carries evidence, and failure degrades explicitly.

routing_baseline.py
from dataclasses import dataclass
import json

@dataclass(frozen=True)
class Request:
    intent: str
    question: str

def generalist(request: Request) -> dict:
    return {"path": ["generalist"], "answer": "baseline", "evidence": []}

def data_specialist(request: Request) -> dict:
    if "timeout" in request.question.lower():
        raise TimeoutError("data specialist timed out")
    return {
        "path": ["router", "data_specialist"],
        "answer": "compare two validated segments",
        "evidence": ["segment_a", "segment_b"],
    }

def route(request: Request) -> dict:
    if request.intent != "compare_segments":
        return generalist(request)
    try:
        return data_specialist(request)
    except TimeoutError:
        return {
            "path": ["router", "data_specialist", "safe_fallback"],
            "answer": "comparison unavailable",
            "evidence": [],
            "degraded": True,
        }

cases = [
    Request("small_talk", "hello"),
    Request("compare_segments", "compare the top two"),
    Request("compare_segments", "force timeout"),
]
print(json.dumps([route(case) for case in cases], indent=2))
Runpython routing_baseline.py
Expected output
[
  {
    "path": ["generalist"],
    "answer": "baseline",
    "evidence": []
  },
  {
    "path": ["router", "data_specialist"],
    "answer": "compare two validated segments",
    "evidence": ["segment_a", "segment_b"]
  },
  {
    "path": ["router", "data_specialist", "safe_fallback"],
    "answer": "comparison unavailable",
    "evidence": [],
    "degraded": true
  }
]

Failure exercised. The third case forces a specialist timeout. The router returns a visible degraded state instead of fabricating a comparison.

Production boundary. The example intentionally omits production prompts, routing rules, models, memory, telemetry, and calibrated gates.

Decision rule

Ask what complexity buys#

  • Can a typed workflow solve the task?
  • Does one agent have enough context and tool isolation?
  • Are responsibilities meaningfully different?
  • Can branches run independently or in parallel?
  • Is each handoff typed and observable?
  • Does every specialist have a failure owner?
  • Can the system degrade when one branch fails?
  • Will evals compare the simpler and more complex design?

Boundary

What multi-agent architecture does not guarantee#

Evidence trailSource 1

CAN

  • Separate responsibilities and tool access
  • Parallelize independent work
  • Create review and synthesis stages
  • Contain some failures behind contracts

CANNOT

  • Make an unclear process correct
  • Remove latency and coordination cost
  • Guarantee emergent collaboration
  • Replace evals with a topology diagram

Read next

Primary sources

Primary sources

  1. Anthropic: Building Effective AI Agents

    Workflow and agent patterns with simplicity as a design constraint.

  2. AutoGen: Enabling Next-Gen LLM Applications

    A public multi-agent conversation framework.

  3. OpenTelemetry GenAI attributes

    Trace vocabulary for model and tool operations.

Design the smallest architecture that works

Turn a conversational prototype into an operable decision system.