Skip to main content

Documentation Index

Fetch the complete documentation index at: https://traceroot.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

1. Get API Keys

Create API Keys either with TraceRoot Cloud or Self-Hosting.

2. Install the SDK

pip install traceroot

3. Set Environment Variables

.env
TRACEROOT_API_KEY=your-api-key
TRACEROOT_HOST_URL=https://app.traceroot.ai  # or your self-hosted URL

4. Instrument Your Code

Add a single line at the start of your application to instrument all OpenAI API calls.
import traceroot
from traceroot import Integration
from openai import OpenAI

# This single line instruments all OpenAI API calls
traceroot.initialize(integrations=[Integration.OPENAI])

client = OpenAI()
For full SDK details, see the Python SDK or TypeScript SDK.

5. View Your Traces

Open TraceRoot Cloud (or your self-hosted dashboard), navigate to your project, and you’ll see the full span hierarchy, token usage, cost, and timing.

What’s Next?

Python SDK

Full API reference for the Python SDK.

TypeScript SDK

Full API reference for the TypeScript SDK.

AI Agent

Auto-debug failing traces with the built-in AI agent.