How ujwalbagalkoti/ai-time-travel-debugger works
The product records AI-agent executions as traces, imports them for inspection, and lets users fork a historical step for safe cached replay or optional live LLM replay. The graph follows the documented upload-to-debugger workflow and separates capture, API/persistence, replay, and UI responsibilities. Source excerpts show the SDK, backend, and primary UI calls; optional LangChain capture and upload are documented in the README, while frontend replay requests are visible in the page source.
Main entry points: main.py FastAPI endpoints · page.tsx Debugger page · agent_tracer.py AgentTracer · replay_engine.py Replay engine
Components 11
Trace capture
- AgentTracer
sdk/agent_tracer.py - LangChain callback
sdk/integrations/langchain.py - JSON trace file
Trace API and storage
- FastAPI endpoints
backend/app/main.py - Trace and branch store
backend/app/database.py
Replay
- Replay engine
backend/app/replay_engine.py
Debugger UI
- Debugger page
frontend/app/page.tsx - Execution graph
frontend/components/TraceCanvas.tsx
Other components
- Agent application
- Debugger user
- OpenAI API
Connections 15
- Agent application → AgentTracer: instruments
README.md - AgentTracer → JSON trace file: writes trace
README.md - LangChain callback → AgentTracer: records callbacks
sdk/integrations/langchain.py - Debugger user → FastAPI endpoints: uploads trace
README.md - JSON trace file → FastAPI endpoints: imports trace
README.md - FastAPI endpoints → Trace and branch store: reads and writes
backend/app/main.py - Debugger page → FastAPI endpoints: fetches trace
frontend/app/page.tsx - FastAPI endpoints → Debugger page: returns trace data
backend/app/main.py - Debugger page → Execution graph: renders steps
frontend/app/page.tsx - Debugger user → Debugger page: inspects and edits
README.md - Debugger page → FastAPI endpoints: requests branch
frontend/app/page.tsx - FastAPI endpoints → Replay engine: matches tool cache
backend/app/main.py - FastAPI endpoints → Replay engine: requests live replay
backend/app/main.py - Replay engine → OpenAI API: calls model optionally
backend/app/replay_engine.py - FastAPI endpoints → Trace and branch store: persists branch
backend/app/main.py