---
title: SDK
description: "Use Beeuni Computer as your product’s agent backend."
---

Use `@beeuni/sdk` to manage projects, run agent sessions, and connect your tools.

## Install

```bash
npm install @beeuni/sdk
```

## Create a client

Create an API key in **Account → Tokens**. Keep server API keys on your server.

```ts
import { createBeeuni } from '@beeuni/sdk';

const beeuni = createBeeuni({
  backendUrl: 'https://api.beeuni.ai/v1',
  getToken: async () => process.env.BEEUNI_API_KEY ?? null,
});

const projects = await beeuni.projects.list();
```

The SDK reads `getToken` on every request. Your application owns token storage and refresh; see [Authentication](/docs/sdk/auth).

## Call a Connector

Find the tools available to your project, then inspect a tool's input schema. Credentials stay with Beeuni.

Set `BEEUNI_PROJECT_ID` to an existing project that your API key can access.

```ts
const projectId = process.env.BEEUNI_PROJECT_ID!;
const connectors = beeuni.project(projectId).connectors;

console.log(await connectors.catalog());
console.log(await connectors.search('search email'));
```

Replace `toolName` with a tool returned by search, and fill `args` using its input schema. Calls require an authorized connection and permission to use that tool.

```ts
const toolName = 'your_connector.your_action';
console.log(await connectors.describe(toolName));

const args = {};
const result = await connectors.call(toolName, args);
console.log(result);
```

## Start your first session

```ts
const created = await beeuni.project(projectId).sessions.create({
  name: 'My first SDK session',
});
const session = beeuni.session(projectId, created.session_id);

await session.ensureReady();
await session.send('Describe your capabilities in one paragraph.');
```

`ensureReady()` starts or resumes the session and waits until it is ready. `send()` uses the project's configured model and agent unless you provide overrides. Session usage consumes credits.

To receive events and read the reply, continue with [Full example](/docs/sdk/example). For a React interface, use [React hooks](/docs/sdk/react).

## Guides

- [Sign in with Beeuni](/docs/sdk/sign-in)
- [Full example](/docs/sdk/example)
- [Authentication](/docs/sdk/auth)
- [Sessions](/docs/sdk/sessions)
- [Apps](/docs/sdk/apps)
- [React hooks](/docs/sdk/react)
- [API reference](/docs/sdk/reference)
