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

# Installation

> Install the Bento Python SDK and send a test trace.

The Bento Python SDK sends analytics about your AI agent runs to Bento, where you can see what your app does in production and improve what fails.

## Set up with an AI coding tool

Install Bento's Agent Skills so your AI coding tool knows how to wire up the SDK. Copy this prompt into Claude Code, Cursor, Codex, OpenCode, or Windsurf:

```text wrap theme={null}
Set up Bento in this project. Run npx skills add BentoLabs-ai/skills, then use the bentolabs-integrate skill for a fresh start, or bentolabs-migrate if I'm coming from another SDK. Walk me through it step by step and confirm before editing.
```

The skill carries the full playbook: discovering your framework, installing the SDK, wiring up `bento.instrument()` or `bento.track_ai`, and verifying the first trace lands. Prefer to do it by hand? The rest of this page walks the same steps manually.

## Requirements

Python 3.10 or higher.

## Install

```bash theme={null}
pip install bentolabs-sdk
```

If you use **Google ADK**, install the extra so Bento can capture every call automatically:

```bash theme={null}
pip install "bentolabs-sdk[adk]"
```

The base wheel ships its own OpenTelemetry dependencies. You don't need to install `opentelemetry-api` or `opentelemetry-sdk` separately.

## Set your API key

Sign in at [platform.bentolabs.ai](https://platform.bentolabs.ai) and create a workspace. Copy the API key from settings. Keys start with `bl_pk_` and the prefix is validated by the SDK, so a clearly-bad key fails before any network request goes out.

```bash theme={null}
export BENTOLABS_API_KEY="bl_pk_..."
```

In production, set the key via environment variable. For local development or notebooks, pass it in code: `bento.init(api_key="bl_pk_...")`.

## Send a test trace

Pick the one that matches your stack.

**Google ADK:**

```python theme={null}
import bentolabs_sdk as bento

bento.init()
bento.instrument()

# Run any ADK agent. Bento captures it.
bento.flush()
```

**Anything else:**

```python theme={null}
import bentolabs_sdk.analytics as bento

bento.track_ai(
    event="hello_world",
    user_id="test_user",
    convo_id="conv_test",
    model="gpt-4o",
    provider="openai",
    input="ping",
    output="pong",
)
bento.flush()
```

Open [platform.bentolabs.ai](https://platform.bentolabs.ai). The trace lands within seconds.

## Next

<CardGroup cols={2}>
  <Card title="Export from any framework" icon="share-nodes" href="/otel-export">
    Already on LangChain, LlamaIndex, or a TS framework? Point its exporter at Bento.
  </Card>

  <Card title="Integrations" icon="plug" href="/python/integrations">
    Trace Google ADK with one line.
  </Card>

  <Card title="Manual tracking" icon="paper-plane" href="/python/track-ai">
    Wrap OpenAI / Anthropic / Bedrock / Vertex calls.
  </Card>

  <Card title="Configuration" icon="gear" href="/python/configuration">
    Identity getters, env vars, lifecycle.
  </Card>

  <Card title="Custom properties" icon="sliders" href="/python/properties">
    Tag spans with experiment IDs, feature flags, anything.
  </Card>
</CardGroup>
