Time-Travel Debugging
Replay any agent state at any point in time. Step forward and backward through execution history.
Why Time-Travel?
Unlike traditional logs, time-travel debugging lets you see exactly what your agent was "thinking" at any moment. Replay decisions, compare alternative paths, and understand why your agent made specific choices.
How It Works
Every event in your agent's execution is captured with full context. This creates a complete timeline that you can navigate like a video player.
Step Through Execution
Step 12 of 45
Navigate through your agent's execution one step at a time, just like a debugger.
Inspect State at Any Point
// State at step 12
{
"current_tool": "search_knowledge_base",
"query": "password reset",
"results_found": 3,
"user_context": {
"frustrated": true,
"previous_attempts": 2
},
"next_action": "evaluate_results"
}See exactly what data your agent had access to at each step.
Using Time-Travel in the Dashboard
1. Open a Session
Navigate to your dashboard and select any completed session to view its timeline.
2. Navigate the Timeline
Use the timeline controls to move through execution:
- Arrow keys - Step forward/backward
- Click events - Jump to specific moments
- Slider - Scrub through quickly
- Play button - Auto-play execution
3. Inspect Events
Click any event to see full details:
Common Use Cases
🐛 Debug Failures
When an agent fails, rewind to see exactly where things went wrong.
🎯 Optimize Performance
Identify slow steps and unnecessary operations.
💡 Understand Decisions
See why your agent made specific choices.
🔄 Compare Runs
Open multiple sessions side-by-side to compare behavior.
Advanced: Programmatic Access
Access session history programmatically for analysis and testing:
from sentrial import SentrialClient
client = SentrialClient(api_key="...", project_id="...")
# Get full session history
events = client.get_session_events(session_id)
# Get state at specific point in time
state_at_step_12 = client.get_state_at_event(
session_id=session_id,
event_index=12
)
# Analyze decision patterns
for event in events:
if event["type"] == "decision":
print(f"Confidence: {event['confidence']}")
print(f"Chosen: {event['chosen']}")
print(f"Reasoning: {event['reasoning']}")
print("---")Performance Note
Time-travel works best for sessions with <1000 events. For longer sessions, use filtering or focus on specific time ranges.
