Agent Analytics

Route: Analytics → Agents (/analytics/agents)

Where LLM Analytics counts calls, Agent Analytics counts runs — a multi-step agent workflow with reasoning steps, tool calls, and several model calls inside one unit of work.

Agent analytics overview


Prerequisite: your spans must be labelled as agent work

This page aggregates spans carrying OpenTelemetry gen_ai.* agent attributes. They arrive two ways:

  1. Automatically, from auto-instrumented agent frameworks — CrewAI, AG2/AutoGen, LangChain, LlamaIndex, OpenAI Agents, Letta, Phidata, ControlFlow, Julep, Dynamiq.
  2. From your own code, via @trace(role=...):
@trail.trace(role="agent")          # → gen_ai.operation.name = "agent"
def research_agent(question): ...

@trail.trace(role="agent step")     # → gen_ai.operation.name = "execute_task"
def plan_next_action(state): ...

@trail.trace(role="tool")           # → gen_ai.operation.name = "execute_tool"
def search_web(query): ...

Tool and step spans inherit the enclosing agent's name automatically, so every step of a run is attributed to the agent that performed it.

If this page is empty but Tracing shows data, your spans lack these roles. Add them — Manual Tracing.


Stat cards

Agent stat cards

Card Meaning Watch for
Agent Runs Complete agent executions in the window Volume trend
Active Agents Distinct agent names seen A sudden drop means an agent stopped being invoked
Tool Calls Total tool invocations across all runs Rising sharply against flat runs = the agent is thrashing
Avg Steps / Run Mean reasoning steps per run Creeping up means the agent is taking longer to converge
Failure Rate Share of runs ending in error The single best health signal on this page
Total Cost Cost of all LLM calls inside those runs Agent runs cost multiples of a single call — watch this

Avg Steps / Run is the metric to watch after a prompt change. A prompt edit that quietly pushes average steps from 4 to 9 roughly doubles cost and latency without changing any single call's price.


Activity chart

Agent activity over time, on the same time range as the rest of the page.

Agent activity chart

Read it alongside Failure Rate: a spike in activity with a matching spike in failures usually means retry amplification — one failing dependency causing many retried runs.


The three tabs

Agent analytics tabs

Runs tab

Individual agent executions — the newest first.

Agent runs tab

Each row is one run: which agent, when it started, how long it took, how many steps and tool calls it made, its cost, and whether it succeeded. Click a run to open its trace and read the whole execution step by step in Tracing.

Typical use: sort by duration to find the slowest runs, or filter to failures and open the first one.

Agents tab

Aggregated per agent name.

Agents tab

This is how you find the weak link in a multi-agent system. In a crew of five, one agent is usually responsible for most of the failures, most of the cost, or most of the latency — and this table names it in seconds.

The agent name comes from the function name you decorated with role="agent", so name those functions meaningfully: research_agent, not run.

Tools tab

Aggregated per tool.

Tools tab

Where agent latency actually goes. A slow external API called on every step dominates run duration far more often than model latency does.

Watch for:

  • A tool with a high error rate — the agent is probably burning steps retrying it.
  • A tool called far more than expected — a loop the agent can't exit.
  • A tool never called — dead capability, or a description the model never selects.

Worked example — "our agent got slow"

  1. Avg Steps / Run — up? The agent is taking longer to decide, not running slower per step.
  2. Tools tab, sort by average duration — is one tool dominating?
  3. Agents tab — is it one agent or all of them?
  4. Runs tab, sort by duration, open the slowest run.
  5. In the trace, read the span tree: repeated identical tool calls mean a loop; long gaps between spans mean waiting on something external.

Related