Skip to content

Agent ReplayTime-travel debugging for AI agents

Record, replay, and analyze agent execution traces. Local-first, open-source, with built-in failure detection.

Quick Example ​

python
from agent_replay import trace, event

with trace("research-agent", task="Find latest pricing"):
    event.llm_call(
        provider="openai", model="gpt-5.5",
        input_messages=[{"role": "user", "content": "Find latest pricing"}],
        output_message={"role": "assistant", "content": "I'll search the pricing page."},
        usage={"input_tokens": 1200, "output_tokens": 300},
    )
    event.tool_call(
        name="browser.search",
        input={"query": "pricing page"},
        output={"url": "https://example.com/pricing"},
    )
bash
agent-replay analyze latest
text
Likely root cause:
  β€’ Tool 'ticketing.update' returned an error but the agent continued
    and treated the run as successful. β€” ignored_tool_result
Severity: high   Confidence: 0.70

The run reported success β€” it never raised β€” yet Agent Replay flags why it actually failed.

Released under the Apache 2.0 License.