Glossary · Agent architecture

Tracing (agents)

Recording each step of an agent run, such as model calls, tool calls, handoffs and guardrail checks, as linked, timed spans in one trace.

Tracing, for AI agents, is recording each step of an agent run, such as model calls, tool calls, handoffs and guardrail checks, as timed, linked spans that together form one trace of the whole operation.

Traces and spans. The model comes from distributed tracing. In OpenTelemetry, a trace is the path of a request through a system, made of spans. Each span has a name, start and end times, a span context holding the trace ID and its own span ID, a parent span, attributes, events and a status. Context propagation carries the trace across process and service boundaries, and OpenTelemetry’s default propagator uses the W3C Trace Context traceparent header.

In agent SDKs. The OpenAI Agents SDK traces by default. It records agent runs, model generations, function tool calls, guardrails, handoffs, and speech steps, and can send traces to other backends through trace processors, or be switched off. Google ADK emits OTLP traces that follow the OpenTelemetry GenAI conventions for agents. LangSmith’s A2A endpoint maps the A2A contextId to a LangGraph thread, so calls between agents can be viewed together.

What traces are for.

  • Debugging: finding the step where a run went wrong, such as a bad tool argument or a skipped check.
  • Evaluation: Anthropic’s eval guidance treats the transcript of each trial as what graders inspect.
  • Cost and latency: spans show which steps take time and tokens.

Traces capture prompts and outputs, which can include personal data. OpenTelemetry’s GenAI conventions make message content opt-in and warn that it is likely to contain sensitive information.

Traces and receipts. A trace is one party’s diagnostic record, often sampled and kept in its own tools. When two organizations’ agents settle something, each side can trace its own half, but a record both can rely on later needs signatures and tamper evidence, which is what an audit trail or a receipt adds.

Neighbouring terms. OpenTelemetry is the common format for traces. Agent evaluation reads them.

Sources

  1. OpenTelemetry documentation: Traces (accessed )
  2. OpenTelemetry documentation: Context propagation (accessed )
  3. OpenAI Agents SDK documentation: Tracing (accessed )
  4. Agent Development Kit documentation: Traces (accessed )
  5. LangSmith documentation: A2A endpoint in Agent Server (accessed )
  6. OpenTelemetry GenAI semantic conventions: Model spans (accessed )