Record Every Step
Capture LLM calls, tool invocations, retrievals, and memory operations with a single line of code. Traces are stored locally in SQLite β nothing leaves your machine.
Record, replay, and analyze agent execution traces. Local-first, open-source, with built-in failure detection.
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"},
)agent-replay analyze latestLikely 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.70The run reported success β it never raised β yet Agent Replay flags why it actually failed.