
Retrace
Retrace · Coding
Retrace is an execution replay engine for AI agents. It records every model call, tool invocation, retrieval, and error inside an agent run, then lets engineers replay that run step by step. When something breaks, you fork the execution from the exact span where it went wrong. Change one input or one model. Then re-run everything downstream to see what the fix actually does.

About Retrace
What Is Retrace
Retrace is a debugging and verification platform built for teams that ship AI agents. Instead of reading logs and guessing why an agent produced a bad answer, you open the recorded run as a span tree. Then you walk it until you find the first step that failed, drifted, or returned an ungrounded result.
The product targets a specific pain. Agents behave non-deterministically, so a bug that shows up once in production is hard to reproduce. Retrace solves that by making runs replayable. You capture the execution once. Then re-execute it as often as you need.
The main limitation is scope. Retrace is a developer tool, not a no-code product, and it assumes your agent runs on the supported SDKs or talks to OpenAI, Anthropic, or Gemini. Teams on unusual stacks may need to instrument calls manually. It's also priced per trace volume. Very high-volume agents can push you up the plan ladder fast.
Getting Started
- Install the SDK with
pip install retrace-sdkfor Python ornpm install retrace-sdkfor TypeScript. - Configure your API key with
retrace.configure(api_key="rt_..."). - Wrap your agent function in the
@retrace.recorddecorator and setresumable=Trueif you want cascade fork replay later. - Run your agent once. Provider calls to OpenAI, Anthropic, and Gemini get auto-instrumented, so the trace captures them without extra work.
- Open the recorded trace, inspect the span tree, and fork from the first divergent step to test a fix.
Product Information
A quick look at Retrace's pricing, supported platforms, and performance.
Best for
The users, tasks, and scenarios where this tool fits best.
Users
- AI engineers debugging production agent failures
- Platform teams adding CI checks for agent behavior
- Founders evaluating whether an agent is production-ready
Tasks
- Reproducing a non-deterministic failure
- Testing a prompt or model change
- Verifying a fix before shipping
- Stopping runaway spend
Scenarios
- A customer reports a wrong answer and you need to find which tool call caused it
- A prompt tweak silently breaks a downstream step
- A team wants to share a sanitized example of a bug
Key features
Execution Recording
Retrace captures every model call, tool invocation, retrieval, and error as a span with its input, output, cost, and timing. Provider calls to OpenAI, Anthropic, and Gemini are auto-instrumented, so you don't have to wire up each one by hand. The result is a complete, structured record of what your agent actually did. Not a partial log. Not a guess.
Fork and Cascade Replay
This is the capability that separates Retrace from plain AI agent monitoring tools. You branch a recorded execution at a single span with a modified input, then cascade-replay every downstream step so the whole agent re-executes along the new path. It answers a question logs can't. If I change this one thing, what breaks further down?
Prove the Fix
After you change a prompt, tool, or model, prove-the-fix re-runs the failed execution and hands back a verdict. You get one of three outcomes: improved, regressed, or unchanged, plus the first divergent span. It turns "I think that fixed it" into a checkable result.
Evaluation Gates for CI/CD
The evaluate-and-gate capability scores recorded executions against behavioral criteria and returns a pass/fail gate decision for a pipeline. Teams can run behavioral checks in CI alongside their normal tests. An agent that drifts gets caught before it reaches users. Multi-agent judge detectors are available from the Pro plan up.
Budget and Guardrail Enforcement
Before your agent makes its next model or tool call, enforce-budget asks whether that call is allowed. It returns allow, block, or hold based on cost budgets, loop detection, and latency ceilings. That's how you stop a runaway loop or an expensive spend spike before it happens. Not after the bill arrives.
Semantic Search Across Traces
Search-spans runs a semantic search across recorded spans and agent memories to find prior occurrences of a behavior, prompt, or failure by meaning rather than exact text. If a similar bug appeared three weeks ago, you can surface it without remembering the exact phrasing.
Agent Memory
Retrace ships an MCP-based memory store that holds persistent facts, preferences, corrections, and patterns extracted from prior agent runs. Agents can recall them by meaning, which helps keep behavior consistent across sessions instead of relearning the same corrections every time.
Published Tapes
Publish-tape turns a scrubbed execution into an interactive, shareable tape. It's useful for bug reports, demos, and post-mortems, and PII redaction is included on every plan. The Free tier allows 10 published tapes a month.
Pros and cons
Pros
- Step-by-step replay makes non-deterministic agent failures reproducible, which is the core problem most logging tools leave unsolved.
- Fork and cascade replay test a single change against the whole downstream path, so you see side effects before they hit production.
- Auto-instrumentation for OpenAI, Anthropic, and Gemini cuts setup work to a decorator and an API key.
- The Free plan is real, not a trial: 1,000 traces, 10 fork replays, and PII redaction all included.
- CI evaluation gates let agent behavior be tested like regular code, with a pass/fail result a pipeline can act on.
Cons
- No self-serve entry below $29/mo for deterministic cassette replay, so solo developers get limited replay depth on the Free plan.
- The Free plan keeps traces for 7 days and gives one seat, which won't cover a team sharing traces.
- Support is limited to OpenAI, Anthropic, and Gemini providers, so agents on other model providers need manual instrumentation.
Frequently asked questions
Retrace records AI agent runs and makes them replayable. You capture an execution once, then replay it, fork it at any step, and test changes without needing the original failure to happen again.
Related content
Explore related tools, skills, and articles for Retrace.
Retrace Alternatives

Udon
Udon · Coding · ProductivityUdon turns an Apple Silicon Mac into a home server you run from a browser, with container controls, file shares, and an optional AI sysadmin.

offstage
offstage cloud · Coding · Productivityoffstage gives AI coding agents and CI jobs a real Mac: a fresh macOS account on Apple silicon, driven over an API and billed by the second.
BotBus
Chengdu Tuyang Tusen Technology Co., Ltd. · Coding · ProductivityBotBus lets you control AI coding agents from your phone and watch: approve commands, start tasks and read results while the code stays on your desktop.
