Agent Trace
A structured log of every step an AI agent took during a single run—each LLM call, tool invocation, intermediate decision, token count, latency, and outcome. Traces are the primary debugging artifact for production agents: when a customer reports a bad outcome, the trace shows exactly which retrieval missed, which tool returned the wrong data, or which model decision led the run astray. Observability platforms (LangSmith, Braintrust, Arize, Logfire) specialize in capturing and querying agent traces. A trace is the debugging view of a run; when the same reasoning-and-action record is retained durably and made tamper-evident, it becomes the audit trail that underpins accountability — the trace answers 'why did it do that?', the audit trail proves it later.
Frequently asked questions
- What should an agent trace include?
- At minimum: input, output, model used, tool calls (with arguments and results), token counts, latency per step, and final cost. Production traces also add: user/session ID, version of the agent, retrieval results with scores, intermediate reasoning, and any guardrail decisions (escalation, refusal, retry). Anonymize PII before storage.
- How long should traces be retained?
- Common policy: 30–90 days for routine debugging; 12 months for traces tied to incidents, audits, or fine-tuning data sets. Regulated industries (healthcare, finance) may require longer retention. Sample older traces for storage cost control.