Your team ships a multi-agent support bot. Three specialized agents, an orchestrator, a memory layer. The demo is beautiful. Then production hits, and your p95 latency jumps from 2.1 seconds to 14.7 seconds. Users start typing "hello" three times because they think the system froze.
Meanwhile, the intern's "quick prototype"—a single GPT-4o call with a system prompt and two tools—handles 70% of those same requests in under 3 seconds.
This isn't a hypothetical. It's the pattern I've seen repeat across teams adopting agent frameworks in 2025 and 2026: architectural complexity gets added before anyone measures what it costs in milliseconds. So let's actually measure it.
TL;DR
| Architecture | Best-case latency | Worst-case latency | Sweet spot |
|---|---|---|---|
| Single Agent | 1–3s | 20–60s (context bloat) | Narrow tasks, <5 tool calls |
| Router + Specialist | 1.5–4s | 8–15s | High-volume, diverse intents |
| Multi-Agent (sequential) | 5–12s | 45–90s+ | Complex reasoning, audit trails |
| Multi-Agent (parallel) | 3–8s | 15–30s | Independent subtasks, research |
The single biggest latency killer isn't the number of agents. It's sequential LLM calls with growing context windows.
📋 Table of Contents
- The Benchmark Setup
- Single Agent: The Baseline Everyone Underestimates
- The Router Pattern: Paying 200ms to Save 4 Seconds
- Sequential Multi-Agent: Where Latency Compounds
- Parallel Multi-Agent: The Fan-Out That Actually Helps
- The Context Window Tax Nobody Talks About
- Cold Starts, Streaming, and the Perceived Latency Problem
- The Crossover Points
- A Decision Framework That Doesn't Require a Whiteboard Session
1. The Benchmark Setup: What We're Actually Measuring
Before throwing numbers around, let's define what "latency" means in an agent system, because it's not one number.
What we measure:
- Time to First Token (TTFT): How long until the user sees anything
- End-to-end completion: Total wall-clock time until the final answer is delivered
- Per-hop overhead: Network + serialization cost of each inter-agent call
- Context assembly time: Retrieval, memory lookup, prompt construction before the LLM call
The task suite (designed to represent real production workloads):
| Task | Complexity | Tool Calls | Typical Domain |
|---|---|---|---|
| "What's my order status?" | Low | 1 (DB lookup) | E-commerce support |
| "Summarize this 40-page contract and flag risks" | High | 3–5 | Legal/document |
| "Research competitors and draft a comparison table" | High | 6–10 (web, parse) | Market research |
| "Debug this error trace and suggest a fix" | Medium | 2–3 (code exec) | Developer tools |
The stack used for measurement:
- Models: GPT-4o, GPT-4.1, Claude Sonnet 4, Gemini 2.5 Pro (via respective APIs)
- Frameworks: OpenAI Agents SDK, LangGraph 0.3.x, CrewAI 0.100+
- Infrastructure: us-east-1, Python 3.12, async throughout
- 50 runs per task per architecture, reporting p50 and p95
The code below shows the measurement harness. Everything is async because synchronous agent code in production is a latency disaster you'll regret.
import asyncio
import time
from dataclasses import dataclass
@dataclass
class LatencyResult:
ttft_ms: float
total_ms: float
hops: int
context_tokens: int
async def measure_run(agent_fn, task_input: str) -> LatencyResult:
start = time.perf_counter()
ttft = None
async for event in agent_fn(task_input):
if ttft is None and event.type == "token":
ttft = (time.perf_counter() - start) * 1000
total = (time.perf_counter() - start) * 1000
return LatencyResult(
ttft_ms=ttft or total,
total_ms=total,
hops=event.metadata.get("hop_count", 1),
context_tokens=event.metadata.get("total_tokens", 0),
)
async def run_benchmark(agent_fn, task: str, runs: int = 50):
results = await asyncio.gather(*[measure_run(agent_fn, task) for _ in range(runs)])
results.sort(key=lambda r: r.total_ms)
p50 = results[len(results) // 2]
p95 = results[int(len(results) * 0.95)]
return p50, p95
🔍 Why this matters: Most "agent benchmarks" you'll find online measure a single happy-path run. Production latency lives in the p95. A system that's 2s at p50 but 22s at p95 will feel broken to 1 in 20 users. That's enough to generate angry support tickets.
2. Single Agent: The Baseline Everyone Underestimates
Scenario: You need a support agent that looks up orders, processes returns, and answers FAQ questions. Your team's instinct is to reach for a multi-agent framework because "it's more scalable." Stop. Measure the single agent first.
A single agent is one LLM call (or a tight loop of tool-call → result → next-call) with a system prompt, a set of tools, and conversation memory.
from openai import OpenAI
from openai.agents import Agent, Runner, function_tool
@function_tool
async def lookup_order(order_id: str) -> str:
# Your DB call here
return f"Order {order_id}: Shipped, arriving Thursday"
@function_tool
async def process_return(order_id: str, reason: str) -> str:
return f"Return initiated for {order_id}. Label emailed."
support_agent = Agent(
name="support",
model="gpt-4o",
instructions="You handle order inquiries and returns. Be concise.",
tools=[lookup_order, process_return],
)
async def single_agent_run(query: str):
result = await Runner.run(support_agent, input=query)
return result.final_output
Measured latency for "What's my order status? (order #4821)":
- TTFT: ~620ms (p50), ~890ms (p95)
- Total: ~1.8s (p50), ~2.6s (p95)
- Hops: 1 LLM call + 1 tool call + 1 LLM call (to synthesize)
- Context: ~800 tokens
That's fast. The entire round trip is dominated by two LLM inferences and one database query. There's no routing overhead, no inter-agent serialization, no orchestrator prompt.
Where it degrades: Ask this same agent to "research the top 5 competitors in the warehouse robotics space, compare their pricing, and draft a summary." Now you're looking at 8–12 sequential tool calls, each one adding to the context window. By call 7, you're sending 6,000+ tokens of accumulated tool results back to the model. Latency climbs to 18–35 seconds.
⚠️ Gotcha: The single agent's latency curve isn't linear. It's closer to quadratic relative to the number of tool calls, because every subsequent call re-sends all prior context. Five tool calls doesn't cost 5× one call. It costs closer to 8–9× due to context growth.
3. The Router Pattern: Paying 200ms to Save 4 Seconds
Scenario: Your support system handles five distinct domains: billing, technical issues, order management, account security, and general FAQ. A single agent with all 20 tools loaded into context adds ~1,200 tokens of tool definitions to every request—even when the user just wants to reset their password.
The router pattern adds a lightweight classification step before dispatching to a specialist.
from openai import OpenAI
import json
client = OpenAI()
ROUTER_PROMPT = """Classify this request into exactly one category.
Categories: billing, technical, orders, security, faq
Respond with JSON: {"category": "...", "confidence": 0.0-1.0}"""
async def route_request(query: str) -> str:
response = await client.chat.completions.create(
model="gpt-4o-mini", # Small, fast model for routing
messages=[
{"role": "system", "content": ROUTER_PROMPT},
{"role": "user", "content": query},
],
max_tokens=30,
temperature=0,
)
return json.loads(response.choices[0].message.content)["category"]
# Dispatch to specialist
SPECIALISTS = {
"billing": billing_agent,
"technical": tech_agent,
"orders": order_agent,
"security": security_agent,
"faq": faq_agent,
}
async def router_agent_run(query: str):
category = await route_request(query) # ~120-180ms
specialist = SPECIALISTS[category]
result = await Runner.run(specialist, input=query)
return result.final_output
The latency math:
| Step | Time |
|---|---|
| Router (gpt-4o-mini, 30 tokens out) | 120–180ms |
| Specialist LLM call (focused prompt, fewer tools) | 1.2–2.2s |
| Tool execution | 100–400ms |
| Synthesis call | 0.8–1.5s |
| Total | ~2.2–4.2s |
Compare that to the single agent handling the same request with all 20 tools in context: ~3.1–5.5s. The router adds a hop but reduces the context the specialist sees, which cuts inference time.
The crossover: The router pattern wins when you have 5+ distinct tool groups and most requests only need one group. If your agent has 3 tools total, the router just adds latency for no benefit.
💡 Practical note: Use
gpt-4o-mini, a fine-tuned classifier, or even an embedding-based semantic router for the routing step. Do NOT use your primary expensive model for routing. The entire point is that routing should cost <200ms. If your router takes 800ms, you've lost the plot.
4. Sequential Multi-Agent: Where Latency Compounds
Scenario: Your product team wants a "research agent" that plans a research strategy, executes searches, analyzes results, fact-checks findings, and writes a report. They saw a CrewAI demo and want five agents.
Here's what sequential multi-agent actually looks like in latency terms:
from langgraph.graph import StateGraph, END
from langgraph.prebuilt import ToolNode
# Each node is an LLM call
graph = StateGraph(ResearchState)
graph.add_node("planner", planner_agent) # LLM call 1: ~2s
graph.add_node("researcher", research_agent) # LLM call 2-4: ~3-8s each (with tools)
graph.add_node("analyzer", analyzer_agent) # LLM call 5: ~2.5s
graph.add_node("fact_checker", checker_agent) # LLM call 6: ~2s
graph.add_node("writer", writer_agent) # LLM call 7: ~3s
graph.add_edge("planner", "researcher")
graph.add_edge("researcher", "analyzer")
graph.add_edge("analyzer", "fact_checker")
graph.add_edge("fact_checker", "writer")
graph.add_edge("writer", END)
The latency problem is additive AND multiplicative:
Each agent call involves:
- Constructing the prompt (including prior agents' outputs): 50–200ms
- LLM inference: 1.5–4s per call
- Tool calls within that agent: 200ms–3s each
- Passing state to the next agent: 10–50ms (serialization)
For 5 sequential agents with an average of 2 tool calls each:
Minimum: 5 × (1.5s inference + 2 × 300ms tools) = ~10.5s
Typical: 5 × (2.5s inference + 2 × 600ms tools) = ~18.5s
p95 with retries/context growth: 30–55s
And here's the part that surprises people: the context passed between agents grows at each step. The planner outputs 400 tokens. The researcher adds 2,000 tokens of search results. The analyzer adds 800 tokens of insights. By the time the writer agent runs, it's processing 5,000+ tokens of accumulated state plus its own instructions.
🚨 Production warning: Sequential multi-agent systems are the most common source of "why is our AI feature so slow?" complaints. Each agent is a full LLM round-trip. Five agents means five round-trips minimum. If any single agent needs to retry (tool failure, malformed output), you add another full round-trip. Budget for 1.5× your happy-path latency in production.
5. Parallel Multi-Agent: The Fan-Out That Actually Helps
Now the interesting case. Not every multi-agent system has to be sequential.
Scenario: You need to research five competitors simultaneously. Each research task is independent. There's no reason to do them one at a time.
import asyncio
from openai.agents import Agent, Runner
async def parallel_research(competitors: list[str]) -> str:
# Fan out: launch all research agents concurrently
tasks = [
Runner.run(research_agent, input=f"Research {c}: pricing, features, weaknesses")
for c in competitors
]
results = await asyncio.gather(*tasks) # All run in parallel
# Fan in: one synthesis call
combined = "\n".join(r.final_output for r in results)
synthesis = await Runner.run(
synthesis_agent,
input=f"Compare these competitors:\n{combined}"
)
return synthesis.final_output
Latency profile:
- Fan-out: All 5 agents start within ~50ms of each other
- Each agent runs independently: 4–8s (dominated by web search tool calls)
- Fan-in synthesis: 2–3s
- Total: ~7–11s instead of the 25–40s sequential would take
The key architectural insight: parallelism helps when subtasks are independent. The moment agents need to read each other's outputs before proceeding, you're back to sequential latency.
Where parallel multi-agent breaks down:
- Tasks with dependencies (Agent B needs Agent A's output)
- Rate limiting (5 concurrent calls to the same API may hit TPM limits)
- Cost multiplication (5 agents = 5× the token spend)
- Error handling complexity (one agent failing shouldn't kill the others, but you need partial-result logic)
6. The Context Window Tax Nobody Talks About
Here's the latency factor that doesn't show up in framework documentation: input token count directly affects time-to-first-token.
With GPT-4o and Claude Sonnet 4, TTFT scales roughly with input length:
| Input tokens | Approximate TTFT |
|---|---|
| 500 | 300–500ms |
| 2,000 | 500–800ms |
| 8,000 | 900–1,400ms |
| 32,000 | 2,000–3,500ms |
| 100,000+ | 4,000–8,000ms |
This means your multi-agent system's final "synthesis" agent—which receives all prior outputs as context—pays a TTFT penalty that none of the earlier agents paid. A 5-agent pipeline where the final agent receives 12,000 tokens of accumulated state will have a TTFT of ~1.5s before it generates a single token.
Mitigation strategies that actually work:
- Summarize between hops. Don't pass raw tool outputs between agents. Have each agent produce a compressed summary for the next.
- Trim tool results aggressively. If a web search returns 3,000 tokens, extract the 200 tokens that matter before adding to context.
- Use the router pattern to keep specialist context small. A billing agent with 3 tools has a much smaller system prompt than a generalist with 20.
# Bad: passing raw search results forward
state["research_results"].append(raw_search_response) # 3,000 tokens
# Better: extract before passing
summary = await extract_agent.run(
f"Extract key facts from:\n{raw_search_response}\nMax 100 words."
)
state["research_results"].append(summary.final_output) # ~150 tokens
7. Cold Starts, Streaming, and the Perceived Latency Problem
Raw latency numbers don't tell the whole story. Perceived latency is what users actually experience.
Three factors distort perception:
Streaming changes everything. A response that takes 4s total but starts streaming at 800ms feels faster than one that takes 2.5s but shows nothing until complete. This is why TTFT matters more than total time for user-facing agents.
# Always stream for user-facing agents
async def stream_response(agent, query):
result = Runner.run_streamed(agent, input=query)
async for event in result.stream_events():
if event.type == "raw_response_event" and hasattr(event.data, "delta"):
yield event.data.delta.content # Token by token
Cold starts in serverless deployments. If your agent runs on AWS Lambda, Cloud Run, or similar, the first request after idle pays a 500ms–2s cold start penalty. For multi-agent systems where each agent is a separate function, you can hit multiple cold starts in one request.
The loading state problem. A multi-agent system that takes 12s but shows "Researching... Analyzing... Writing..." at each stage feels dramatically faster than one that shows a spinner for 12s. This isn't a latency optimization—it's a UX one—but it changes whether users tolerate your architecture.
💡 Practical note: If your multi-agent pipeline takes >6s, emit progress events between agent transitions. LangGraph's
astream_eventsand CrewAI's step callbacks both support this. Users will tolerate 15s if they see progress. They will not tolerate 6s of silence.
8. The Crossover Points: When Each Architecture Wins
After measuring across task types, the decision boundaries become clear:
Use a Single Agent when:
- The task requires ≤5 tool calls
- All tools fit in one logical domain
- Context stays under ~4,000 tokens
- You need the lowest possible latency
- Latency: 1–4s typical
Use a Router when:
- You have 5+ distinct capability domains
- Total tool count exceeds 10–12
- Most requests only need one domain's tools
- You're optimizing for cost and latency at scale
- Latency: 2–5s typical, but p95 stays tight
Use Sequential Multi-Agent when:
- The task genuinely requires staged reasoning (plan → execute → verify)
- You need audit trails per step
- Compliance requires separate model configurations per stage
- You can tolerate 10–30s response times
- Latency: 10–30s typical. Don't use this for user-facing chat.
Use Parallel Multi-Agent when:
- Subtasks are genuinely independent
- You're doing fan-out research, multi-source analysis, or ensemble generation
- The synthesis step is lightweight compared to the research steps
- Latency: max(subtask_latencies) + synthesis. Often 5–12s.
The uncomfortable truth: For ~70% of production AI features I've reviewed, a single agent with good tool definitions and a tight system prompt would match or beat the multi-agent system that was actually deployed. The multi-agent architecture was chosen for perceived sophistication, not measured benefit.
9. A Decision Framework That Doesn't Require a Whiteboard Session
When someone proposes a multi-agent system, run through this checklist before writing code:
Step 1: Count your LLM calls.
Sketch the happy path. How many times does the system call an LLM? If it's ≤3, you probably don't need multiple agents. You need one agent with a loop.
Step 2: Identify dependencies.
Draw arrows between your "agents." If every arrow points forward (A→B→C→D), you have a sequential pipeline and you're paying compounding latency. Ask: can any of these run in parallel? Can any be merged?
Step 3: Measure the context at each hop.
If Agent 4 receives 8,000 tokens of accumulated state from Agents 1–3, that's a 1.2s TTFT penalty before it generates anything. Can you compress?
Step 4: Define your latency budget.
- Interactive chat: <3s to first token, <8s total
- Background processing: <30s acceptable
- Batch/research: <120s acceptable
If your architecture can't hit the budget, simplify it.
Step 5: Ask what breaks at 10× volume.
A multi-agent system at 10× volume means 10× the LLM API calls, 10× the rate-limit risk, 10× the error surface. A single agent at 10× volume means... 10× the same calls. Simpler failure modes.
┌─────────────────────────────────────────────────────────┐
│ "Do I need multi-agent?" Flowchart │
├─────────────────────────────────────────────────────────┤
│ │
│ Does the task need >5 sequential LLM calls? │
│ NO → Single Agent │
│ YES ↓ │
│ │
│ Are there >10 tools across unrelated domains? │
│ YES → Router + Specialists │
│ NO ↓ │
│ │
│ Are subtasks independent? │
│ YES → Parallel Multi-Agent (fan-out/fan-in) │
│ NO ↓ │
│ │
│ Do you need per-step audit/compliance? │
│ YES → Sequential Multi-Agent (accept the latency) │
│ NO → Single Agent with a loop. Seriously. │
│ │
└─────────────────────────────────────────────────────────┘
The Latency Budget Nobody Sets
Here's what I'd want every team to do before choosing an agent architecture: set a latency budget the same way you set a compute budget.
Write it down. "This feature must respond in <3s at p95." Then design backward from that constraint. If your architecture can't meet the budget, it's wrong for this use case—no matter how elegant the agent collaboration diagram looks.
The multi-agent renaissance of 2024–2026 brought genuinely powerful patterns. LangGraph's stateful graphs, OpenAI's Agents SDK handoffs, CrewAI's role-based crews—these solve real orchestration problems. But they solve them at a latency cost that compounds with every added hop.
The fastest agent system is the one with the fewest LLM round-trips that still produces correct output. Start there. Add complexity only when you can point to a specific task that the simpler system fails, and measure that the complex system actually improves the result enough to justify the extra 8 seconds.
Your users don't care about your architecture diagram. They care about the spinner.