Rewind is a time-travel debugger for AI agents. It records every LLM call your agent makes, then lets you inspect, fork, replay from failure, and diff timelines — without re-running (or paying for) the steps that already succeeded.
pip install rewind-agentThis installs both the Python SDK and the rewind CLI. The native binary is auto-downloaded on first use — no Rust toolchain required.
curl -fsSL https://raw.githubusercontent.com/agentoptics/rewind/master/install.sh | shcargo install --git https://github.com/agentoptics/rewind rewind-cligit clone https://github.com/agentoptics/rewind.git
cd rewind
cargo build --release
# Binary at ./target/release/rewind (no dependencies)30 seconds to your first recording:
# 1. Start the recording proxy (forwards to OpenAI)
# Add --replay to enable instant replay caching
rewind record --name "my-agent" --upstream https://api.openai.com --replay
# 2. In another terminal — point your agent at the proxy
export OPENAI_BASE_URL=http://127.0.0.1:8443/v1
# 3. Snapshot your workspace before the agent runs
rewind snapshot . --label "before-agent"
# 4. Run your agent as usual
python3 my_agent.py
# 5. See what happened (trace view, interactive TUI, cache stats)
rewind show latest
rewind inspect latest
rewind cache
# 6. Something broke? Roll back
rewind restore before-agentThe rewind demo command seeds sample data so you can explore the TUI, web dashboard, and CLI without needing any API keys:
rewind demo && rewind inspect latestIf your agent is Python, you can skip the proxy entirely:
from rewind_agent import intercept
intercept.install() # patches httpx / requests / aiohttp; recording starts
# … your existing code unchanged …This is the HTTP intercept path — works with any HTTP-based LLM client (OpenAI SDK, Anthropic SDK, LangChain, custom gateways via custom predicates, etc.). See the HTTP Intercept Quickstart.
Rewind sits between your agent and the LLM API. Point it at any provider:
# OpenAI
rewind record --upstream https://api.openai.com
# Anthropic
rewind record --upstream https://api.anthropic.com
# AWS Bedrock (via gateway)
rewind record --upstream https://your-bedrock-gateway.com
# Any OpenAI-compatible API (Ollama, vLLM, etc.)
rewind record --upstream http://localhost:11434| Provider | Non-streaming | Streaming (SSE) |
|---|---|---|
| OpenAI (GPT-4o, o1, etc.) | Yes | Yes |
| Anthropic (Claude) | Yes | Yes |
| AWS Bedrock | Yes | -- |
| Any OpenAI-compatible (Ollama, vLLM, LiteLLM) | Yes | Yes |
For a deeper look at how recording works — the five ways to record + replay (direct mode, HTTP intercept, cached_llm_call, proxy mode, and dashboard runners), agent hooks, and streaming — see recording.md. Operator-driven replays from the dashboard ("Run replay" button against a registered runner) are documented in runners.md.