Overview
Retrace is the execution replay engine for AI agents. Record, replay, fork and share agent runs.
Retrace captures every LLM call, tool invocation, and error your AI agent makes, then lets you replay, fork, and share the execution like a video.
New here? Head to Installation to record your first trace in under five minutes.
What Gets Captured
| Data | How |
|---|---|
| LLM calls | Automatic (OpenAI, Anthropic, Gemini) |
| Tool calls | Manual spans or interceptors |
| Errors | Automatic exception capture |
| Token usage | Extracted from API response |
| Cost | Calculated from model pricing |
| Duration | Measured start to end |
| Input/Output | Full request and response |
| Metadata | Custom key-value pairs |
[!NOTE] AI features like evaluations, fork replay, and memory extraction are powered by Retrace AI — no external API keys needed. Just use your Retrace API key (
rt_live_...).
[!TIP] Set
RETRACE_ENABLED=falseto disable recording in production without changing code.
Next Steps
- Recording Traces - Deep dive into the @record decorator
- Replaying Executions - Learn the tape player
- Forking - Branch and replay with modifications
- API Reference - Full REST API documentation