replai
A local-first debugger for LLM agents. See exactly what your agent did — every model call, tool call, and decision — step by step. No account, no cloud, no Docker. Just pip install and look.
⚠️ Early alpha (v0.1). The capture engine and local viewer work today. Replay and run-diffing are next on the roadmap.
Why
When an AI agent does the wrong thing, you're usually staring at a wall of logs trying to reconstruct what happened. Production observability platforms exist, but they're heavy — dashboards, servers, accounts — built for monitoring at scale, not for the moment you're on your laptop going "wait, why did it call that tool?"
replai is the other thing: a debugger for the dev inner loop. Drop it in, run your agent, and get a clickable, step-by-step timeline of everything it did — locally.
Install
pip install "replai[viewer]"
Quickstart
import replai
replai.init() # auto-captures Anthropic & OpenAI calls
# ... run your agent exactly as you normally would ...
Then open the viewer:
replai ui
Want to annotate your own steps?
with replai.run("my-agent"):
with replai.span("retrieve", type="tool_call") as s:
s.output = my_retriever(query)
Or decorate functions and tools:
@replai.tool
def web_search(query): ...
@replai.trace
def plan(goal): ...
Try it with no API keys
python example.py
replai ui
How it works
- Auto-instrumentation wraps the Anthropic / OpenAI clients, so calls are captured with zero code changes.
@replai.trace/@replai.tool/replai.span()annotate your own functions and tool calls. Spans nest automatically.- Everything is stored in a local SQLite file (
~/.replai/replai.db). Nothing leaves your machine. - A small FastAPI viewer renders each run as a step-by-step timeline.
Roadmap
- Capture engine (LLM + tool + function spans, sync & async)
- Local timeline viewer
- Replay — step through a run; re-run from any step
- Diff — compare two runs, highlight where they diverged
- Framework adapters (LangChain, LlamaIndex, …)
- MCP tool-call capture
- OpenTelemetry GenAI export
License
MIT
Metadata
Release files for replai 0.1.0
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 | |
|---|---|---|---|---|
| replai-0.1.0.tar.gz | 11.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| replai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.9 kB
Release files / replai-0.1.0.tar.gz
| Download URL | replai-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
139cd97ce880a5c8ec2904fcb6d644c76c9dfde1d9f33f9ffb8281fd2c51c694
|
|
BLAKE2b-256 checksum How to use checksums |
c1a743a5859ae87a067438b3a9fa2236152f7019102b83b0bcf8a27e902f399f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / replai-0.1.0-py3-none-any.whl
| Download URL | replai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41e4c8d2bc96319b450713d90f11eb452c8702c0e26f4c4d89c09a0dd96deb67
|
|
BLAKE2b-256 checksum How to use checksums |
a87ec0c1e04409f1d5fc21f259bd004621b62d73f5d4b04f40e410b94d20f1be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for replai 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.