Record any agent run as a tamper-evident, replayable log. Reproduce non-deterministic failures exactly — then diff two runs to find where, and why, they diverged.
$ retrace diff golden.flight prod.flight runs aligned · 14 events · first divergence at event 6 ┌─ ROOT CAUSE ────────────── MODEL_OUTPUT_DRIFT ─┐ │ event 6 http.response api.openai.com/chat │ │ golden "flight AI-200 … dep 2026-07-20" │ │ prod "flight AI-020 … dep 2026-07-02" │ └──────────────────────────────────────────┘ propagation chain 6 model output drifts ← root 9 tool.call book_flight(AI-020) context corrupted 12 tool.result booking mismatch ← symptom you saw ✗ traces diverge — exit 1
Agents fail in multi-step causal chains, not single calls. Retrace captures every non-deterministic input at the httpx transport layer — so replay reconstructs the exact path.
Distributed-systems record/replay rigor — event sourcing, deterministic replay, hash-linked logs, causal tracing — applied to the agent-reliability problem.
retrace.record()Wrap a run in one with block. Auto-wraps httpx, so it's the only code change.
Every LLM, tool, clock and RNG source lands in an append-only, hash-linked .flight
trace; large payloads spill to a content-addressed blob store.
retrace.replay()Re-run your real agent code with every recorded response served from the log. The network is sealed — zero API calls, zero side effects — and the exact execution path reconstructs, byte for byte.
retrace diffAlign two traces, find the first causal divergence, and classify it — model drift, tool error, context corruption, retrieval drift — showing the propagation chain from root to the symptom you actually saw.
The full loop works today: capture, sealed replay, causal diff, and the tooling to put it in CI.
Append-only, SHA-256 hash-linked .flight log with an offline verify(). An open, language-neutral spec.
A replay that can't match a request fails loud — it never silently hits the network or returns a live value.
Aligns runs, isolates the first divergence, separates root cause from downstream symptom.
Names a PROMPT_CHANGE across code versions with difflib similarity grading and inline edits.
Derives a clean provider / model / messages / usage view straight from the raw http.* events.
Emits GenAI-convention spans, so a trace drops into the observability stack you already run.
A self-contained console: gauges, span waterfall, step inspector, hash chain, run-vs-run diff.
Record once, replay in CI. A run that diverges from the golden trace fails the build with guidance.
The viewer is one self-contained HTML file — no build, no server. Open it, load a trace exported with retrace export, and step through every event with the run-vs-run diff mode.
Open the viewer →