When you instrument your AI agent with the Pendo Python or TypeScript SDK, you can send trace data alongside conversation events. Traces give you a detailed view of how your agent executes—not just what it said, but how it got there.
This article explains what tracing is, how it differs from conversation events, and how to view trace data in Pendo.
What tracing is
A trace is a record of everything your AI agent did to produce a response. While a conversation event captures the input (visitor prompt) and output (agent response), a trace captures the steps in between: the tools your agent called, the models it used, the order operations ran in, how long each step took, and where errors occurred.
Traces are made up of spans. Each span represents a single operation within your agent's execution, for example, a call to a language model, a tool invocation, or a retrieval step. Spans are nested to show which operations triggered others, giving you a full picture of your agent's behavior for any given response.
Traces versus conversation events
Both conversation events and trace data appear in Agent Analytics, but they answer different questions.
| Conversation events | Trace data | |
|---|---|---|
| What it captures | Visitor prompts and agent responses | Internal execution steps, tool calls, model usage, errors |
| Best for | Understanding what visitors ask and what agents say | Diagnosing agent behavior, debugging failures, evaluating performance |
| Available through | All integration methods | Python and TypeScript SDKs |
| Required for | Core Agent Analytics features | Conversation traces in Pendo |
You don't need trace data to use Agent Analytics. Conversation events alone power use case detection, issue identification, conversation review, and most overview metrics. Tracing is an additional layer if you want more visibility into how your agents work.
Use cases
Tracing is useful when you want to:
- Understand why an agent gave a particular response.
- Identify which tools or models are being called most frequently.
- Debug failures or unexpected outputs by seeing exactly where execution broke down.
- Measure latency across individual steps in your agent's pipeline.
- Validate that agent behavior is consistent after making changes.
Prerequisites
To send and view trace data:
- Your agent must be instrumented with the Pendo Python or TypeScript SDK. For setup steps, see Install the Python SDK to send conversation and trace data and Install the TypeScript SDK to send conversation and trace data.
- Full conversations must be activated for your agent in Pendo.
- You must be a subscription admin or assigned the AI Agent Admin role to view conversation and trace data in Pendo.
View conversation traces
When trace data is available for a conversation, Pendo surfaces it in the conversation panel in Agent Analytics. This tracing capability is automatically activated by the Python and TypeScript SDKs' standard setup, requiring no additional configuration.
Access conversation traces
- Go to Product > Agent Analytics.
- Select the agent you want to review.
- Open the Conversations tab.
- Select a conversation from the table.
- In the conversation panel, look for the View trace activity icon below a prompt or agent response. This indicates that trace data is available for that message. Select it to open the Conversation trace view.
What traces show
The conversation trace includes:
- Span tree. A hierarchical view of all operations that ran during the agent's response, showing which steps activated others.
- Waterfall timeline. A timeline view of each span, showing when it started, how long it ran, and how it overlapped with other operations.
- Error detection. Spans that produced errors are flagged, so you can identify exactly where execution failed.
- Input and output details. The input and output for each span, so you can trace data as it flows through your agent's pipeline.
Note: Conversation traces are only available for conversations where trace data was sent through the Python or TypeScript SDK. Conversations captured through the client-side or server-side methods don't include trace data.
Trace types
Every trace event includes an agentTraceType field that categorizes the specific operation being recorded. Use this field to understand what each span in the trace view represents.
| Trace type | Description |
|---|---|
llm_request |
Input data sent to a language model. |
llm_response |
Output received from a language model. |
tool_request |
Input sent to a tool, for example, read_file or search_entities. |
tool_response |
Output or data returned from a tool. |
agent_request |
A delegated call to a subagent, for example, call_quantitative_agent. |
agent_response |
Output from a subagent, or the final merged response returned to the visitor. |