# Send your first session

Initialize the Brizz SDK and capture your first session.

How you send your first session depends on what's already in your stack — a plain OpenAI/Anthropic client looks different from LangChain, Vercel AI, or Agno. Before you copy the snippet below, **head to [Choose your SDK](/docs/sdks.md)** and follow the page that matches your setup. The example here is a generic starting point; the SDK page for your framework is the source of truth.

## 1. Initialize Brizz

Initialize the SDK before your app makes any AI calls. In Python, `Brizz.initialize()` must run before you import your AI libraries. In Node, hand those libraries to `instrumentModules` — then import order doesn't matter.

:::tabs
:::tab[Python]
```python
import os
from brizz import Brizz

# Initialize BEFORE importing other AI libraries
Brizz.initialize(
    api_key=os.environ.get("BRIZZ_API_KEY"),
    app_name="my-ai-app",
)

# Now import your AI libraries
from openai import OpenAI
```
:::tab[Node.js]
For Node, prefer **manual instrumentation** — pass the modules you want to instrument explicitly. This works for ESM, CJS, bundled, and `tsx`-driven setups.

```typescript
import 'dotenv/config';
import { Brizz } from '@brizz/sdk';
import * as CallbackManagerModule from '@langchain/core/callbacks/manager';
import OpenAI from 'openai';

Brizz.initialize({
  apiKey: process.env.BRIZZ_API_KEY,
  appName: process.env.BRIZZ_APP_NAME || 'my-app',
  environment: process.env.NODE_ENV || 'development',
  instrumentModules: {
    // Pass only the modules your app actually uses
    openAI: OpenAI,
    langchain: {
      callbackManagerModule: CallbackManagerModule,
    },
  },
});
```

The exact `instrumentModules` shape depends on which framework you're using — see [Node.js / TypeScript SDK](/docs/sdks/typescript.md) and the framework-specific adapter page for the right keys.
:::
:::

## 2. Wrap an agent call in a session

Sessions group multiple interactions (LLM calls, tool usage, events) into one user journey. This is the unit you'll spend most of your time looking at in the dashboard.

:::tabs
:::tab[Python]
```python
from brizz import start_session

with start_session("session-123"):
    # Your agent logic here — any LLM/tool call inside this block is traced
    response = openai.chat.completions.create(...)
```
:::tab[Node.js]
```typescript
import { withSessionId } from '@brizz/sdk';

async function runAgent() {
  // Your agent logic here
}

await withSessionId('session-123', runAgent)();
```
:::

## 3. Run it

Run your application. Brizz batches and flushes spans asynchronously — within a few seconds you should see a session in the dashboard.

## See also

- [Choose your SDK](/docs/sdks.md) — the framework-specific quickstart for your stack.
- [Verify it landed](/docs/get-started/verify.md) — what to look for in the dashboard, what to do if nothing shows up.
- [Next steps](/docs/get-started/next-steps.md) — identify users, send custom events, plug in a framework.
- [Python SDK reference](/docs/sdks/python.md) and [Node.js / TypeScript SDK reference](/docs/sdks/typescript.md) — advanced configuration.
