AI Agent Observability Guide: Tracing Actions & Tool Calls (July 2026)

You're running an agent in production, and your current tracing setup captures the model's reasoning just fine. What it misses is everything after the reasoning: the tool that was called, the arguments that were passed, the external state that changed, the retry that silently masked a failure. AI agent observability requires instrumentation built around action execution, and the gap between what most teams are logging today and what they actually need is where production failures accumulate. Here's how to close it.
TLDR:
- Agent observability covers 4 domains standard LLM tracing misses: tool calls, state changes, reasoning traces, and error recovery
- Tool calls fail between 3 and 15% of the time in production, and a single failure can cascade silently across a multi-step workflow
- Logging what an agent said is observation; recording what it changed in the world, and blocking unsafe actions before they execute, is enforcement
- Tracing across multi-agent workflows requires a shared trace ID threading through every hop, or root cause attribution becomes guesswork
- Openlayer captures full agent execution traces across tool calls, decision nodes, and reasoning chains, with runtime gates that block out-of-policy outputs before they leave the inference boundary
What AI Agent Observability Actually Covers
AI agent observability covers a fundamentally different surface area than LLM observability. With a standard LLM call, you're watching inputs go in and text come out. With an agent, you're watching a system that reasons, decides, and then acts on those decisions across multiple steps, tools, and external services.
There are four core domains that agent observability needs to cover:
- Reasoning traces: the chain of thought steps, intermediate decisions, and planning outputs the agent produces before it acts. These are more than useful for debugging; they're the record that tells you whether the agent understood the task correctly before doing anything about it.
- Tool call behavior: which tools were invoked, with what arguments, in what order, and what each returned. A reasoning trace without tool call data is incomplete, because the action taken is often more consequential than the reasoning that preceded it.
- State changes and side effects: writes to databases, POST requests to external APIs, file modifications, calendar entries created. These are the artifacts that persist after the agent finishes, and they're what make agent failures materially different from a bad text response.
- Error handling and recovery: where the agent retried, where it failed silently, and where it chose a fallback path. An agent that recovers gracefully from a tool error and an agent that loops indefinitely look identical in a simple success/failure log.
Traditional LLM observability tools were built to handle the first category. The other three require an observability approach designed around action execution, beyond output generation alone.
Why Agents Demand a Different Observability Approach
Traditional LLM observability was built for a simpler world: a prompt goes in, a response comes out, and you log both. That model breaks down the moment your agent starts taking actions.
Agents don't just generate text. They call tools, write to databases, trigger API requests, and hand off tasks to sub-agents. Each of those steps can fail silently, produce downstream consequences, or compound errors across a multi-step chain before anything surfaces in a log. By the time a failure becomes visible, several irreversible actions may have already executed.
There are a few structural reasons why standard LLM tracing falls short here:
- Agents operate across multiple hops, so a single trace covering prompt and response misses everything that happened in between: the tool calls, the intermediate reasoning steps, the branching decisions that determined which action fired next.
- Actions change external state. A logged output can be reviewed and ignored; a committed database write or a fired API call cannot be unlogged. The observability requirement moves from recording what was said to recording what was done and whether it should have been.
- Agent behavior is non-deterministic across runs. The same goal, given to the same agent twice, may produce different tool call sequences. Reproducing a failure requires a complete execution record, well beyond the final output alone.
This is why AI agent observability requires its own instrumentation model, one that traces decisions and actions, not token streams alone.
What to Trace When an Agent Executes Actions
Tool calls have already fired. Database records have been written. External APIs have received state-changing requests. By the time an observability layer registers what happened, the agent has moved on to its next step.
Tracing agent actions requires a different mental model than tracing LLM outputs. Text generation is stateless from the world's perspective. Actions are not. Here is what to capture at each layer:
Tool Call Traces
Every tool invocation needs a record of the tool name and version, the exact input arguments passed, the raw output returned, latency, and whether the call succeeded or failed. That last detail matters more than it might seem: a tool that returns a result but modifies external state on the way there may succeed from the agent's perspective and cause a problem from yours.
Action Outcome Traces
Beyond the call itself, trace what the action produced in the world. Did a record get written? Did an API endpoint change state? The difference between "the tool ran" and "the world changed" is where most agent observability gaps live.
Reasoning-to-Action Traces
Capture the chain from the LLM's reasoning step to the tool selection decision. When an agent picks the wrong tool or passes malformed arguments, the failure usually originates in the reasoning trace, not the tool call itself.
Retry and Fallback Traces
Agents that retry failed actions or fall back to alternate tools can mask systematic failures behind apparent success. Log every retry attempt, the triggering condition, and the final resolution.
Traces, Spans, and the OpenTelemetry GenAI Standard
Observability for AI agents borrows its structural vocabulary from distributed systems tracing, and the OpenTelemetry GenAI semantic conventions are where that vocabulary gets standardized. Understanding how traces and spans map onto agent behavior is foundational before getting into what to capture at each layer.
A trace represents the full execution of a single agent run, from the moment a user request arrives to the moment a final response is returned or an action completes. Within that trace, spans are the individual units of work. Each LLM call, each tool invocation, each memory read, and each routing decision gets its own span with a start time, end time, and a set of attributes describing what happened.
There are a few span types worth distinguishing:
- LLM spans capture the model call itself, including the prompt sent, the completion received, the model version, token counts, and latency. These are the spans most teams instrument first.
- Tool spans wrap external calls: a web search, a database query, a file write, an API POST. These spans record what was called, with what arguments, and what came back.
- Agent spans sit above both, representing a full reasoning cycle where the model decided what to do and then did it. They parent the LLM and tool spans that executed within that cycle.
The OpenTelemetry GenAI semantic conventions provide a shared schema for these span types, standardizing attribute names like gen_ai.request.model, gen_ai.usage.input_tokens, and gen_ai.tool.name so that traces from different frameworks and SDKs remain comparable. For teams running agents in production, this matters because it keeps traces interpretable across infrastructure boundaries without custom parsing logic for each integration.
Key Metrics to Monitor Beyond Latency and Token Count
Latency and token count tell you whether an agent ran. They tell you almost nothing about whether it ran correctly.
When an agent executes actions in the world, the metrics that matter shift from performance to correctness, safety, and reliability of execution. There are four primary categories to track.
| Metric Category | What It Measures | Key Signal | Why Latency/Token Count Misses It |
|---|---|---|---|
| Tool Call Accuracy & Failure Rate | Success rate, argument validity, and retry frequency per tool type | Tool calling fails 3 to 15% of the time in production; a single failure can cascade silently across a multi-step workflow | A timed-out or malformed tool call may still complete within latency bounds while corrupting downstream steps |
| Action Outcome Correctness | Whether the action produced the intended external state after execution | HTTP 200 does not confirm correct state change; post-execution state must be checked against expected state | Token count reflects inference cost, not whether the world was changed correctly |
| Plan Coherence & Step Relevance | Whether each reasoning step follows logically from the prior goal state | Tool selection irrelevant to the current goal is a leading indicator of goal drift before any external harm occurs | Latency measures wall-clock time per step; it cannot distinguish a correct step from a drifted one at the same speed |
| Cost Per Completed Goal | Total spend across all tool calls and LLM inferences in a session, end to end | Raw token counts flatten across steps; cost per goal is the signal needed for production budgeting | Per-call token counts obscure which steps drive budget overruns across a multi-step chain |
Tool Call Accuracy and Failure Rate
Track whether tool calls succeed, return valid results, and complete within expected bounds. tool call failure rates in production across common agent frameworks, and a single failed tool call can cascade through a multi-step workflow silently.
- Tool call success rate per tool type, so you can identify which integrations degrade most often.
- Argument validity at call time, catching malformed parameters before they reach external systems.
- Retry frequency, which often signals upstream prompt ambiguity more than tool instability.
Action Outcome Correctness
Whether the action produced the intended result matters more than whether it completed. This requires tracing the output state after execution against an expected state; checking the HTTP status code is insufficient on its own.
Plan Coherence and Step Relevance
Each reasoning step should follow logically from the prior one. Incoherent plans, where an agent selects a tool irrelevant to the current goal state, are a leading indicator of goal drift before any external harm occurs.
Cost Per Completed Goal
Raw token counts flatten across steps. Cost per completed goal, measured end to end across all tool calls and LLM inferences in a session, gives the signal you actually need for production budgeting.
Observability Across Multi-Agent and Multi-Step Workflows
Single-agent pipelines are relatively straightforward to trace: one model receives input, reasons, acts, and returns output. But production agents rarely stay that simple. Orchestrators spawn subagents, subagents call tools, tools trigger downstream API calls, and the whole sequence may branch conditionally based on intermediate results, a complexity inherent to multi-agent system architecture.
Here is where AI agent observability gets structurally harder.
Tracing Across Agent Boundaries
When one agent hands off context to another, the trace must carry across that boundary. If subagent B receives a degraded or hallucinated context packet from agent A, and B's output is later flagged as wrong, the root cause lives in A's trace, not B's. Without a shared trace ID threading through the full call graph, that causal link is invisible.
The same logic applies to tool calls that mutate shared state. If two agents write to the same external resource in sequence, the order of those writes matters. Your observability layer needs to record what each agent did, when it did it, and in what relation to every other action in the workflow.
What to Capture at Each Hop
- At every agent invocation, record the full context passed in, the model version used, latency, and the structured output returned before any downstream agent consumes it.
- At every tool call boundary, log the tool name, input parameters, response payload, and whether the call succeeded, failed, or timed out.
- At handoff points between agents, capture the state of shared memory or context objects so drift introduced at one hop can be isolated from drift introduced at another.
Observability tools that only trace at the top-level orchestrator miss everything that happens inside subagent execution, which is a key differentiator when comparing AI agent evaluation platforms. That gap is where silent failures accumulate.
Challenges in Implementing AI Agent Observability
Implementing AI agent observability is genuinely harder than monitoring a static LLM endpoint, and the difficulty comes from a few structural properties of agents that don't appear in simpler systems.
The core friction points
Here are the properties that make agent observability technically demanding in practice:
- Non-deterministic execution paths: the same input can produce a different sequence of tool calls on different runs, so you can't define expected behavior as a fixed trace. Anomaly detection requires learning what "normal" looks like across a distribution of paths, not against a single template.
- Multi-step causality: when an agent produces a bad final output, the failure may have originated three tool calls earlier. Without full trace context linking each action to its downstream effects, root cause investigation becomes guesswork.
- External state side effects: a tool call that writes to a database or fires an API request has already changed the world before any monitoring layer sees the result. These side effects are irreversible in ways that LLM text outputs are not. Logging after the fact is observation; the enforcement has to happen before execution.
- Latency and cost compounding: a single agent run may chain dozens of LLM calls and tool invocations. Without per-step cost and latency instrumentation, you can't identify which steps are responsible for budget overruns or timeout failures.
- Ephemeral context window state: the memory and context an agent carries between steps isn't automatically recorded anywhere, so reconstructing why a particular decision was made requires deliberate trace design; output logging alone is insufficient.
The Boundary Between Observability, Evaluation, and Governance for Agents
These three concepts overlap in practice, but they cover distinct territory that matters for how you build your agent stack.
Observability is about what happened at runtime: which tools fired, what inputs flowed in, what outputs came back, how long each step took, and where the execution path broke. Evaluation asks whether what happened was any good: did the agent reason correctly, select the right tool, produce a grounded answer, complete the task? (See the agent evaluation complete guide for a deeper treatment of these criteria.) Governance asks whether the system is operating within defined policy bounds across time: are behavioral thresholds holding, are audit records complete, and can you prove compliance if asked? For example: an agent that routes PII to a non-approved API triggers a policy violation logged to the audit record. (For a full treatment, see the production agent governance guide.)
For agents, the three functions are tightly coupled in ways that static LLM deployments are not.
- Observability without evaluation leaves you with execution logs but no signal on whether the agent's decisions were correct. You can see that a tool was called; you can't tell if calling it was the right move.
- Evaluation without observability means you're scoring outputs in isolation, disconnected from the multi-step context that produced them. A correct final answer can still reflect broken reasoning in the steps before it.
- Governance without both is documentation without evidence, a distinction covered in depth when comparing runtime AI controls vs compliance docs. Policy exists on paper; whether the running system respects it is unknown.
Agent monitoring requires all three layers working together, because the artifact that matters in an agentic system is the full execution trace, not a single input-output pair.
Openlayer for AI Agent Observability
Openlayer is a unified evaluation, observability, and governance platform. For AI agents, that means capturing the full execution trace: every tool call, every decision node, every external action taken, and the reasoning chain that connected them.
The core capability set covers what agent monitoring actually requires in production:
- Trace-level visibility into multi-step agent runs, including tool inputs, tool outputs, intermediate reasoning steps, and final responses, all linked under a single session ID so the full execution path is reconstructable after the fact.
- Automated quality checks on agent outputs using 100+ pre-built tests, with LLM-as-a-judge scoring that reaches 81.3% human correlation for assessing reasoning quality at scale.
- Runtime enforcement gates that block unsafe or out-of-policy outputs before they leave the inference boundary, stopping them at source instead of flagging them for post-hoc review after the fact.
- Drift and regression detection across agent behavior over time, with threshold-based alerts that trigger when performance falls outside approved bounds.
That last distinction matters. Logging an anomalous tool call is observation. Blocking the action until a named reviewer clears it is enforcement. Openlayer provides both, and the gap between them is where most agent monitoring setups fail.
Final Thoughts on AI Agent Observability
Agents do not fail the way LLMs fail. A bad text response is recoverable; a committed database write or a fired API call is not, and by the time a simple log surfaces the problem, the damage is already done. Your observability layer needs to be designed around what the agent did, what it changed in the world beyond what it said, with full trace coverage across every tool invocation, every branching decision, and every external side effect. Reach out to the Openlayer team to see how that kind of trace-level coverage works in a production agent setup.
FAQ
What's the difference between AI agent observability and standard LLM monitoring?
Standard LLM monitoring traces a prompt going in and text coming out. AI agent observability covers four distinct layers that LLM monitoring misses entirely: reasoning traces that record the chain of thought before any action fires, tool call behavior including exact arguments and outputs, state changes and side effects written to external systems, and retry or fallback paths that can mask systematic failures behind apparent success. The distinction matters because an agent's actions change external state in ways that cannot be unlogged, while a bad text response can simply be ignored.
How should I instrument multi-agent workflows where one agent's bad output becomes another agent's input?
Carry a shared trace ID across every agent boundary, and capture the full context packet at each handoff point before any downstream agent consumes it. Without that shared ID threading through the call graph, a hallucinated context passed from agent A to agent B looks like agent B's failure in the trace, and the root cause is invisible. At every tool call boundary, log the tool name, input parameters, response payload, and success or failure status separately from the reasoning span that triggered it.
What metrics should I track for AI agent observability beyond latency and token count?
Four categories matter beyond latency and token count. First, tool call success rate per tool type, since tool calling fails between 3 and 15% of the time in production and a single silent failure can cascade across a multi-step workflow. Second, action outcome correctness: whether the action produced the intended external state, beyond whether the HTTP call returned 200. Third, plan coherence across steps, since an agent selecting a tool irrelevant to its current goal state signals drift before any external harm occurs. Fourth, cost per completed goal measured end to end across all tool calls and LLM inferences in a session, which gives the production budgeting signal that raw token counts flatten.
Openlayer vs. Langfuse for AI agent observability: which handles runtime enforcement?
Langfuse offers strong diagnostic observability: it traces agent execution paths, logs tool calls, and surfaces latency and cost data across multi-step runs. Where it currently stops is runtime enforcement: Langfuse delegates that responsibility to third-party libraries like LLM Guard or NeMo Guardrails, leaving enforcement to external tooling at the inference boundary itself. Openlayer provides both trace-level visibility into full agent execution paths and runtime enforcement gates that block unsafe or out-of-policy outputs before they leave the inference boundary. For agents taking actions against production databases and external APIs, the difference is structural: logging that an unauthorized tool call occurred after it has already executed is observation, not control.
Can I build AI agent observability without instrumenting every individual tool call manually?
Yes, if your agent framework supports native SDK integrations. Openlayer's integrations with the Anthropic Claude Agent SDK, LangChain, LangGraph, and OpenAI Agents SDK automatically trace agent operations, tool use, tool results, and MCP tool calls through a context manager wrapper without requiring custom instrumentation at each tool boundary. For teams not on those frameworks, the OpenTelemetry GenAI semantic conventions provide a standardized schema for span types and attribute names so traces remain comparable across infrastructure boundaries without custom parsing logic per integration.





