> ## 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.

# Get Started

> Set up tracing for your AI agent in minutes

## 1. Get API Keys

Create API Keys either with [TraceRoot Cloud](https://app.traceroot.ai) or [Self-Hosting](/developer/self-hosting).

## 2. Install the SDK

<Tabs>
  <Tab title="Python">
    ```bash theme={null}
    pip install traceroot
    ```
  </Tab>

  <Tab title="TypeScript">
    ```bash theme={null}
    npm install @traceroot-ai/traceroot
    ```
  </Tab>
</Tabs>

## 3. Set Environment Variables

```bash .env theme={null}
TRACEROOT_API_KEY=your-api-key
TRACEROOT_HOST_URL=https://app.traceroot.ai  # or your self-hosted URL
```

## 4. Instrument Your Code

<Tabs>
  <Tab title="Python">
    Add a single line at the start of your application to instrument all OpenAI API calls.

    ```python theme={null}
    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()
    ```
  </Tab>

  <Tab title="TypeScript">
    Add a single line at the start of your application to instrument all OpenAI API calls.

    ```typescript theme={null}
    import OpenAI from 'openai';
    import { TraceRoot } from '@traceroot-ai/traceroot';

    // This single line instruments all OpenAI API calls
    TraceRoot.initialize({ instrumentModules: { openAI: OpenAI } });

    const openai = new OpenAI();
    ```
  </Tab>
</Tabs>

For full SDK details, see the [Python SDK](/tracing/python-sdk) or [TypeScript SDK](/tracing/typescript-sdk).

## 5. View Your Traces

Open [TraceRoot Cloud](https://app.traceroot.ai) (or your self-hosted dashboard), navigate to your project, and you'll see the full span hierarchy, token usage, cost, and timing.

Prefer the terminal? The [TraceRoot CLI](/cli/get-started) lists, inspects, and exports the same traces without leaving your shell.

***

## What's Next?

<CardGroup cols={2}>
  <Card title="Python SDK" icon="python" href="/tracing/python-sdk">
    Full API reference for the Python SDK.
  </Card>

  <Card title="TypeScript SDK" icon="js" href="/tracing/typescript-sdk">
    Full API reference for the TypeScript SDK.
  </Card>

  <Card title="AI Agent" icon="brain" href="/ai-agent/overview">
    Auto-debug failing traces with the built-in AI agent.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli/get-started">
    Read and export your traces from the terminal.
  </Card>
</CardGroup>
