Install
- Python
Set up
- Python
agent_framework, so the OpenTelemetry instrumentation is wired up before the framework emits its first span.
Usage
Once initialized, every agent invocation, model call, and tool execution is captured automatically:execute_tool span for each call, so they don’t need manual decoration.
Verify
Run your code and confirm the trace arrives:- In the traceroot UI: Navigate to Tracing > Traces in traceroot Cloud. You should see a trace with root span
invoke_agent Concierge— Agent Framework names each agent spaninvoke_agent <agent name>. - Via the CLI: Run
traceroot traces listto inspect your recent traces from the terminal.
What gets captured
Limitations
- Requires installing the
agent-frameworkextra viapip install "traceroot[agent-framework]". - traceroot must be initialized before importing
agent_frameworkso that OpenTelemetry listeners are attached before spans are generated. Requires OpenTelemetry >= 1.39.
Run the example
Clone the repo and run a complete multi-agent example end-to-end.Python
Run the Python example
Next steps
Python SDK Reference
Explore the full Python SDK reference and instrumentation options.
Cost Tracking
Learn how traceroot calculates token costs and tracks model spend.