Definition
A trace is a captured sequence of model calls, tool calls, events, timings, state changes, and outputs from an execution. In an agent system, it shows the path the run actually took through prompts, tools, permissions, retries, and decisions.
Source code describes possible behavior; the trace provides evidence about one execution. That evidence supports debugging, evaluation, cost analysis, incident response, and reconstruction of why an external effect occurred.
A useful trace carries stable run and span identifiers, component versions, causal relationships, errors, and links to produced artifacts. It also needs redaction, access control, and retention rules because prompts and tool results can contain secrets, personal data, or proprietary material.
Distinguish it from nearby terms
A trajectory is the behavior sequence. A trace is the captured record of it. Lineage connects execution evidence into reconstructable provenance across artifacts and runs. Telemetry is the broader stream of operational measurements.
Check your understanding
A trace records the final answer and latency but omits tool inputs, approval events, and state changes. It can measure response time, but it cannot explain who authorized the action or which data left the system.