---
title: Install
description: "Configure your stack and grab the install command + boilerplate. Pick package manager, framework, and memory scope."
---

## Configure your install

Pick your package manager, framework, and memory scope. The install command and starter snippet update as you choose.

<InstallConfigurator />

The `^0.7.0` range pulls in patches and new features without breaking changes. Pin tighter if you want.

## Get your API key

1. Log in at [thinkn.ai](https://thinkn.ai)
2. Go to **Profile > API Keys** (`/profile/api-keys`)
3. Click **Create Key**, give it a name, and copy the `bel_live_...` value
4. Add it to your environment:

```bash
# .env (do not commit this file)
BELIEFS_KEY=bel_live_...
```

<Callout type="warning">
Copy the key immediately. It is only shown once. If lost, revoke it and create a new one.
</Callout>

## Memory scope, in detail

`writeScope` decides where new beliefs are stored, and therefore who else can read them.

| Scope | What it does | Use when |
|---|---|---|
| `'space'` | One shared belief state per `namespace`. Every agent and conversation reads and writes the same world. | Prototypes, multi-agent collaboration, anything where shared context is the point. |
| `'thread'` | Separate belief state per conversation. Bind with `thread: 'id'` or `beliefs.withThread(id)`. | Chat apps, per-user memory, sessions that shouldn't leak into each other. |
| `'agent'` | Durable scratchpad per agent, isolated from other agents in the same namespace. | Background workers and tool-running agents that keep private notes. |

The SDK defaults to `writeScope: 'thread'` (and requires a bound thread ID). For copy-paste verification, the configurator above starts on `'space'`, the simplest runnable setup. See [Scoping](/dev/sdk/scoping) for the full breakdown including `contextLayers`.

## Verify it's working

After setting `BELIEFS_KEY` in your environment, run the snippet from the configurator (or any of the [framework recipes](/dev/tutorial/hack-guide)). A successful first call returns a `BeliefDelta` with `clarity` set, no auth errors. If you see `BetaAccessError`, your key isn't on the allowlist. Request access via the [waitlist](https://thinkn.ai/waitlist).

<Callout type="tip" title="Using a coding agent?">
Give your agent the SDK reference so it can write correct code on the first try: [`thinkn.ai/llms.txt`](https://thinkn.ai/llms.txt)
</Callout>

## Requirements

- Node.js 18+
- TypeScript 5+ (recommended)

<Callout type="info">
The SDK is in private beta. Request access at [thinkn.ai/waitlist](https://thinkn.ai/waitlist).
</Callout>
