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

# SDK

> Install the SDK, configure your API key, and make your first request.

Use the Bluejay SDK to observe production conversations, run simulations, and call the Bluejay API. The SDK supports Python and Node.js. The Node.js preview package works with JavaScript and TypeScript. The TypeScript tabs use examples you can also copy into JavaScript.

> [card] [Observe your agent](https://docs.getbluejay.ai/sdk/observability.md)
>
> Capture transcripts, model calls, tools, and voice recordings.

> [card] [Run simulations](https://docs.getbluejay.ai/sdk/simulations.md)
>
> Queue a saved simulation, read its results, and attach traces from your agent.

## Install and authenticate

The Python examples require `bluejay-sdk` 0.4.0 or later and Python 3.10 or later. The Pipecat extra requires Python 3.11 or later. The Node.js preview requires Node.js 22 or later.

```bash Python icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/python.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=ce56f186813559443f877804e7aef209" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "bluejay-sdk>=0.4.0"
```

```bash TypeScript icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/typescript.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=d4b45d3e44d76cf40cfb09b3d24831f5" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Install a preview tarball on Node.js 22 or later.
npm install /path/to/getbluejay-sdk-0.4.0.tgz
```

Create a key in [API Keys](https://app.getbluejay.ai/settings/api-keys) and set it in the environment where the SDK runs.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export BLUEJAY_API_KEY="your-api-key"
```

## Make your first request

```python Python icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/python.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=ce56f186813559443f877804e7aef209" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from bluejay import BluejayClient

client = BluejayClient()
for agent in client.agents.list():
    print(agent.id)
```

```typescript TypeScript icon="https://mintcdn.com/bluejay/73RDPPJpgHtl6PiO/logo/typescript.svg?fit=max&auto=format&n=73RDPPJpgHtl6PiO&q=85&s=d4b45d3e44d76cf40cfb09b3d24831f5" theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import { BluejayClient } from "@getbluejay/sdk";

const client = new BluejayClient();
for (const agent of await client.agents.list()) {
  console.log(agent.id);
}
```

The default client calls the API. To capture conversations and traces, enable tracing once at startup and follow the [observability guide](https://docs.getbluejay.ai/sdk/observability.md).

Node.js API methods return promises. In Python asyncio applications, use `AsyncBluejayClient` and await HTTP methods such as `client.agents.list()`. Writing `client.turn()` is synchronous in both SDKs.

## API reference

The SDK groups API methods by resource. For example, use `client.agents.list()` for agents, `client.simulations.run(...)` to queue a test, and `client.simulation_results.list(...)` to read a run. The [API reference](https://docs.getbluejay.ai/api-reference/endpoint/get-all-agents.md) describes request fields and response models.

> [!NOTE]
>
> The Node.js SDK is available as a preview tarball. Install that build to try the TypeScript examples before npm release.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.