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.
When the silent-failure detectors reported findings on this trace, a
"Silent failures" section lists each one: failure mode, subject, severity,
state (retracted ones included), reason, evidence span ids and metrics. These
are per-trace findings, not the swallowed_error alert rule kind (formerly
silent_failure) that the alert tools manage.
When the trace compacted its context, a "Compactions" section lists each one,
whether a compaction span or a rius.compaction event on an LLM call: when,
span, trigger (auto, manual or unknown), kind, executor, tokens before and
after, window and messages. The waterfall marks the compaction and the calls
that ran on a compacted context. When LLM calls carry context, the waterfall
gains cache r/w and ctx (prompt size / window and how full) columns, and
a "Context usage" section lists each call's prompt size, cache tokens and
largest shares. Any call whose prompt shrank by 30% or more against the
previous call of the same agent is listed as a context drop, with the
compaction between the two calls if there is one and the exact
get_context_loss call that explains it: that answers "why did the context
drop at this call?". The header also carries the trace's context line.
A context_rot finding (CF-03) names its subject: context_window (the window
filled up), cutoff (the reply was cut off), a tool name (that tool's results
dominate the context), lost (history disappeared without a recorded
compaction), compacted (a compaction was recorded), thrashing (the agent
kept compacting and refilling) or compacted_unmarked (info: an automatic
compaction was inferred from the token drop, with no marker recorded).
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
}
}Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trace_id": "<trace_id>"
},
"name": "get_agent_trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id | Yes | ||
| workspace | No | ||
| include_content | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |