Get Trace or Span Detail
Retrieve detailed trace information with hierarchical span tree, or a specific span within the trace.
Without span_id parameter: Returns the full trace with hierarchical span tree:
- Trace metadata (ID, status, duration, context)
- Hierarchical tree of all spans
- Each span includes timing, status, and type-specific metadata
With span_id parameter: Returns details for a specific span within the trace:
- Span metadata (ID, name, type, timing)
- Status and error information
- Type-specific attributes (model, tokens, tool params, etc.)
Span Hierarchy (full trace):
The tree field contains root spans, each with potential children.
This recursive structure represents the execution flow:
Agent.run (root)
├─ LLM.invoke
├─ Tool.execute
│ └─ LLM.invoke (nested)
└─ LLM.invoke
Span Types:
AGENT: Agent execution with input/outputLLM: Model invocations with tokens and promptsTOOL: Tool calls with parameters and results
Documentation Index
Fetch the complete documentation index at: https://docs.agno.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Optional: Span ID to retrieve specific span
Optional: Run ID to retrieve trace for
Database ID to query trace from
Response
Trace or span detail retrieved successfully
- TraceDetail
- TraceNode
Detailed trace information with hierarchical span tree
Unique trace identifier
Trace name (usually root span name)
Overall status (OK, ERROR)
Human-readable total duration
Trace start time (Pydantic auto-serializes to ISO 8601)
Trace end time (Pydantic auto-serializes to ISO 8601)
Total number of spans in this trace
Number of spans with errors
Time when trace was created (Pydantic auto-serializes to ISO 8601)
Hierarchical tree of spans (root nodes)
Input to the agent/workflow
Output from the agent/workflow
Error message if status is ERROR
Associated run ID
Associated session ID
Associated user ID
Associated agent ID
Associated team ID
Associated workflow ID