Trace and replay
A recording of every step, so you can see exactly why the AI did what it did.
What it is
Each step's input, observation, model output, action, tokens, cost and timing is stored as a span. A replay shows the run step by step, with screenshots or source passages where they exist.
When to use it
- Always: debugging, audits, evals and customer questions all need it
When to skip it
- Keeping screenshots or personal data forever: set retention rules
Why (the trade-off)
Agents fail in new ways. Without a trace, every failure is a mystery and every fix is a guess.
Where it sits
Ops layer, alongside the loop or pipeline. Every component writes to it.
What it needs first
- one ofAgent looporWriter agentsomething has to produce the steps being traced
What can be added to it
- builds on itTask evals in sandboxed appsTask evals in sandboxed apps needs it: failed runs must be inspectable
- builds on itProactivity evalsProactivity evals needs it: replays come from recorded traces
- builds on itOrchestration evalsOrchestration evals needs it: coordination problems show up in traces
Effect of adding it
- cost —
- latency —
- reliability ↑
- safety ↑
Learn first (AI Engineering)
Free and open-source implementations
- OpenTelemetryApache-2.0
- JaegerApache-2.0
- rrwebMITrecords browser sessions for replay
depth 4+1 production note with numbers.