How to monitor a multi-agent system in production: handoffs, loops, blame and the tools that trace them
To monitor a multi-agent system in production, trace every agent, handoff and tool call for one user request as a single tree, then watch per-agent errors, latency and cost, the handoffs and loops between agents, and whether the user got what they asked for. Agnost AI does this from your OpenTelemetry traces: it records agent, tool and handoff events per conversation, rolls each call's reported cost up to the agent that made it, and judges whole conversations against plain-English rules you can scope to one agent, with alerts in Slack, email or a webhook (PagerDuty, Opsgenie, ServiceNow). LangSmith, Langfuse (Agent Graphs), Arize AX (Agent Trajectory), Datadog Agent Monitoring, W&B Weave, AgentOps and Laminar also trace multi-agent runs, each with a different strength. The OpenTelemetry GenAI agent span conventions keep you portable between them.
Disclosure: We make Agnost AI. Agnost reads production conversations and traces, groups them by user and session, and judges whole conversations; it is not a real-time guardrail and it is not open source. Facts about LangSmith, Langfuse, Arize, Datadog, W&B Weave, AgentOps, Laminar, OpenTelemetry and A2A come from their own sites, docs and specs, checked on December 1, 2026.
This page is about production monitoring. If you want to test a multi-agent system before release, read the companion guide on how to evaluate a multi-agent system.
Why is a multi-agent system harder to monitor than one agent?
Because the failure and its cause are usually in different agents. A user sees a wrong answer from the final agent, but the mistake happened two handoffs earlier, when a research worker dropped a constraint from its summary. Single-agent dashboards show you each agent's spans and leave you to work out the chain.
Four things get worse with every agent you add:
- Blame. An error in one agent's output becomes another agent's input. Each agent can do its own job correctly on bad input.
- Coordination bugs. Agents hand work back and forth, two workers do the same task, or the orchestrator stops before workers finish. None of these throw an exception.
- Cost. Anthropic's write-up of its multi-agent research system says agents use about 4x more tokens than chat, and multi-agent systems about 15x. A loop between two agents multiplies that.
- Change. Anthropic also notes that "small changes to the lead agent can unpredictably change how subagents behave". A prompt edit in one agent shows up as a regression in another.
What multi-agent patterns do I need to trace?
Name the pattern first, because each one fails differently.
- Orchestrator and workers. A lead agent splits the task, workers run in parallel, the lead merges results. Anthropic's research system works this way. Watch the number of workers per request, how many finished, and whether the lead used their results.
- Handoffs. Control moves from one agent to another, which then talks to the user. In the OpenAI Agents SDK a handoff is a tool such as
transfer_to_refund_agent. In Google ADK, sub-agents take over withtransfer_to_agent. Watch where conversations end up and how often they bounce back. - Agents as tools. One agent calls another like a function and keeps control:
Agent.as_tool()in the OpenAI Agents SDK,AgentToolin ADK. Trace it like a tool call with a nested agent inside. - Workflows. The code decides the order: a LangGraph
StateGraph, an ADK sequential or parallel workflow, or a CrewAI crew with a manager agent in hierarchical mode. Watch which branches run and where runs stop. - Remote agents over A2A. Another team's or vendor's agent behind the Agent2Agent protocol. You see a task, its state and the messages, not its internals.
What do the OpenTelemetry agent span conventions say?
The OpenTelemetry GenAI semantic conventions now cover agents, and they are still marked Development. They moved from opentelemetry.io into the semantic-conventions-genai repository. The parts that matter for multi-agent systems:
- Two kinds of agent run.
gen_ai.operation.nameisinvoke_agentwhen the model drives control flow (an OpenAI AgentsAgent, an ADKLlmAgent) andinvoke_workflowwhen your code does (a LangGraphStateGraph, a CrewAICrew). Remote agents get a clientinvoke_agentspan. - Nesting. Nested workflows "SHOULD be reported even when nested", and the spec says not to merge tool lists across child agents or handoffs. Agent names should be low cardinality: the role, not
StateGraph. - Tools.
execute_tool {gen_ai.tool.name}, withgen_ai.tool.call.idwhen the model provides one. Arguments and results are opt-in attributes. - Handoffs. A handoff is a tool call refinement,
gen_ai.execute_tool.transfer, withgen_ai.transfer.modeset topass_controlorreturn_to_callerandgen_ai.transfer.target.namenaming the next agent. - Conversations.
gen_ai.conversation.idis set only when it is really available; the spec says not to fill it with generated UUIDs or trace IDs.
Framework support is uneven but growing. Microsoft Agent Framework emits invoke_agent, invoke_workflow and execute_tool spans. Google ADK's Cloud Trace integration emits invoke_agent and execute_tool. W&B Weave writes spans that follow the agent conventions, and Datadog can ingest GenAI semconv spans from v1.37 without its SDK. For setup details, see our guide to instrumenting AI agents with OpenTelemetry.
How do I trace agents that talk over A2A?
Propagate trace context across the call, and log the task. A2A is at version 1.0.0, is Apache 2.0 licensed under the Linux Foundation, and joined the Agentic AI Foundation in August 2026. Its enterprise guidance says A2A clients and servers "should participate in distributed tracing systems", recommends OpenTelemetry with W3C Trace Context headers, and asks you to log the taskId, session and correlation IDs and to expose request rate, error rate and latency.
OpenTelemetry has matching A2A conventions: a2a.client and a2a.server spans with a2a.task.id, a2a.task.state and a2a.message.id, and the A2A contextId becomes gen_ai.conversation.id.
Two A2A-specific things to watch. First, task states: a task stuck in TASK_STATE_WORKING, TASK_STATE_INPUT_REQUIRED or TASK_STATE_AUTH_REQUIRED is a silent stall from the caller's side. Second, the remote agent is opaque by design. If it belongs to someone else, you will only ever see the task, the messages and the artifacts, so your checks have to judge those.
What should I measure per agent and per conversation?
Measure each agent on its own, and measure the conversation as a whole. The first set finds the slow, expensive or broken agent. The second finds coordination bugs that no single agent owns.
| Metric | Definition | What it catches |
|---|---|---|
| Error rate per agent | Failed agent spans / agent invocations, by agent name | A worker that breaks after a prompt or model change |
| Tool error rate per agent | Failed tool calls / tool calls, by the agent that made them | An agent passing bad arguments to a shared tool |
| Latency share per agent | Agent's time on the request's critical path / total request time | The agent to optimize first; parallel workers only count once |
| Tokens and cost per agent | Sum over each agent's LLM spans | A planner that re-reads the whole history every step |
| Handoffs per conversation | Count of transfer spans | Routing that takes three hops to reach the right agent |
| Ping-pong rate | Conversations with A to B to A to B handoffs / conversations | Two agents that each think the other owns the task |
| Repeat rate | Same agent and tool called with near-identical input in one request | Loops between agents, or a worker re-running finished work |
| Delegation depth | Longest chain of nested agent spans | Runaway sub-delegation |
| Fan-out | Workers spawned per orchestrator run, by request type | An orchestrator that spawns ten workers for a one-line question |
| Outcome | Did the user get what they asked for, judged on the whole conversation | Everything above, from the user's side |
Two notes. Latency in a multi-agent run is about the critical path, not the sum of spans, because parallel workers overlap; our post on the latency critical path explains how to compute it. And cost per agent only means something next to outcome: a cheap agent that fails often costs more per completed task than an expensive one that works.
How do I find which agent caused a failure?
Walk backwards from what the user saw. Take the failed conversation, find the final reply, and step back through the trace one agent at a time:
- Was this agent's output wrong? If not, the failure is later, in how its output was used.
- If it was wrong, was its input right? Check exactly what the previous agent or the handoff passed it, not what that agent produced in full. Handoff input filters and summaries are where context gets dropped.
- The first agent with right input and wrong output owns the failure. If every agent had wrong input, the fault is in the first handoff.
Doing this by hand works for ten conversations. For a thousand you need counts, which is why per-agent scoping matters: run the same failure rule on each agent's part of the conversation and compare rates by agent name. Automated attribution is still a hard research problem; the evaluation guide covers what the research says about finding the failing agent.
What do multi-agent failures look like in production?
These are the shapes to write rules for:
- The ping-pong. A triage agent hands to billing, billing decides it's a technical question and hands back, triage sends it to billing again. Every handoff succeeds.
- The lost constraint. The user says "only flights under $400 with no overnight layover". The planner passes "find flights to Lisbon" to the search worker. The final answer is a $650 itinerary.
- The duplicate worker. Two workers research the same subtopic because the orchestrator's split overlapped, and the merged answer repeats itself.
- The early stop. The orchestrator answers before a slow worker returns, and the reply misses the part that worker was covering.
- The confident merge. A worker's tool call failed, it returned "no results", and the final agent tells the user there are no options. That's false success with an extra hop.
- The handoff loop with tools. Agents re-run the same lookup on each pass, which looks like the repetition pattern in single-agent conversations but spread across agents.
Rules for two of these, written as plain-English checks:
Match when the conversation is handed between the same two agents more than twice without the user sending a new message in between. Do not match when the user changes the topic.
Match when the final reply recommends or books an option that breaks a constraint the user stated earlier in the conversation (price, date, location, exclusions). Quote the constraint and the option.
Which tools monitor multi-agent systems?
All of these trace multi-agent runs; they differ in how they show the agent structure and what they do after.
| Tool | Multi-agent view | Handoffs | OpenTelemetry | Production checks and alerts | Open source |
|---|---|---|---|---|---|
| Agnost AI | One conversation per user session with agent, LLM, tool and handoff events; OpenAI Agents SDK runs record first agent, final agent and handoff path | Handoff events with source and destination agent (OpenAI Agents SDK) | OTel-native, hosted OTLP collector | Plain-English patterns judged over whole conversations, scoped by agent name; reported cost per agent; Slack, email or webhook alerts; failures to pull requests | No |
| LangSmith | Threads with Trajectory, Turns and Details views; distributed tracing joins remote LangGraph agents into one trace | Through LangGraph and framework tracing | OTLP endpoint that maps gen_ai.* attributes | Online evaluators, including multi-turn on threads; Insights categories (Plus and Enterprise) | No (SDKs are) |
| Langfuse | Agent Graphs tab, inferred from observation timing and nesting | Agent and tool observation types | OTLP over HTTP (no gRPC); maps gen_ai.conversation.id to sessions | LLM-as-a-judge evaluators on observations | Yes |
| Arize AX / Phoenix | AX Agent Trajectory: which agents call which, where loops happen, which paths fail | Automatic for OpenAI Agents (handoffs), LangGraph, AG2, CrewAI, Agno; Phoenix graphs OpenAI Agents handoffs | OTLP with OpenInference span kinds | Evals and monitors | Phoenix is |
| Datadog Agent Observability | Agent Monitoring shows tools used and which agent a task was handed to, for single or multi-agent systems | Yes | Ingests GenAI semconv v1.37+ spans without the SDK | Monitors, Insights | No |
| W&B Weave | Agents view; each turn an invoke_agent span with sub-agent handoffs, model and tool calls | Yes (OpenAI Agents SDK autopatch) | Emits and accepts GenAI agent convention spans | Not checked | Not checked |
| AgentOps | Session Waterfall and step-by-step execution graphs | Not documented | Not documented | Cost management | Yes (MIT) |
| Laminar | Traces with browser session recordings synced to spans | Not documented | OTel-native; point any OTel code at it | Signals: alerts written in plain language | Yes |
Facts from each vendor's own docs, checked December 1, 2026. Cloud agent platforms have their own views too: AWS Bedrock AgentCore's GenAI Observability dashboard shows per-agent token usage, and Microsoft Agent Framework emits OTel spans for agents and workflows that any of the tools above can read.
How to choose: if your agents are LangGraph, LangSmith is the shortest path. If you want an open-source trace store with an agent graph, Langfuse or Phoenix. If you already run Datadog, turn on Agent Monitoring. If your workers drive browsers, Laminar's synced recordings are useful. If your question is "which conversations went wrong, in which agent, and how often", that is where Agnost AI focuses.
How do I set up multi-agent monitoring?
- One trace per user request. Every agent, including remote ones, must join the same trace. For in-process agents your framework does this. Across services, propagate W3C trace context; LangSmith's
RemoteGraph(distributed_tracing=True)and A2A's guidance both rely on it. - Stable agent names. Name agents by role (
triage,billing,research_worker), never by class or instance ID. Every per-agent metric depends on it. - Record handoffs as spans. Use your framework's handoff span or
gen_ai.execute_tool.transfer, with the target agent. - Attach user and session IDs. Put them on the root span so you can group requests into conversations and count affected users, not just traces.
- Capture handoff inputs. Log what each agent actually received. Most blame questions are answered by comparing that with what the previous agent produced.
- Write outcome rules and coordination rules. One rule per failure shape above, scoped to the agents it applies to.
- Alert on rates, not single events. A ping-pong rate that doubles after a deploy is a signal. One ping-pong is noise.
- Review by agent weekly. Sort agents by failure rate and by share of cost. Read five failed conversations from the top agent.
Framework guides: OpenAI Agents SDK and LangGraph.
Where does Agnost AI fit?
Agnost AI is built for the conversation-level questions in multi-agent monitoring: which conversations failed for the user, which agent they failed in, and how often.
- It is OpenTelemetry-native, with a hosted OTLP collector and integrations for the OpenAI Agents SDK, LangChain and LangGraph, Google ADK, Mastra, Pydantic AI, CrewAI and others.
- Each conversation shows agent turns, model calls, tool calls, handoffs and guardrails in one timeline, grouped by user and session.
- With the OpenAI Agents SDK, each run records the first agent, the final agent and the handoff path, and each handoff is its own event with source and destination.
- Patterns are plain-English rules judged by an LLM over the whole conversation once it has been idle for 15 minutes. "Applies to" scopes a pattern to an agent name, so you can compare the same failure across agents. Matches feed alerts in Slack, email or a webhook.
- The Architecture page draws the system from your traces with no setup: triggers, agents, nested sub-agents and the services they call, with markers for loops inside an agent and arcs for loops between agents, viewable by spend, volume or failures. Beside the map it ranks what to fix, such as re-runs within a minute, failing scheduled jobs and deploys that changed a step's cost, and each item can go to Auto Improve or become an alert.
- Cost per agent: Agnost records the USD cost each LLM and tool span reports and adds it to the nearest agent above it, so each agent's row on the Tools page shows its spend while totals still count every call once. The Architecture page shows cost per step and per outcome against the period before and flags a step whose cost per run moved. Cost is what your traces report; Agnost does not estimate it from tokens.
- When a failure keeps recurring, Auto Improve can propose a fix, open a GitHub pull request once an experiment shows the change works, and leave the merge to you.
What to know before choosing it: judging runs in batches after 15 minutes of idle time, so it won't stop a loop while it's happening; use a step limit in your framework for that. The judge reads the readable top-level exchanges of a conversation; nested execution spans stay visible in the timeline but are not part of what the judge reads. And it isn't open source; if you need a self-hosted open-source trace store, Langfuse and Phoenix are the usual picks.
Monitoring tells you what broke in production. To check a change before it ships, continue with how to evaluate a multi-agent system.
Frequently asked questions
How do I monitor a multi-agent system in production, and which tools support it?
Trace every agent, handoff and tool call for a user request as one tree, using the OpenTelemetry GenAI agent span conventions where you can, then watch per-agent errors, latency and cost, handoff loops, and whether the user got what they asked for. Agnost AI records agents, handoffs and tool calls per conversation and judges whole conversations against plain-English rules you can scope to one agent. LangSmith, Langfuse Agent Graphs, Arize AX Agent Trajectory, Datadog Agent Monitoring, W&B Weave, AgentOps and Laminar also trace multi-agent runs.
What should I track for each agent in a multi-agent system?
Per agent: invocations, error rate, latency and its share of the request's critical path, tokens and cost, and tool error rate. Per conversation: number of handoffs, handoffs that bounce back and forth between the same two agents, repeated agent and tool calls, delegation depth, and the final outcome for the user. Per-agent numbers find the slow or expensive agent; the conversation-level ones find the coordination bugs.
How do I trace handoffs between agents?
Record each handoff as its own span with the source and target agent. The OpenAI Agents SDK emits a handoff span automatically. The OpenTelemetry GenAI conventions model a handoff as a tool call refinement, gen_ai.execute_tool.transfer, with gen_ai.transfer.mode set to pass_control or return_to_caller and gen_ai.transfer.target.name naming the next agent. Keep all agents of one request in the same trace.
How do I trace calls between agents that use the A2A protocol?
Propagate trace context across the A2A boundary. The A2A spec's enterprise guidance says clients and servers should take part in distributed tracing and recommends OpenTelemetry with W3C Trace Context headers, plus logging the task ID and correlation IDs. OpenTelemetry's GenAI conventions define a2a.client and a2a.server spans with a2a.task.id and a2a.task.state, and map the A2A contextId to gen_ai.conversation.id.
How do I find which agent caused a failure in a multi-agent system?
Start at the user-visible failure and walk the trace backwards: find the first agent whose output was already wrong, then check whether its input from the previous agent was right. If the input was wrong, the fault is upstream or in the handoff; if the input was right, it is that agent. Scoping checks to one agent, and comparing failure rates by agent name, turns one-off investigations into numbers.
Does Agnost AI monitor multi-agent systems?
Yes. Agnost AI is OpenTelemetry-native and groups agent, LLM, tool and handoff events into one conversation per user session. With the OpenAI Agents SDK it records the first agent, final agent and handoff path of every run. Plain-English patterns are judged over whole conversations, can be scoped to an agent name, and alert in Slack, email or a webhook. It is not open source and judges after a conversation has been idle 15 minutes, so it is not a real-time guardrail.
Originally published on agnost.ai.