# Keys: which key for each package

Source: https://docs.autessa.com/docs/start/keys

> Which Autessa key each library needs: the free developer key for every feature package, and a deploy key for the Autessa CDK.

# Keys

The free developer key works with every feature package. The Autessa CDK uses deploy keys.

## Which key for which package

| Package | Key | Where to get it |
| --- | --- | --- |
| Firewall, SecurePass (redact), evals, synthetic data (synth), messaging, approvals, MCP tools, RAG, agents, phone | Developer key | [Get a free API key](https://builder.autessa.com/get-api-key). It acts as you. |
| Autessa CDK | Deploy key: **Preview changes** for `diff`, **Deploy** for `deploy`. `chat` on Autessa's models also needs **Run agents locally**; `chat` with a stage needs **Chat with agents from your machine**. | **Settings → Deploy keys**, created by a company admin |

The package names are the same in every language. For example, the firewall is `autessa-firewall` on PyPI, `@autessa/firewall` on npm, and `com.autessa:autessa-firewall` on Maven. The all-in-one `autessa-sdk` (`@autessa/sdk` on npm) installs every feature package, and one developer key works for all of them.

## Developer key

[Get a free API key](https://builder.autessa.com/get-api-key) makes one in one click, with $100 of free credits for your first month and no card needed. After that, usage is billed to your company like any other key. It covers:

- the [AI Application Firewall](/docs/features/ai-application-firewall.md)
- [SecurePass](/docs/features/securepass.md) call redaction
- [Evaluations](/docs/features/evaluations.md) and the attack simulator
- [Synthetic data](/docs/features/synthetic-data.md)
- [Agent tools and MCP](/docs/features/agent-tools-mcp.md), including [messaging](/docs/features/messaging.md) and [approvals](/docs/features/approvals.md)
- [RAG](/docs/features/rag.md) over your tables and Drives
- your [agents](/docs/features/agents.md)
- [Phone](/docs/features/phone.md) numbers

The key acts as you, so it reaches exactly the tables, Drives, tools, and agents you can open, with your row and folder access. If a call is refused for one of them, ask its owner to share it with you.

Some permissions are for company admins only: phone number management, running agents on Autessa's models (the CDK's `chat`), firewall events and dashboards, and enrolling or removing authenticators. The developer key includes them when you're a company admin. You are one in the personal company you get when you sign up.

If an older developer key is refused for RAG, agents, or phone, create a new one: those were added later.

## API key

Create one in **Settings → API keys** when you want a key with less than the developer key: only some tables or agents, its own rate limits, or allowed origins. You choose what it can reach and which extra permissions it has:

- **Tables** and **Drive** access, for [RAG](/docs/features/rag.md).
- Access to an agent, for the [agents package](/docs/features/agents.md).
- **Phone numbers**, for the [phone package](/docs/features/phone.md). Company admins only.
- **Run agents locally**, to `chat` with a CDK project's agents on Autessa's models with an API key instead of a deploy key. Company admins only.

See [API keys and scopes](/docs/start/api-keys.md) for how resource access, permissions, and rate limits work.

## Deploy key

The [Autessa CDK](/docs/cdk.md) uses deploy keys. A company admin creates them in **Settings → Deploy keys**, or with [`autessa deploy-keys`](/docs/cli/api-access.md#deploy-keys). A deploy key belongs to one tenant, so keep one per stage.

| Permission | Lets the CDK |
| --- | --- |
| **Preview changes** | `diff`: see what a deploy would change. |
| **Deploy** | `deploy`: apply the project. |
| **Download** | `pull` (and `adopt-app` in TypeScript): export what is in the tenant. |
| **Roll back** | `rollback`: go back to an earlier deploy. |
| **Run agents locally** | `chat`: run your agents on your machine with Autessa's models. |
| **Chat with agents from your machine** | `chat` with a stage: talk to the agent in that stage's tenant. |

Give each key only what it needs. In CI, pull requests get a key with only **Preview changes**, and merges get one with **Preview changes** and **Deploy**. See the [deploy action](/docs/cdk/deploy-action.md).

## Set your key

The SDK and its feature packages read `AUTESSA_API_KEY`, or take the key in code:

```bash
export AUTESSA_API_KEY="<keyId>:<secret>"
```

With the all-in-one package, one developer key works for every feature. You can also give a feature its own narrower key, for example a key that can read only one table for RAG.

The CDK reads each stage's `deployKeyEnv` from `autessa.stages.yaml`, for example `AUTESSA_DEPLOY_KEY_DEV`, then `AUTESSA_DEPLOY_KEY`:

```bash
export AUTESSA_DEPLOY_KEY_DEV="<deploy key>"
```

Keep keys on your server and in your CI's secret store. Never put a key in browser or mobile code.

## When a key is refused

When a key can't reach a feature, the call fails with `401` or `403`, and the library's error carries a hint that says which key works and where to get it, next to the server's message. For example:

> This key can't search or read this table (RAG (tables)). Use a developer key from https://builder.autessa.com/get-api-key. It acts as you, so it reaches only the tables you can open: ask whoever owns this table to share it with you, or ask a company admin. Older free keys don't reach tables, so create a new one.

## Related

- [Start here](/docs/start.md)
- [API keys and scopes](/docs/start/api-keys.md)
- [Autessa CDK](/docs/cdk.md)
- [Billing](/docs/start/billing.md)

