TracePilot AI lets you go back to the exact moment your agent failed, change the input, and see a new result — without redeploying your code or re-running the entire agent from scratch. This is called time-travel debugging, and it works through the Fork & Rerun feature in the TracePilot dashboard.Documentation Index
Fetch the complete documentation index at: https://tracepilot.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Why traditional debugging falls short
When an AI agent fails, the usual approach is to add logging, redeploy, reproduce the failure, and hope you guessed the right inputs. For multi-step agents that make dozens of LLM calls, this cycle can take hours — and you may still miss the exact context that caused the bad output. TracePilot takes a different approach: because every span captures the exact input, output, and context at each step, you can jump directly to the failing step and experiment with fixes before touching your code.Traditional debugging
Add logs → redeploy → reproduce → wait → repeat. Hours per cycle.
Time-travel debugging
Open dashboard → find failing span → fork → edit → rerun. Seconds per cycle.
How Fork & Rerun works
Every span in a trace captures its full input at the time of execution. Fork & Rerun uses that captured input as a starting point. When you fork a span, TracePilot replays that single operation with whatever input you provide — isolated from the rest of the trace. This means you can test a prompt fix, a different tool argument, or a corrected message history without modifying your agent code or running the full execution pipeline.Building a debuggable agent
To get the most from time-travel debugging, your agent needs to link spans into a tree usingparentSpanId and stepOrder. This is what lets the dashboard surface the exact failing step and give you precise control over what to fork.
parentSpanId links each span to its parent. The stepOrder numbers the steps. Together, they give the dashboard a complete picture of the execution and let you navigate to any step by its position in the tree.
Debugging a failing step
Suppose the agent above returns a poor answer at step 3. The web search returned relevant results, but the synthesis prompt was too vague. Here is the Fork & Rerun workflow:Open the dashboard
Go to tracepilotai.com/dashboard and find the trace for the failing run. Traces are listed by agent name and timestamp.
Find the failing span
Expand the trace tree. Locate step 3 — the synthesis span. If the call threw an error, TracePilot marks it automatically. If the output was wrong but not an error, click the span to inspect its input and output.
Fork & Rerun
Click Fork & Rerun on the span. The dashboard opens an editor pre-filled with the exact messages that were sent to the model at that step.
Edit the input
Modify the messages — tighten the system prompt, correct the tool output, or add context that was missing. You’re editing the input that TracePilot captured from the live run.
What gets captured per span
Every span that TracePilot records contains enough context to reproduce the call exactly:- The full message array (for LLM spans) or arguments (for tool spans)
- The model name and any parameters passed to the completion
- The response, including all choices
- Token counts and latency
- Any error thrown during execution