> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracepilotai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What is TracePilot AI? Debugging layer for AI agents

> TracePilot AI captures every LLM call, tool invocation, token spent, and error in your agents as a structured trace you can inspect and replay.

TracePilot AI is a debugging layer for AI agents. When your agent fails in production, traditional logs tell you it happened — TracePilot tells you exactly why, at which step, with what inputs. You wrap your OpenAI calls with TracePilot, and every decision your agent makes is captured as a structured span you can inspect, fork, and replay from the dashboard.

## The problem TracePilot solves

AI agents are hard to debug. Your agent calls GPT-4o 47 times, spends \$3.20, and returns garbage. Your logs say `"agent finished"`. You have no idea what happened inside.

Traditional observability tools tell you *that* something broke. TracePilot lets you go back in time, change the input at the exact step that failed, and re-run from there — without redeploying anything.

## How it works

You wrap your existing OpenAI calls with TracePilot. That's it. TracePilot doesn't replace your stack — it wraps it.

```
Your Agent  →  tp.wrapOpenAI()  →  OpenAI API
                     ↓
              TracePilot captures:
              input · output · tokens · latency · errors
                     ↓
              Dashboard: visualize · fork · fix
```

Every LLM call and tool invocation is captured as a structured span. Spans are linked into an execution tree that mirrors your agent's logic. When something goes wrong, you open the dashboard, find the failing span, and hit **Fork & Rerun**. Edit the prompt right there. See the new output instantly.

## Key features

| Feature                       | What it does                                                          |
| ----------------------------- | --------------------------------------------------------------------- |
| **Execution Tracing**         | Every LLM call and tool invocation captured as a structured span tree |
| **Time-Travel Forking**       | Edit any span's input and re-execute from that exact point            |
| **Token & Cost Tracking**     | Per-span token usage and estimated API cost in real time              |
| **Error Spans**               | Failures captured automatically with full context                     |
| **Destructive Call Warnings** | Flag tool calls that modify external state (DB writes, emails, etc.)  |
| **Live Dashboard**            | Visualize execution trees, latency, RPS — no config needed            |

## Works with your existing stack

TracePilot wraps your calls — it doesn't replace them. There's no lock-in and no SDK sprawl. It's compatible with the OpenAI SDK directly, and works alongside LangChain, CrewAI, AutoGen, and any custom orchestration pattern that uses async calls.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Install the SDK and send your first trace in under 5 minutes.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Get your API key and configure the SDK for your environment.
  </Card>
</CardGroup>
