DevTools for replaying AI agent sessions. Browse, inspect, and debug your Claude Code and Cursor sessions with a timeline-based UI.
Agent Replay gives you a visual debugger for your AI coding agent sessions. It reads session data directly from your local machine (Claude Code's JSONL logs, Cursor's SQLite database) and presents them in an interactive timeline you can step through event by event.
Think of it as Chrome DevTools, but for AI agent conversations. You can see every prompt, response, tool call, file edit, and command execution in order, with syntax-highlighted diffs and output.
Run directly with npx:
npx agent-replay
Or install globally:
npm install -g agent-replay
agent-replay
Your browser opens automatically. Use --no-open to disable this.
git clone https://github.com/mttetc/agent-replay.git
cd agent-replay
npm install
npm run dev
The dev server starts at http://localhost:5173 with hot reload.
npm run build
npm start
Reads JSONL session logs from ~/.claude/projects/. Each file contains a full conversation with user prompts, assistant responses, tool calls, and token usage.
Reads Cursor's local SQLite database to extract agent sessions including composer and chat interactions.
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
Server port |
CLAUDE_DIR |
~/.claude/projects |
Path to Claude Code session data |
DEMO_MODE |
false |
Run with demo data |
src/
components/ # Svelte UI components (Timeline, DiffView, EventCard, etc.)
lib/
server/ # Server-side logic
providers/ # Data providers (Claude Code, Cursor)
types/ # TypeScript type definitions
utils/ # Shared utilities (cost calculation, formatting)
routes/ # SvelteKit pages (dashboard + session detail)
static/ # Static assets
build/ # Production build output (adapter-node)
bin/ # CLI entry point
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
git checkout -b feature/my-feature)git commit -m 'Add my feature')git push origin feature/my-feature)