interactive · 11 min
A Trace Recorder
Objective: wrap a step so every decision is recorded as a structured event; the recorded trace can be printed and replayed.
policy is the Foundations MockLLM seam (a deterministic
observation -> action); Tracer wraps each step so the trajectory
becomes data you can print, assert on in tests, or replay. This minimal recorder omits the timestamp and tool fields for clarity; production events add them.
Best practice: the trace is the debugging interface and the eval input — structure it as data, never as free-form log strings.
Next: Debugging From Traces