Single-step agents are easy to debug. Multi-step agents — where an LLM reasons, triggers a tool, then reasons again based on the result — are not. TracePilot AI builds a visual execution tree from your spans by linking each step to its parent using theDocumentation Index
Fetch the complete documentation index at: https://tracepilot.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
spanId returned by the previous step. You can see the full chain of decisions in the dashboard and fork any step to investigate a failure.
How the tree is built
EverywrapOpenAI and wrapToolCall call returns a spanId. Pass that spanId as parentSpanId to the next call that logically follows from it. TracePilot uses these links to render a nested tree rather than a flat list.
The stepOrder parameter controls the display order of sibling spans under the same parent. Always pass it — the dashboard sorts siblings by stepOrder, not by wall-clock time, so the tree stays readable even when steps run concurrently.
Full example: research agent
The following agent follows three steps: an LLM produces a research plan, a web search tool executes the plan, and a second LLM synthesizes the search results into a final answer. Each step is linked to the one before it.What the execution tree looks like
After this agent runs, the dashboard renders the following tree:Understanding each parentSpanId linkage
The three linkages in the example create a strict chain of causality:
| Step | parentSpanId | What it means |
|---|---|---|
| Step 1 (plan) | undefined | Root of the tree — no parent |
| Step 2 (search) | planSpanId | The search was triggered by the plan |
| Step 3 (answer) | searchSpanId | The final answer was shaped by the search results |
parentSpanId — for example, linking step 3 to planSpanId instead of searchSpanId — the tree still renders, but the relationship between the search and the answer becomes invisible. Be deliberate about which span is the logical cause of the next one.
Forking a failing step
If step 3 returns a bad answer, open the dashboard, find the step 3 span, and click Fork & Rerun. Edit thefollowUp messages directly in the UI — for example, adjust the tool output passed as context — and run the span again. The new result appears immediately without redeploying your agent.
Branching trees (fan-out)
Branching trees (fan-out)
When an agent runs multiple tools in parallel from a single LLM call, give each tool span the same The dashboard renders:
parentSpanId (the LLM span) and unique stepOrder values. They appear as siblings in the tree.Deeply nested trees
Deeply nested trees
You can nest spans as many levels deep as your agent requires. Each call returns a
spanId you can use as the parentSpanId for the next level. There is no hard limit on tree depth.Mixing wrapOpenAI and wrapToolCall in the same tree
Mixing wrapOpenAI and wrapToolCall in the same tree
parentSpanId accepts the spanId from either wrapOpenAI or wrapToolCall. You can freely interleave LLM spans and tool spans as parents and children in the same tree.