Skip to content
Back to full roadmap
topicadvanced★ Pro

Deterministic Replay

Replay a failed agent run exactly with seed + mocked tools — gold for root cause analysis.

2 hours1 prereqs

When a production agent fails, the "why?" is hard. Deterministic replay:

  1. Seed model output: seed parameter (OpenAI) gives a chance to reproduce (not 100% guaranteed)
  2. Tool mock: record tool calls, mock on replay — re-run the agent without hitting real APIs
  3. Snapshot state: state snapshot before/after each LLM call
  4. Diff view: original run vs replay side-by-side

Langfuse/LangSmith support this pattern.

Prerequisites