A full stack observability tool for AI agents. Record every LLM call, tool call, and error your agent makes β then replay, inspect, and debug it visually on a live dashboard.
Built with FastAPI Β· Streamlit Β· Groq Β· SQLite Β· bcrypt
π Live Demo: ["https://agent-debugging-replay-tool.streamlit.app/"]
When an AI agent breaks, your terminal shows one line:
Error: Tool not found
That tells you nothing. You don't know:
- Which step caused it
- What prompt the LLM received at that point
- How much money was wasted before it failed
- Whether this is the same bug from last week
Agent Debugging Replay Tool fixes this. It records every single step your agent takes and lets you inspect it like a flight recorder.
- π Auth system β signup, login, unique API key per user
- π΅οΈ Step recorder β captures every LLM call, tool call, and error
- π Step timeline β expand any step to see full input/output
- πΊοΈ Flow graph β visual diagram of your agent's path
- π Cost analysis β token usage chart + efficiency tips
- π₯ Multi-user β every user sees only their own agent runs
- βοΈ Fully hosted β server on Railway, dashboard on Streamlit Cloud
git clone https://github.com/cookieshop02/Agent-Debugging-Replay-Tool.git
cd Agent-Debugging-Replay-Toolpip install -r requirements.txt# create a .env file in the project root
GROQ_API_KEY=your_groq_key_here
TRACKER_API_KEY=your api key provided to you after you create account on platform (you can directly add into your code or write it here)Get a free Groq API key at console.groq.com
uvicorn server:app --reload --port 8000streamlit run app.pyGo to http://localhost:8501 β Create an account β You're in.
pip install requests python-dotenvfrom tracer.recorder import AgentTracer
# 1. create tracer with your API key (from dashboard after signup)
tracer = AgentTracer(api_key="at_sk_your_key_here", name="My Agent Run")
tracer.start()
# 2. record every LLM call
tracer.record_llm(
prompt="What should I do first?",
response="I should search the web.",
tokens=85
)
# 3. record every tool call
tracer.record_tool(
tool_name="web_search",
input_data="latest AI news",
output_data="Results: ...",
duration_ms=320
)
# 4. record errors
try:
result = some_tool()
except Exception as e:
tracer.record_error("Calling some_tool", e)
# 5. finish
tracer.finish(status="success") # or "error"Then open the dashboard β your run appears instantly in the sidebar.
Agent-Debugging-Replay-Tool/
β
βββ server.py β FastAPI backend (deployed on Railway)
βββ server_db.py β Server database logic (SQLite)
βββ auth.py β Password hashing (bcrypt)
β
βββ app.py β Streamlit dashboard
βββ pages/
β βββ 1_login.py β Login / signup page
β
βββ groq_agent.py β Example real agent using Groq
β
βββ tracer/
β βββ __init__.py
β βββ recorder.py β AgentTracer class (the spy)
β βββ queries.py β Fetches data from server
β
βββ .env.example β Environment variable template
βββ .gitignore β Keeps secrets out of GitHub
βββ requirements.txt
See at:
Full interactive docs at: https://your-railway-url.up.railway.app/docs
| Service | Platform | URL |
|---|---|---|
| FastAPI Server | Railway | https://agent-debugging-replay-tool-production.up.railway.app/ |
| Streamlit Dashboard | Streamlit Cloud | https://agent-debugging-replay-tool.streamlit.app/ |
Server (Railway):
- Push to GitHub
- Connect repo on railway.app
- Add
GROQ_API_KEYenvironment variable - Set start command:
uvicorn server:app --host 0.0.0.0 --port $PORT
Dashboard (Streamlit Cloud):
- Go to share.streamlit.io
- Connect GitHub repo
- Set main file:
app.py - Deploy
| Terminal Logs | This Tool | |
|---|---|---|
| See full prompt history | β | β |
| Compare runs | β | β |
| Cost per step | β | β |
| Visual flow diagram | β | β |
| Shareable with teammates | β | β |
| Persistent history | β | β |
| Works across multiple agents | β | β |
- Backend: Python, FastAPI, SQLite
- Frontend: Streamlit, Graphviz
- Auth: bcrypt password hashing
- LLM: Groq (llama3-8b-8192)
- Hosting: Railway (API) + Streamlit Cloud (UI)
MIT License β free to use, modify, and distribute.
Made with π to make AI agent debugging less painful.