AI agent observability
AI agent observability is the practice of recording what AI agents do, so a team can explain and review their actions. For each agent, the record covers:
- Sessions: the conversation, from prompt to response, with its turns in order.
- Tool calls: which tool the agent called, with what arguments, and what came back.
- Identity: the person behind each action, and the agent when an agent acts on its own credentials.
- Cost: the tokens each session used and what they cost.
IBM defines AI agent observability as “the process of monitoring and understanding the end-to-end behaviors of an agentic ecosystem, including any interactions that the AI agent may have with large language models and external tools.” Most published guidance then tells the reader to instrument the agent: add code that emits telemetry from the start.
That advice works for agents a company builds. Many of the agents employees use every day were built somewhere else: coding assistants such as Claude Code, Cursor, and Codex, and chat tools such as ChatGPT and Gemini. Nobody in the buying company can add telemetry to that code. For those agents, the record has to come from the control plane they run through.
What is AI agent observability?
AI agent observability grew out of observability for ordinary software. In the Dynatrace knowledge base, traditional observability “focuses on metrics, logs, and traces to answer one question: is my system healthy?” Agents raise a second question that health data can’t answer: why did the agent take this action?
To answer it, agent observability uses the same telemetry as traditional observability and adds signals that are unique to generative AI systems:
- The conversation. Prompts and responses, grouped into a session so a reviewer can read them in order.
- Tool interactions. Each call the agent makes to an API, a database, or another system, with its inputs and results.
- Decision paths. The sequence of steps the agent chose on the way to its goal.
- Token usage. How much model capacity each step consumed, which is also the basis for cost.
For a security or compliance reader, one more signal belongs in the definition: identity. A record of what an agent did is useful in a review only if it names who acted. That means the person who prompted the agent. When an agent authenticates with its own credentials, the record also names the agent itself and the person who authorized it.
How does AI agent observability work?
How a company gets this record depends on whose code the agent is.
Agents you build
The OpenTelemetry project puts the requirement plainly: “In order to make a system observable, it must be instrumented: That is, code from the system’s components must emit traces, metrics, and logs.” For an agent a team builds, that means adding instrumentation to the agent’s code or to the framework it runs on.
The OpenTelemetry GenAI semantic conventions give that telemetry a shared shape:
- An
invoke_agent spanrecords an agent run, and thegen_ai.conversation.idattribute ties the messages of one conversation together. - An
execute_tool span, named after the tool, records each tool call. - Conventions for the Model Context Protocol (MCP) cover requests such as
tools/call, the method an agent uses to call a tool on an MCP server.
A shared shape matters because, as the OpenTelemetry project notes, standards help teams “avoid lock-in caused by vendor or framework specific formats.” The conventions now live in their own repository and are still in Development status, so attribute names can change.
Agents you buy
A coding assistant or a chat app is someone else’s code. The buyer can’t add spans to it, so the standard advice to instrument the agent doesn’t apply. The record has to come from three places the agent touches:
- Hooks and plugins inside the agent. Coding agents such as Claude Code, Cursor, and Codex fire hooks on events such as a submitted prompt or a tool call. A plugin installed in the agent can report prompts, turns, and tool calls from those hooks. Some agents also ship an OpenTelemetry exporter that a platform can receive directly. Others have none, and the plugin supplies the whole record.
- A gateway on the tool path. When agents reach MCP servers through a gateway, the gateway authenticates the caller and can record each tool call with the person and the AI client behind it.
- The provider’s compliance and admin APIs. Some usage never touches a company device, such as a conversation in a browser chat. Providers expose it through APIs such as the Anthropic Compliance API, OpenAI Compliance Logs, the Cursor Admin API, and Google Vault, and a platform can import it after the fact.
Each source sees part of the picture:
| Source | What it records | What it misses |
|---|---|---|
| Hooks and plugins | Prompts, turns, and tool calls on the machine where the agent runs, including local tools | Agents where the plugin isn’t installed, and chats in a browser |
| Gateway | Every tool call routed through it, with an authenticated caller | Tool calls that go somewhere else |
| Provider import | Web chats and usage that device telemetry can’t see | Real-time data: imports can arrive in daily batches, and some carry no token or cost data |
A control plane collects all three, maps them to one schema, and attributes each record to a person or agent from the directory. A session from one coding agent and a session from another then look the same downstream, and one query covers both.
What should AI agent observability record?
Whether the agent was built or bought, a reviewer needs the same records:
- Session transcripts. The full conversation, with its tool calls, token usage, and duration. The transcript is how a reviewer reconstructs what happened.
- Tool calls. The tool name, its arguments, its output, and a status such as success, error, blocked, or pending. Tool calls show what the agent touched, and a blocked status shows that a control acted.
- Identity. The person behind each record and, when an agent acts on its own credentials, the agent, the person who authorized it, and the credential it used. Agent identity covers how an agent gets an identity of its own.
- Tokens and cost. Usage per session and per person. Cost often comes from the AI client’s own report, so the figure may be an estimate, and some sources carry no cost at all.
- Failures. Errors and policy blocks, counted together. A spike can mean a broken tool or a policy blocking calls, and the record should show which.
- Risk findings. Findings from risk policies, linked to the exact message that triggered them, so a reviewer can go straight from an alert to the context.
Why does AI agent observability matter now?
Much of the AI in use at work arrived through employees. Microsoft’s 2024 Work Trend Index found that 75% of knowledge workers use AI at work, and 78% of AI users bring their own AI tools. In the 2025 Stack Overflow Developer Survey, 84% of respondents said they use or plan to use AI tools in their development process, and 51% of professional developers use them daily.
Agents are also moving into the software companies already run. In August 2025, Gartner predicted that up to 40% of enterprise applications will include integrated task-specific agents by 2026, up from less than 5% in 2025.
Tools that employees bring to work are bought, not built, so the employer can’t instrument them. For the agents a company builds, the OpenTelemetry GenAI conventions are still in Development status. Neither half can wait for a finished standard, because the security team needs a record now.
How is AI agent observability different from LLM observability and APM?
Three practices sit under the broader label of AI observability, and each watches a different unit of work. A practitioner guide from Splunk draws the line this way: “LLM observability watches individual model calls. Agent observability follows a chain of calls, tools and handoffs toward a goal.” Application performance monitoring (APM), in the same guide, “tells you a service is fast and up.”
| APM | LLM observability | AI agent observability | |
|---|---|---|---|
| Unit it watches | A service and its infrastructure | A single model call | A chain of model calls, tool calls, and handoffs toward a goal |
| Question it answers | Is the service up and fast? | What did the model receive and return? | What did the agent do, why, and who did it act for? |
| Typical signals | Latency, errors, throughput | Prompt, response, latency, tokens | Sessions, tool calls, identity, tokens, and cost |
The same guide gives a rule: if an application makes one model call per request, LLM observability covers it, and once it “picks tools, plans steps or hands work between agents, you need agent observability.” APM stays in place either way for the services underneath.
Agent observability also splits by purpose. Engineering teams trace and evaluate the agents they build to improve their quality, while security teams need an audit record of who did what across every agent in use. The roundup of AI agent observability platforms compares the tools for both.
How do you implement AI agent observability?
Five steps cover both built and bought agents:
- Inventory the agents in use. List the agents a company built and the ones its employees use, including personal accounts on tools the company doesn’t govern. An agent inventory is the register this step produces.
- Capture where the agent runs or where its calls pass. Instrument the agents the company builds. For bought agents, install hooks or plugins in the agent, route tool calls through a gateway, and connect the provider’s compliance or admin APIs.
- Attach identity from the directory. Resolve each record to a person or agent from the identity provider, so it carries the groups, department, and cost center that reviews and chargeback depend on.
- Export to the stack teams already run. Send the records over OpenTelemetry Protocol (OTLP) to the observability backend or collector the security and platform teams use, with identity attributes such as the user’s email kept on each signal.
- Decide who may read what, and for how long. Transcripts and tool inputs and outputs can contain sensitive data. Decide which of them to store, who may open another person’s transcript, whether each open is logged, and how long records are kept.
How does Speakeasy provide AI agent observability?
The Speakeasy AI Control Plane records sessions, tool calls, identity, and cost for the coding agents and chat tools an organization uses, and for any agent that sends it OpenTelemetry data. Its Observability section answers four questions: what AI spend is and where it goes, which MCP servers and tools are used most, what an agent did in a session, and who in the organization has adopted the platform.
Data arrives through six capture paths, and every path lands in one OpenTelemetry-based store:
- The observability plugin. It records prompts, turns, and tool calls from Claude Code, Claude Cowork, Codex, Cursor, GitHub Copilot CLI, OpenCode, OpenClaw, and Pi. For agents with no OpenTelemetry exporter, such as OpenCode and OpenClaw, sessions, tool calls, tokens, and cost arrive entirely through the plugin.
- Native OTLP ingest. Any OpenTelemetry exporter can send traces, logs, and metrics directly.
- The device agent. On macOS, Windows, and Linux, the device agent (in beta) wires each coding agent’s telemetry to the platform and discovers the AI tools installed on the machine.
- Inference hooks. Anthropic inference hooks capture conversations across the Claude Enterprise suite, and the LiteLLM integration receives telemetry from model traffic routed through LiteLLM.
- Provider APIs. AI Integrations import claude.ai chats, ChatGPT and Codex usage, Cursor spend, and Gemini app conversations from the Anthropic Compliance API, OpenAI Compliance Logs, the Cursor Admin API, and Google Vault.
- The MCP gateway. Every tool call served by a hosted or proxied MCP server is logged, with the caller authenticated from their OAuth token and the person and client recorded with the call.
The platform maps each producer’s data to the OpenTelemetry GenAI semantic conventions. Records are attributed to the person or agent behind them and resolved against directory sync, which adds IdP groups, department, division, job title, and cost center.
When an agent authenticates, the agent is the recorded actor, along with the person who authorized the credential. The Identities roster shows which Claude, Codex, or Cursor accounts each person has used, labeled team or personal.
The records surface in four views:
- Agent Sessions opens any session to its full transcript, including tool calls, token usage, duration, and flagged risk findings. A session exports as JSON for offline analysis.
- Tool Logs is the raw execution log for every tool call the platform observes across hosted, tunneled, and shadow MCP servers, skills, and local tools. Each call shows its status (Success, Error, Blocked, or Pending), filters by agent and user, and shows the block reason for blocked calls.
- MCP Insights counts tool call volume, failures, tools used, and people, with failures that include calls blocked by policy.
- Costs shows total tokens, total cost, active users, and AI clients, with breakdowns by role and by employee. Cost is reported by the AI client, and provider integrations fill in spend for clients that don’t report it.
Admins decide what is stored. Record Tool I/O stores the inputs and outputs of tool calls, and Agent Session Capture captures prompts and responses from supported coding agents.
Reading another member’s transcript requires the chat:read scope, which no default role holds, and each transcript open is audit-logged. Tool logs and agent sessions are kept for 90 days.
Through data export, the platform sends product telemetry, risk findings, and tool call logs over OTLP/HTTP to Langfuse, Datadog, Grafana Cloud, an OpenTelemetry Collector, or another OTLP/HTTP destination.
The Speakeasy agent observability feature records sessions, tool calls, identity, and cost. It doesn’t provide span-level tracing or evaluations. Teams that need those for the agents they build can compare AI agent observability platforms that trace and evaluate.