Get Agent Trace
get_agent_traceGet one agent trace's span waterfall (spans in time order, indented by depth).
The header names the root span's agent and each row carries its own, so a
multi-agent run shows which agent owned which span; pass either name back to
list_agent_traces or list_spans as agent to see that agent's other work.
The header also names who sent the trace — the sending ingest key's own
email, which a console-made key usually carries too (it falls back to
its creator's own email). Blank only when the key could not be resolved
or the trace predates attribution.
The header also names the root span's session; pass it to
list_spans(session_id=...) for the rest of that conversation. A session
equal to the trace id means the run carried no session of its own. A trace
whose spans carry more than one session gets a per-span session column.
trace_id: the trace id (from list_agent_traces).
workspace: optional workspace id, name, or org-name/workspace-name when
the same name occurs in two of your orgs (defaults to your default;
use list_workspaces to discover them).
include_content: when true, also return each span's captured content: LLM
input/output messages, agent/tool input/output values, status messages and
events. Off by default because full message content can be very large; pass
true when you need to see what an LLM, agent, or tool span actually said,
received, or returned (e.g. to inspect prompts, completions, or tool I/O).
Captured content is subject to the workspace's privacy controls: spans exported with capture_content=False or a mask have nothing extra to show.
Example:
Break down trace 4bf92f3577b34da6a3ce929d0e0e4736 for me.
{
"name": "get_agent_trace",
"arguments": { "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736" }
}What did the LLM actually say in that failed span?
{
"name": "get_agent_trace",
"arguments": {
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"include_content": true
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id | Yes | ||
| workspace | No | ||
| include_content | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |