Trace and inspect agent runs
An agent trace is the connected record of a run: the root request, child spans, model generations, retrieval, tools, timing, tokens, cost, and errors. Start with the run that produced the wrong or surprising result.
Read a trace in order
- Start at the root run and confirm the user, session, environment, and release.
- Follow the waterfall to the slow or failed child span.
- Inspect the input and output at the boundary where the behavior changed.
- Compare the prompt version, model, tool arguments, and quality scores.
Use the TypeScript SDK, the Python SDK, or OpenTelemetry to preserve those relationships at ingestion time.