agent-replay
Replay, scrub and share AI coding-agent sessions as one self-contained HTML file.
# install once (the PyPI package is called agent-reel; the command is agent-replay)
uv tool install agent-reel # or: pipx install agent-reel / pip install agent-reel
agent-replay latest # replay your most recent Claude Code session
agent-replay <session-id> -o replay.html
agent-replay --list # recent Claude Code, Codex and Cursor sessions (10 each; --limit N)
agent-replay cursor:latest # your latest Cursor chat
agent-replay codex:latest # your latest Codex CLI session
agent-replay <session-id> --fork-at 42 -o context.md # export steps 1-42 as Markdown
# or run without installing
uvx --from agent-reel agent-replay latest
The demo is a fully synthetic session: examples/demo-session.jsonl
(regenerate with python examples/make_demo_session.py). Try the real viewer on it with
agent-replay examples/demo-session.jsonl --open, or open the rendered
docs/index.html (GitHub Pages: serve the /docs folder).
Why
Agent runs are long, opaque and hard to share. agent-replay turns a session log into a
single HTML file you can open anywhere, attach to a PR, or post in a thread: no server, no
account, no network calls.
Features (v0.1)
- Timeline + scrubber: prompts, replies, thinking, tool calls and results; play, step, or drag
- File diffs for every
Edit/MultiEdit/Write, colored inline - Summary header: duration, prompts, tool calls, files touched, lines +/−, tokens, errors
- Fork from here: pick any step and export the conversation up to it as Markdown context you can paste into a
new agent session (button in the viewer, or
--fork-at Non the CLI) - Filter chips per event type and tool (Edit, Write, Bash, …), color-coded; navigation skips hidden events
- Idle-gap markers: long pauses (resumed sessions) show as "⏸ 3 days later" and don't inflate timestamps
- Search across the whole session; keyboard nav (
←/→,j/k,space,Home/End) - Secret redaction on by default: API keys, tokens, private keys, URL credentials,
*_PASSWORD=style assignments and high-entropy strings are masked - Zero dependencies, light/dark theme, works fully offline
Privacy
Cursor's database also holds your login tokens. agent-replay opens it read-only and only reads
composerData: / bubbleId: keys (a test enforces this).
Sessions contain your code, prompts and sometimes secrets. Redaction is best-effort, not a guarantee:
skim a replay before sharing it publicly. Use --no-redact only for your own eyes.
Supported agents
| Agent | Status |
|---|---|
Claude Code (~/.claude/projects/**/*.jsonl) |
✅ |
Aider (.aider.chat.history.md) |
✅ agent-replay path/to/repo. Edits are rebuilt from SEARCH/REPLACE blocks; the log has no per-message timestamps or token counts |
Codex CLI (~/.codex rollout files) |
✅ agent-replay codex:latest, or codex:<id> from --list (also found via $CODEX_HOME). apply_patch becomes Edit/Write/Delete with diffs, shell calls become Bash. Built from the documented rollout format; not yet verified against many real sessions, so please open an issue if one renders wrongly |
Cursor (chat database state.vscdb) |
✅ agent-replay cursor:latest, or cursor:<id> from --list. Read-only; only chat keys are read. Tool names are normalized (Read/Edit/Bash/…). Subagent chats are followed: their steps appear under the Agent call, tagged subagent (and left out of --fork-at context) |
| Codex CLI, … | 🙋 contributions welcome, see below |
Claude Code's log format isn't a stable API, so the parser is lenient and skips what it doesn't understand. If a new version breaks something, please open an issue with an anonymized sample.
Architecture
logs ──▶ parsers/<agent>.py ──▶ Session/Event (models.py) ──▶ redact ──▶ analyze ──▶ render ──▶ .html
Only parsers/ knows about a specific agent. To add one, write a module that returns a
Session and register it in parsers/__init__.py.
Development
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -q && ruff check .
Roadmap
- Fork-from-step: export the conversation up to step N as Markdown context
- Run-vs-run diff
- Aider
- Cursor
- Codex CLI
- More agents (Gemini CLI, Copilot CLI)
- Live tailing of a running session
Contributing
Re-record the demo GIF with python scripts/make_demo_gif.py docs/index.html docs/demo.gif
(needs pip install playwright pillow && playwright install chromium).
License
MIT
Metadata
Release files for agent-reel 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_reel-0.1.1.tar.gz | 801.3 kB | With provenance | Details for agent_reel-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_reel-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for agent_reel-0.1.1-py3-none-any.whl |
Total release size: 841.4 kB
Release files / agent_reel-0.1.1.tar.gz
| Download URL | agent_reel-0.1.1.tar.gz |
|---|---|
| Size | 801.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0148a899b542cc0558daf72c7162c1f5a50fe6a61221d27cb05e42134f6d7ec5
|
|
BLAKE2b-256 checksum How to use checksums |
728e67c9adb5b374c0724dd9939ceb28c44964b7dc207d3baac525182d02935b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / agent_reel-0.1.1-py3-none-any.whl
| Download URL | agent_reel-0.1.1-py3-none-any.whl |
|---|---|
| Size | 40.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77c6969c46a4fd9b5a5cd8fb58cd9d4d43631a6b6c7dfdf0cd4618db99f4a724
|
|
BLAKE2b-256 checksum How to use checksums |
49935a0f9b22e90e9a5964e146b5210ef68a352a5168892fca4ffff79b58077b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for agent-reel 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agent_reel-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.