A 100% local, offline observer and devtools dashboard for AI agents and LLM applications.
Project description
OpenReplay AI Studio (Local Edition)
OpenReplay AI Studio is a 100% local, offline, developer-first session replay, execution tracing, and profiling dashboard for LLM applications and AI agents. It runs entirely on your local machine with zero cloud dependencies, zero data leakage, and zero hosting costs.
Think of it as Chrome DevTools + SQLite + cProfile custom-tuned for AI workflows.
🚀 Features
- Execution Replay Timeline: Replay agent steps (planner loops, retriever document reads, tool calls, and LLM queries) chronologically with exact parameters.
- AI Flame Graphs: Visualize duration, token usage, and dollar cost proportions across nested steps to spot hotspots instantly.
- Prompt Version Diffing: Compare prompt inputs side-by-side inside the dashboard with inline diff highlighting.
- Shareable Replay Files (
.orp): Export traces to a single JSON-based.orpfile (like browser.harfiles) to share with teammates. - No Telemetry, No Accounts: Everything stays local in an SQLite database.
📦 Installation
To install and build the package locally:
# Clone the repository
cd AIReplay
# Install package in editable/development mode
pip install -e .
🛠️ Usage
1. Instrument Your Code
Just import trace and decorate your agent steps:
from openreplay_ai import trace, init_openreplay
# Initialize (creates local SQLite DB at .openreplay/traces.db)
init_openreplay()
@trace(name="Knowledge Retrieval", type="retriever")
def search_vector_db(query: str):
return ["retrieved doc content here"]
@trace(name="SQL Tool", type="tool")
def query_database(sql: str):
return {"status": "ok", "rows": []}
@trace(name="Summarization Call", type="llm", model="gpt-4o")
def call_llm(prompt: str):
# Returns raw result (openreplay auto-parses token counts and cost for OpenAI completion structures)
return completion_payload
@trace(name="Agent Planner", type="agent")
def my_agent(user_question: str):
docs = search_vector_db(user_question)
db_res = query_database("SELECT * FROM users")
answer = call_llm(f"Context: {docs}\nDB: {db_res}\nQuery: {user_question}")
return answer
if __name__ == "__main__":
my_agent("Analyze latency patterns")
Run your code:
python my_script.py
2. Launch the Visual Dashboard
Open your browser to view and scrub through traces:
openreplay open
This runs a local FastAPI server and launches your browser to http://localhost:8000.
💻 CLI Command Reference
openreplay open [--port PORT] [--host HOST]: Starts the local DevTools server and opens the browser.openreplay list: Displays a neat terminal summary table of recent traces.openreplay export <trace-uuid> <output.orp>: Save a trace to a portable, shareable.orpfile.openreplay import <file.orp>: Load an.orpfile into your local SQLite database.
🤝 Contributing
We welcome contributions to OpenReplay AI Studio! To modify the React dashboard:
- Navigate to the dashboard directory:
cd openreplay_ai/dashboard
- Install Node dependencies:
npm install - Run the Vite development server (access API routes by proxying to port 8000):
npm run dev
- Build the production static assets (compiles assets into
openreplay_ai/dashboard/dist/for FastAPI distribution):npm run build
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openreplay_ai-0.1.0.tar.gz.
File metadata
- Download URL: openreplay_ai-0.1.0.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633aabe158228eddc3a3e8b7f45333c850764f3764b680c194dc5cc90ee332e5
|
|
| MD5 |
e620506b0133863947ceb182c8bdec45
|
|
| BLAKE2b-256 |
8d232faaf7a588072bed82ecb11499d22a961db956bc36688678e7298c92123f
|
File details
Details for the file openreplay_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openreplay_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 86.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e5756f7df9766dffe04b5da7d73b2dcc4138ac9ce208ce9545c957573ff2882
|
|
| MD5 |
8efa98c4ff2c661c9bb225e16f01f951
|
|
| BLAKE2b-256 |
abe4d645b3a76a519497f4cfbb0e1105aff11e1849ff66d9006961550af1fbd9
|