All documentation

Observe / guide 10

Trace and inspect agent runs

Understand the execution story behind a production response.

Copy or share.

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

  1. Start at the root run and confirm the user, session, environment, and release.
  2. Follow the waterfall to the slow or failed child span.
  3. Inspect the input and output at the boundary where the behavior changed.
  4. 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.