# Account (/docs/api/account)
## Get the account [#get-the-account]
The signed-in user's profile.
```bash
curl https://api.coaade.com/v1/account -H "Authorization: Bearer $ACCESS_TOKEN"
```
```json title="Response 200"
{
"id": "4b1c…",
"email": "ada@example.com",
"displayName": "Ada",
"avatarUrl": null,
"phone": null,
"emailVerified": true,
"phoneVerified": false,
"createdAt": "2026-10-02T14:21:07.000Z",
"phoneRequired": false
}
```
`phoneRequired` says whether apps should still ask this user to verify a phone number.
## Update the account [#update-the-account]
Change the display name or avatar.
```bash
curl -X PUT https://api.coaade.com/v1/account \
-H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{ "displayName": "Ada Lovelace" }'
```
```json title="Response 200"
{ "id": "4b1c…", "email": "ada@example.com", "displayName": "Ada Lovelace", "avatarUrl": null }
```
## Delete the account [#delete-the-account]
Delete the signed-in account and email a confirmation.
```json title="Response 200"
{ "success": true }
```
Cancel any paid subscription with [`POST /v1/subscription/cancel`](/docs/api/subscriptions#cancel) before deleting
an account.
# API keys (/docs/api/api-keys)
API keys look like `coaade_sk_` followed by 40 letters and digits. They authenticate the [MCP server](/docs/api/mcp-server), [model calls](/docs/api/chat-completions) and the Desktop App's local API. Coaade stores only a SHA-256 hash, so the full key is returned **once**, when you create it.
| Plan | Active keys |
| --- | --- |
| Free, Pro | 1 |
| Team | 5 |
| Enterprise | Unlimited |
## Permissions [#permissions]
Each key has two independent permissions, set when you create it and changeable afterwards:
| Permission | Values | Controls |
| --- | --- | --- |
| **Call models** | on / off | Calling models through the API: [`POST /v1/chat/completions`](/docs/api/chat-completions) and `GET /v1/models`. |
| **MCP access** | Full, Read-only, Off | The [MCP server](/docs/api/mcp-server). Full offers every tool, Read-only only tools that look, Off refuses the key. |
A new key starts with **Call models** off, so keys made before this existed are MCP-only until you turn it on. A key needs at least one permission; one with neither is refused.
In the API these are the `models` (boolean) and `scope` (`"full" | "read" | "none"`) fields below. Create and edit keys in the [Coaade Console](https://platform.coaade.com/api-keys), in coaade.com **Settings → API keys & MCP**, or with the endpoints here.
On the console's API keys page you can also turn on [private debugging](/docs/api/private-debugging) for a key that calls models: for up to 7 days, its calls are stored in full, encrypted so only you can read them. It's off for every key until you turn it on.
## List keys [#list-keys]
Active keys, with their prefix and hash only.
```json title="Response 200"
{
"keys": [
{
"id": "8d2e…",
"name": "Default key",
"keyPrefix": "coaade_sk_Ab3x",
"keyHash": "9f86d08…",
"scope": "full",
"models": false,
"lastUsedAt": "2026-11-10T18:02:11.000Z",
"createdAt": "2026-10-02T14:30:00.000Z"
}
],
"used": 1,
"limit": 1
}
```
`limit` is `null` when unlimited.
## Create a key [#create-a-key]
Create a key. The full key is in the response, and only there.
```bash
curl -X POST https://api.coaade.com/v1/api-keys \
-H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{ "name": "Production app", "scope": "none", "models": true }'
```
```json title="Response 201"
{
"id": "8d2e…",
"name": "Production app",
"key": "coaade_sk_Ab3x…",
"keyPrefix": "coaade_sk_Ab3x",
"scope": "none",
"models": true,
"keyHash": "9f86d08…",
"createdAt": "2026-11-11T09:30:00.000Z"
}
```
Errors: `422 VALIDATION_ERROR`, `403 KEY_LIMIT_REACHED` (with `limit` and `used`).
## Edit a key [#edit-a-key]
Change a key's name or permissions. Send at least one of `name`, `scope` or `models`.
```bash
curl -X PATCH https://api.coaade.com/v1/api-keys/8d2e… \
-H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" \
-d '{ "models": true }'
```
Returns the updated key, with its prefix and hash only. The full key is never shown again.
Errors: `422 VALIDATION_ERROR` (an invalid field, or nothing to change), `404 KEY_NOT_FOUND`.
## Revoke a key [#revoke-a-key]
Revoke a key immediately.
```json title="Response 200"
{ "revoked": true }
```
Errors: `404 KEY_NOT_FOUND`.
## Verify a key [#verify-a-key]
Check whether a key is valid. Used by model-serving services.
```json title="Request"
{ "key": "coaade_sk_Ab3x…" }
```
```json title="Response 200"
{ "valid": true, "userId": "4b1c…", "keyId": "8d2e…" }
```
An unknown or revoked key returns `401` with `{ "valid": false }`. A successful check updates the key's `lastUsedAt`.
# Authentication (/docs/api/authentication)
## The flow [#the-flow]
1. **Sign up** with `POST /v1/auth/sign-up`. Coaade emails a verification code.
2. **Verify** the email with `POST /v1/auth/verify-email`.
3. **Sign in** with `POST /v1/auth/sign-in` to get an access token and a refresh token.
4. Send `Authorization: Bearer ` on each request.
5. **Refresh** with `POST /v1/auth/refresh` when the access token expires (after 15 minutes).
Access tokens authenticate the account endpoints on these pages. The [MCP server](/docs/api/mcp-server) and [model calls](/docs/api/chat-completions) use `coaade_sk_` [API keys](/docs/api/api-keys) instead, not access tokens.
## Check a password [#check-a-password]
Check a password against the rules as the user types. Rate-limited to 60 requests per minute.
```json title="Request"
{ "password": "correct-Horse-7!", "email": "ada@example.com" }
```
```json title="Response 200"
{
"ok": true,
"checks": [
{ "id": "length", "label": "At least 10 characters", "ok": true },
{ "id": "lower", "label": "A lowercase letter", "ok": true },
{ "id": "upper", "label": "An uppercase letter", "ok": true },
{ "id": "number", "label": "A number", "ok": true },
{ "id": "symbol", "label": "A symbol, like ! @ # ?", "ok": true },
{ "id": "common", "label": "Not a common password, a sequence or your email name", "ok": true }
]
}
```
The server checks the password again on sign-up and reset.
## Sign up [#sign-up]
Create an account on the Free plan and email a verification code.
```bash
curl -X POST https://api.coaade.com/v1/auth/sign-up \
-H "Content-Type: application/json" \
-d '{ "email": "ada@example.com", "password": "correct-Horse-7!", "displayName": "Ada" }'
```
```json title="Response 201"
{
"user": { "id": "4b1c…", "email": "ada@example.com", "displayName": "Ada" },
"tokens": { "access": "eyJ…", "refresh": "eyJ…", "expiresIn": 900 },
"requiresVerification": true
}
```
Errors: `422 VALIDATION_ERROR`, `422 WEAK_PASSWORD`, `409 EMAIL_EXISTS`.
## Verify email [#verify-email]
Confirm the code from the verification email.
```json title="Request"
{ "email": "ada@example.com", "code": "123456" }
```
```json title="Response 200"
{ "success": true, "message": "Email verified successfully" }
```
Errors: `422 VALIDATION_ERROR`, `400 INVALID_CODE`.
## Resend the verification code [#resend-the-verification-code]
Send a new verification code.
```json title="Request"
{ "email": "ada@example.com" }
```
```json title="Response 200"
{ "message": "Verification code sent" }
```
If no account exists, the response is still `200` (`"If the account exists, a new code has been sent."`), so the endpoint doesn't reveal which emails are registered. Returns `400 ALREADY_VERIFIED` for a verified email.
## Sign in [#sign-in]
Exchange email and password for tokens.
```bash
curl -X POST https://api.coaade.com/v1/auth/sign-in \
-H "Content-Type: application/json" \
-d '{ "email": "ada@example.com", "password": "correct-Horse-7!", "deviceId": "laptop-1" }'
```
```json title="Response 200"
{
"user": { "id": "4b1c…", "email": "ada@example.com", "displayName": "Ada", "phone": null },
"tokens": { "access": "eyJ…", "refresh": "eyJ…", "expiresIn": 900 },
"subscription": { "planId": "pro", "status": "active", "currentPeriodEnd": "2026-12-11T00:00:00.000Z" },
"license": "…",
"phoneVerified": false
}
```
`subscription` is `null` for an account without one. `license` is a signed license for offline apps such as the Desktop App.
Errors:
| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `INVALID_CREDENTIALS` | Wrong email or password. The message is the same either way. |
| 403 | `EMAIL_NOT_VERIFIED` | The email isn't verified. A new code has been sent. |
| 422 | `VALIDATION_ERROR` | A field is missing |
## Refresh tokens [#refresh-tokens]
Exchange a refresh token for a new token pair.
```json title="Request"
{ "refreshToken": "eyJ…", "deviceId": "laptop-1" }
```
```json title="Response 200"
{ "tokens": { "access": "eyJ…", "refresh": "eyJ…", "expiresIn": 900 } }
```
Store the **new** refresh token; it replaces the old one.
Errors: `401 TOKEN_EXPIRED`, `401 TOKEN_REVOKED`, `401 USER_NOT_FOUND`.
## Forgot password [#forgot-password]
Email a reset code if the account exists.
```json title="Request"
{ "email": "ada@example.com" }
```
Always returns `202 Accepted`, whether or not the account exists.
## Reset password [#reset-password]
Set a new password with the reset code.
```json title="Request"
{ "email": "ada@example.com", "code": "123456", "newPassword": "new-Horse-8!stable" }
```
```json title="Response 200"
{ "success": true, "message": "Password updated. Please sign in." }
```
A reset **revokes every refresh token** for the account, signing it out on all devices.
Errors: `422 VALIDATION_ERROR`, `422 WEAK_PASSWORD`, `400 INVALID_CODE`, `404 USER_NOT_FOUND`.
## Storing tokens safely [#storing-tokens-safely]
- Keep refresh tokens out of `localStorage` in web apps where you can; prefer secure, HTTP-only cookies set by your backend.
- On desktop, store them in the OS keychain or a file only the user can read.
- Never log tokens or put them in URLs.
# Call models (/docs/api/chat-completions)
Call Coaade's models from your own code with a `coaade_sk_` API key. It's a plain HTTPS API: send a JSON request and get the answer back as JSON, or as a stream of Server-Sent Events. Any HTTP client works.
You name the model you want. Coaade routes the call through its pipeline to that model and returns the answer. You never connect to a model provider yourself.
## What you need [#what-you-need]
- An API key with the **Call models** permission turned on. Create or edit keys in the [Coaade Console](https://platform.coaade.com/api-keys), or in coaade.com **Settings → API keys & MCP**. See [API keys](/docs/api/api-keys#permissions).
- The base URL `https://api.coaade.com/v1`.
A key is MCP-only until you turn on **Call models**. A key without that permission gets `403 model_access_disabled`.
## Endpoints [#endpoints]
Send a conversation, get a completion. Set `stream: true` for Server-Sent Events.
List the models this key can call. The list depends on the key owner's plan.
## Quickstart [#quickstart]
Send the key as `Authorization: Bearer coaade_sk_…`. The examples read it from the `COAADE_API_KEY` environment variable.
```bash
curl https://api.coaade.com/v1/chat/completions \
-H "Authorization: Bearer $COAADE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "coaade-mind-1",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Write a haiku about databases." }
]
}'
```
Uses the [requests](https://pypi.org/project/requests/) package (`pip install requests`).
```python
import os
import requests
response = requests.post(
"https://api.coaade.com/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['COAADE_API_KEY']}"},
json={
"model": "coaade-mind-1",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a haiku about databases."},
],
},
timeout=60,
)
response.raise_for_status()
completion = response.json()
print(completion["choices"][0]["message"]["content"])
```
Uses the built-in `fetch` (Node.js 18 or later, as an ES module).
```js
const response = await fetch('https://api.coaade.com/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COAADE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'coaade-mind-1',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Write a haiku about databases.' },
],
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const completion = await response.json();
console.log(completion.choices[0].message.content);
```
## Choosing a model [#choosing-a-model]
Name the model in the `model` field. `GET /v1/models` returns the ids your key can use.
| Model id | Name | Plans |
| --- | --- | --- |
| `coaade-mind-1` | Coaade Mind 1.0 | All plans |
| `coaade-code-2` | Coaade Code 2.0 | Paid plans (Pro, Team, Enterprise) |
- An unknown model id returns `404 model_not_found`.
- A model your plan can't use returns `403 model_not_in_plan`. For example, `coaade-code-2` on the Free plan.
- `coaade-mind-1.0` and `coaade-code-2.0` are accepted as aliases. Responses echo the short id (`coaade-mind-1`, `coaade-code-2`).
See [Models and skills](/docs/api/models-and-skills#models-for-the-api) for more on each model.
## Streaming [#streaming]
Set `stream: true` to receive the answer as it's written, over Server-Sent Events. Each event is a `data:` line holding one `chat.completion.chunk` object as JSON; the stream ends with `data: [DONE]`.
```bash
curl https://api.coaade.com/v1/chat/completions \
-H "Authorization: Bearer $COAADE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "coaade-mind-1",
"messages": [{ "role": "user", "content": "Count to five." }],
"stream": true,
"stream_options": { "include_usage": true }
}'
```
A chunk looks like this:
```json
{
"id": "chatcmpl-8d2e…",
"object": "chat.completion.chunk",
"created": 1767225600,
"model": "coaade-mind-1",
"choices": [{ "index": 0, "delta": { "content": "One, two," }, "finish_reason": null }]
}
```
Every chunk in a stream has the same `id`, `created` and `model`. The first chunk carries the assistant role, with `delta` set to `{ "role": "assistant", "content": "" }`. Each chunk after it adds a slice of the answer in `choices[0].delta.content`; concatenate them. The last one has an empty `delta` and `finish_reason` set. With `stream_options.include_usage`, one more chunk follows with the token `usage` and an empty `choices` array, then `data: [DONE]`.
The stream can also carry keep-alive comment lines that start with `:`; skip them. If the request fails after the stream has started, the last event before `data: [DONE]` is an error object in the shape described under [Errors](#errors).
To read the stream, take it line by line and parse each `data:` line:
```python
import json
import os
import requests
with requests.post(
"https://api.coaade.com/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['COAADE_API_KEY']}"},
json={
"model": "coaade-mind-1",
"messages": [{"role": "user", "content": "Count to five."}],
"stream": True,
},
stream=True,
timeout=60,
) as response:
response.raise_for_status()
for line in response.iter_lines():
# Skip blank lines, keep-alive comments and the end marker.
if not line.startswith(b"data: ") or line == b"data: [DONE]":
continue
chunk = json.loads(line.removeprefix(b"data: "))
if "error" in chunk:
raise RuntimeError(chunk["error"]["message"])
for choice in chunk["choices"]:
print(choice["delta"].get("content", ""), end="", flush=True)
```
```js
const response = await fetch('https://api.coaade.com/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COAADE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'coaade-mind-1',
messages: [{ role: 'user', content: 'Count to five.' }],
stream: true,
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const decoder = new TextDecoder();
let buffer = '';
for await (const bytes of response.body) {
buffer += decoder.decode(bytes, { stream: true });
const lines = buffer.split('\n');
buffer = lines.pop(); // an unfinished line waits for the next read
for (const line of lines) {
// Skip blank lines, keep-alive comments and the end marker.
if (!line.startsWith('data: ') || line === 'data: [DONE]') continue;
const chunk = JSON.parse(line.slice('data: '.length));
if (chunk.error) throw new Error(chunk.error.message);
for (const choice of chunk.choices) process.stdout.write(choice.delta.content ?? '');
}
}
```
## reasoning_effort [#reasoning_effort]
Coaade Mind 1.0 can think before it answers. Set `reasoning_effort` to control how much:
| Value | Effect |
| --- | --- |
| `off` | No thinking. Fastest. |
| `low` | Default. A short planning step. |
| `high` | More thinking for harder problems. |
The model's thinking is never returned; you get only the final answer. Other models ignore this parameter.
```json
{
"model": "coaade-mind-1",
"messages": [{ "role": "user", "content": "Plan a schema for a blog." }],
"reasoning_effort": "high"
}
```
## Parameters [#parameters]
Each message is `{ "role": "...", "content": "..." }`. Roles are `system`, `user`, `assistant` and `tool`. A `developer` message is also accepted and treated like a `system` message. `content` is text: a string, or an array of `{ "type": "text", "text": "..." }` parts. Image, audio and file parts return `400 unsupported_content`. An `assistant` message can carry `tool_calls`, and a `tool` message carries the `tool_call_id` it answers: see [Tool calling](#tool-calling).
A `system` message sets the assistant's instructions, persona and output format. Use it to tell the model who it is and how to answer.
The model calls only the tools you define in `tools`, and your code runs them. Coaade's own tools, such as web search, aren't available through this API.
## Response [#response]
A non-streamed response is a `chat.completion` object. `choices` holds one choice, whose `message` is the assistant's answer.
```json title="Response 200"
{
"id": "chatcmpl-8d2e…",
"object": "chat.completion",
"created": 1767225600,
"model": "coaade-mind-1",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Rows wait in silence…" },
"finish_reason": "stop",
"logprobs": null
}
],
"usage": { "prompt_tokens": 18, "completion_tokens": 24, "total_tokens": 42 }
}
```
- `finish_reason` is `stop` when the model finished, `tool_calls` when it asks you to call tools (see [Tool calling](#tool-calling)), or `length` when the answer hit `max_tokens` (or another output cap). A cut answer is not continued.
- `usage` reports the token counts for the request.
- `created` is a Unix timestamp in seconds. `logprobs` is always `null`.
- Each response carries an `x-request-id` header, matching the `id`. Quote it if you contact support.
## Tool calling [#tool-calling]
Give the model functions it can call, such as a weather lookup or a database query. Describe each one in `tools`. When the model wants to use one, the reply carries `tool_calls` instead of an answer (or with a short one), and `finish_reason` is `tool_calls`.
Coaade never runs a tool. Your code runs the call, sends the result back in a `tool` message, and calls the API again. Both `coaade-mind-1` and `coaade-code-2` take tools.
### The tool loop [#the-tool-loop]
Send the conversation with your `tools`.
If `finish_reason` is `tool_calls`, run each call in `message.tool_calls`. A call has an `id`, the function's `name` and its `arguments`: a JSON object, as a string. Parse the arguments and check them before you use them, since the model wrote them.
Add the assistant message to the conversation as you got it, `tool_calls` included. Then add one `tool` message per call: `{ "role": "tool", "tool_call_id": "", "content": "" }`.
Call the API again with the same `tools`. Repeat until `finish_reason` is `stop`. Give the loop a step limit, so a model that keeps calling tools can't run it forever.
Every call needs its own `tool` message, after the assistant message that made it and before the next `user` or `assistant` message. The tool messages for one reply can come in any order. A reply only calls tools you defined, and its arguments are exactly what the model wrote. A reply cut off by `max_tokens` (`finish_reason` `length`) may hold a call with incomplete arguments: don't send that one back, raise `max_tokens` and ask again.
### Defining tools [#defining-tools]
```json
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a city.",
"parameters": {
"type": "object",
"properties": {
"city": { "type": "string", "description": "The city, such as Paris" }
},
"required": ["city"]
}
}
}
```
- `name`: 1 to 64 letters, digits, underscores or dashes, different for each tool.
- `description`: what the tool does and when to use it. The model reads it to decide.
- `parameters`: a JSON Schema for the arguments object, with `"type": "object"`. Leave it out for a tool that takes no arguments.
- A request takes up to 128 tools, and the `tools` array may be at most 200,000 characters as JSON. Tool definitions count toward the model's context, like the messages.
`tool_choice` controls whether the model calls a tool:
| Value | Effect |
| --- | --- |
| `"auto"` | Default. The model decides. |
| `"required"` | The model calls at least one tool. |
| `"none"` | The model answers without calling a tool. |
| `{ "type": "function", "function": { "name": "get_weather" } }` | The model calls that tool. |
A reply can call several tools at once. Set `parallel_tool_calls` to `false` for at most one call per reply.
### Example [#example]
The first request offers the tool:
```bash
curl https://api.coaade.com/v1/chat/completions \
-H "Authorization: Bearer $COAADE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "coaade-mind-1",
"messages": [{ "role": "user", "content": "What is the weather in Paris?" }],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a city.",
"parameters": {
"type": "object",
"properties": { "city": { "type": "string", "description": "The city, such as Paris" } },
"required": ["city"]
}
}
}
]
}'
```
The reply asks for the call:
```json title="Response 200"
{
"id": "chatcmpl-8d2e…",
"object": "chat.completion",
"created": 1767225600,
"model": "coaade-mind-1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "call_Qm3T8xVf2LhK9pW1sR4yZc6N",
"type": "function",
"function": { "name": "get_weather", "arguments": "{\"city\": \"Paris\"}" }
}
]
},
"finish_reason": "tool_calls",
"logprobs": null
}
],
"usage": { "prompt_tokens": 96, "completion_tokens": 18, "total_tokens": 114 }
}
```
Run the call, then send the conversation back with the assistant message and the result:
```bash
curl https://api.coaade.com/v1/chat/completions \
-H "Authorization: Bearer $COAADE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "coaade-mind-1",
"messages": [
{ "role": "user", "content": "What is the weather in Paris?" },
{
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "call_Qm3T8xVf2LhK9pW1sR4yZc6N",
"type": "function",
"function": { "name": "get_weather", "arguments": "{\"city\": \"Paris\"}" }
}
]
},
{
"role": "tool",
"tool_call_id": "call_Qm3T8xVf2LhK9pW1sR4yZc6N",
"content": "{\"temperature_c\": 18, \"sky\": \"sunny\"}"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a city.",
"parameters": {
"type": "object",
"properties": { "city": { "type": "string", "description": "The city, such as Paris" } },
"required": ["city"]
}
}
}
]
}'
```
This time `finish_reason` is `stop`, and `message.content` holds the answer.
The whole loop, with the [requests](https://pypi.org/project/requests/) package:
```python
import json
import os
import requests
TOOLS = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather in a city.",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string", "description": "The city, such as Paris"}},
"required": ["city"],
},
},
}
]
def get_weather(city):
# Your own code: call a weather service, read a database, and so on.
return {"city": city, "temperature_c": 18, "sky": "sunny"}
def run_tool(call):
args = json.loads(call["function"]["arguments"])
if call["function"]["name"] == "get_weather":
return get_weather(str(args.get("city", "")))
return {"error": "unknown tool"}
messages = [{"role": "user", "content": "What is the weather in Paris?"}]
for step in range(5):
response = requests.post(
"https://api.coaade.com/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['COAADE_API_KEY']}"},
json={"model": "coaade-mind-1", "messages": messages, "tools": TOOLS},
timeout=60,
)
response.raise_for_status()
choice = response.json()["choices"][0]
message = choice["message"]
if choice["finish_reason"] != "tool_calls":
print(message["content"])
break
# The assistant message as it came, then one tool message per call.
messages.append(message)
for call in message["tool_calls"]:
result = run_tool(call)
messages.append({"role": "tool", "tool_call_id": call["id"], "content": json.dumps(result)})
```
The whole loop, with the built-in `fetch` (Node.js 18 or later, as an ES module):
```js
const tools = [
{
type: 'function',
function: {
name: 'get_weather',
description: 'Get the current weather in a city.',
parameters: {
type: 'object',
properties: { city: { type: 'string', description: 'The city, such as Paris' } },
required: ['city'],
},
},
},
];
// Your own code: call a weather service, read a database, and so on.
function getWeather(city) {
return { city, temperature_c: 18, sky: 'sunny' };
}
function runTool(call) {
const args = JSON.parse(call.function.arguments);
if (call.function.name === 'get_weather') return getWeather(String(args.city ?? ''));
return { error: 'unknown tool' };
}
const messages = [{ role: 'user', content: 'What is the weather in Paris?' }];
for (let step = 0; step < 5; step++) {
const response = await fetch('https://api.coaade.com/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COAADE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ model: 'coaade-mind-1', messages, tools }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const { message, finish_reason } = (await response.json()).choices[0];
if (finish_reason !== 'tool_calls') {
console.log(message.content);
break;
}
// The assistant message as it came, then one tool message per call.
messages.push(message);
for (const call of message.tool_calls) {
messages.push({ role: 'tool', tool_call_id: call.id, content: JSON.stringify(runTool(call)) });
}
}
```
### Streaming tool calls [#streaming-tool-calls]
With `stream: true`, the calls arrive in `delta.tool_calls`, after any answer text. Each piece has the call's `index` in the reply. The first piece of a call carries its `id`, `type` and `function.name`; its `function.arguments` can come in more than one piece, so join them by `index`. Then comes a chunk with `finish_reason` `tool_calls`, the `usage` chunk if you asked for it, and `data: [DONE]`.
Send the first request of the example with `"stream": true`. The stream looks like this:
```text
data: {"id":"chatcmpl-8d2e…","object":"chat.completion.chunk","created":1767225600,"model":"coaade-mind-1","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
data: {"id":"chatcmpl-8d2e…","object":"chat.completion.chunk","created":1767225600,"model":"coaade-mind-1","choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_Qm3T8xVf2LhK9pW1sR4yZc6N","type":"function","function":{"name":"get_weather","arguments":"{\"city\": \"Paris\"}"}}]},"finish_reason":null}]}
data: {"id":"chatcmpl-8d2e…","object":"chat.completion.chunk","created":1767225600,"model":"coaade-mind-1","choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}]}
data: [DONE]
```
```python
import json
import os
import requests
with requests.post(
"https://api.coaade.com/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['COAADE_API_KEY']}"},
json={
"model": "coaade-mind-1",
"messages": [{"role": "user", "content": "What is the weather in Paris?"}],
"tools": TOOLS, # as in the example above
"stream": True,
},
stream=True,
timeout=60,
) as response:
response.raise_for_status()
calls = {}
for line in response.iter_lines():
# Skip blank lines, keep-alive comments and the end marker.
if not line.startswith(b"data: ") or line == b"data: [DONE]":
continue
chunk = json.loads(line.removeprefix(b"data: "))
if "error" in chunk:
raise RuntimeError(chunk["error"]["message"])
for choice in chunk["choices"]:
delta = choice["delta"]
print(delta.get("content") or "", end="", flush=True)
# A call can come in pieces: join them by index.
for piece in delta.get("tool_calls", []):
call = calls.setdefault(piece["index"], {"id": "", "name": "", "arguments": ""})
call["id"] = piece.get("id") or call["id"]
call["name"] = piece.get("function", {}).get("name") or call["name"]
call["arguments"] += piece.get("function", {}).get("arguments") or ""
# Run these as in the loop above. To send them back, add an assistant message with
# "tool_calls": [{"id": ..., "type": "function", "function": {"name": ..., "arguments": ...}}].
for call in calls.values():
print(call["id"], call["name"], call["arguments"])
```
```js
const response = await fetch('https://api.coaade.com/v1/chat/completions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.COAADE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'coaade-mind-1',
messages: [{ role: 'user', content: 'What is the weather in Paris?' }],
tools, // as in the example above
stream: true,
}),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const calls = [];
const decoder = new TextDecoder();
let buffer = '';
for await (const bytes of response.body) {
buffer += decoder.decode(bytes, { stream: true });
const lines = buffer.split('\n');
buffer = lines.pop(); // an unfinished line waits for the next read
for (const line of lines) {
// Skip blank lines, keep-alive comments and the end marker.
if (!line.startsWith('data: ') || line === 'data: [DONE]') continue;
const chunk = JSON.parse(line.slice('data: '.length));
if (chunk.error) throw new Error(chunk.error.message);
for (const { delta } of chunk.choices) {
process.stdout.write(delta.content ?? '');
// A call can come in pieces: join them by index.
for (const piece of delta.tool_calls ?? []) {
const call = (calls[piece.index] ??= { id: '', name: '', arguments: '' });
call.id = piece.id ?? call.id;
call.name = piece.function?.name ?? call.name;
call.arguments += piece.function?.arguments ?? '';
}
}
}
}
// Run these as in the loop above. To send them back, add an assistant message with
// tool_calls: [{ id, type: 'function', function: { name, arguments } }].
for (const call of calls) console.log(call.id, call.name, call.arguments);
```
### Tool calling errors [#tool-calling-errors]
A tools request that fails a check gets `400 invalid_tools`, with `param` naming the field:
```json
{
"error": {
"message": "tools[0].function.name must be 1 to 64 letters, digits, underscores or dashes.",
"type": "invalid_request_error",
"param": "tools[0].function.name",
"code": "invalid_tools"
}
}
```
See [Errors](/docs/api/errors#tool-calling) for every check.
### Try tools with MCP servers in the Workbench [#try-tools-with-mcp-servers-in-the-workbench]
In the console's [Workbench](https://platform.coaade.com/workbench), you can connect your remote MCP servers and watch the model call their tools step by step. Pick a server you set up in coaade.com **Settings → Plugins**, or add one by its https URL, with an API key header if it needs one, or its OAuth sign-in. Coaade calls the server for you, and each call shows with its arguments, its result and how long it took.
- By default every call waits until you click **Approve** or **Deny**. A server's read-only and destructive labels are the server's own claim, so they don't decide on their own. Turn on a server's **Run tools this server marks read-only without asking** switch to run the tools it marks read-only without waiting. The global **Run tools without asking** switch runs every call without waiting — including tools that change data — except ones the server marks destructive, which always ask.
- A run makes up to 10 model calls and 20 tool calls in 5 minutes. One tool call has 20 seconds, and a long result is cut at 16,000 characters.
- Runs are metered like any other Workbench run. The tool calls themselves cost nothing.
- Header values and sign-in tokens stay encrypted with Coaade and never come back to the browser. Logs keep metadata only: never a tool's arguments or results.
This happens only in the Workbench. The API never calls an MCP server or runs a tool: **Get code** shows the same request with the servers' tools as function tools, and your code runs the calls the model makes, as in [the tool loop](#the-tool-loop).
## Errors [#errors]
An error response has a non-2xx status and a JSON body with an `error` object: a human-readable `message`, the error's `type` and a machine-readable `code`. An error about one field of the request also has `param`, naming it, such as `tools[0].function.name`. Branch on `code`.
```json
{
"error": {
"message": "This API key can't call models. Turn on model access for it in your Coaade API key settings, or use a key that has it.",
"type": "permission_error",
"code": "model_access_disabled"
}
}
```
| Status | `code` | When |
| --- | --- | --- |
| 401 | `invalid_api_key` | The key is missing, malformed or unknown |
| 403 | `model_access_disabled` | The key doesn't have the Call models permission |
| 403 | `model_not_in_plan` | The key's plan can't use this model |
| 404 | `model_not_found` | No such model id |
| 400 | `invalid_tools` | A tool, `tool_choice`, `parallel_tool_calls`, an assistant message's `tool_calls` or a `tool` message is invalid. `param` names the field |
| 400 | `tools_not_supported` | The model can't call tools |
| 400 | `unsupported_content` | A message had a non-text part (image, audio, file) |
| 400 | `unsupported_parameter` | `n` was set to something other than 1, or the request used `functions`, `function_call` or `function` messages (send `tools` and `tool` messages instead) |
| 422 | `invalid_request` | The body failed validation (a bad field or a missing one) |
| 422 | `locality_claim` | The system prompt told the assistant to claim it runs on the user's own device |
| 413 | `context_length_exceeded` | The conversation is too long for the model |
| 429 | `rate_limit_exceeded` | A rate or fair-use limit was hit |
| 429 | `model_busy` | The model is at capacity; retry shortly (see `Retry-After`) |
| 502 | `model_error` | The model request failed |
| 504 | `model_timeout` | The model took too long; for long answers, stream |
| 503 | `api_models_disabled` | Model calls over the API are turned off right now |
| 503 | `service_unavailable` | Coaade couldn't check the key or plan right now; retry |
`locality_claim` stops a system prompt that instructs the assistant to tell end users their data never leaves their machine. Requests are processed on Coaade Cloud, so that statement would be inaccurate. Remove the claim, or describe data handling in your own privacy policy. See [Errors](/docs/api/errors#model-api-errors) for the full shape.
## Limits [#limits]
- **Per-key rate limits** cap how many requests a key may send over a short window.
- **Fair-use limits** apply per plan and model. Going too fast returns `429 rate_limit_exceeded`.
When you're limited, wait and retry with backoff. Honor the `Retry-After` header when it's present. Limit numbers aren't published and may change.
To hear before a model's daily allowance runs out, turn on [usage alerts](/docs/api/usage-alerts): an email, or a signed webhook, at 50, 80 or 100 percent of it.
Billing is your subscription. Model calls over the API don't spend AI credits.
## Privacy [#privacy]
Coaade routes each call through its pipeline to the model you name and returns the answer. **Prompts and answers are never stored or logged**, unless you turn on [private debugging](/docs/api/private-debugging) for a key. Then that key's calls are stored encrypted so only you can read them, for 7 days, and nobody else's are.
The console's [Logs](https://platform.coaade.com/logs) page shows metadata only for each request made with a key: the time, the key, the model, the status, the latency and the token counts. Without private debugging on for the key, it never holds a prompt, an answer or a request body, so no tool definition, tool call or tool result either.
# Errors (/docs/api/errors)
Errors return a non-2xx status and a JSON body with a machine-readable `error` code and a human-readable `message`:
```json
{
"error": "INVALID_CREDENTIALS",
"message": "Invalid email or password"
}
```
Some errors add fields. For example, `KEY_LIMIT_REACHED` includes `limit` and `used`.
Branch on `error`, not on `message`; messages may change.
The [model API](/docs/api/chat-completions) uses a different error shape. See [Model API errors](#model-api-errors).
## Status codes [#status-codes]
| Status | Meaning |
| --- | --- |
| `400` | The request was understood but can't be done, such as a wrong verification code |
| `401` | Missing, invalid or expired credentials |
| `402` | Payment is needed, for example checkout before a plan change |
| `403` | You're signed in but not allowed, such as a plan limit |
| `404` | The resource doesn't exist |
| `409` | It conflicts with existing data, such as an email that's already registered |
| `422` | The body failed validation |
| `429` | Rate limit exceeded |
| `502` | The payment provider failed; try again |
| `503` | A dependency, such as billing, isn't available |
## Error codes [#error-codes]
| Code | Status | When |
| --- | --- | --- |
| `UNAUTHORIZED` | 401 | No `Authorization: Bearer` header |
| `TOKEN_EXPIRED` | 401 | The access or refresh token is invalid or expired |
| `TOKEN_REVOKED` | 401 | The refresh token was revoked, for example after a password reset |
| `INVALID_CREDENTIALS` | 401 | Wrong email or password |
| `EMAIL_NOT_VERIFIED` | 403 | The email isn't verified. A new code is sent automatically on sign-in. |
| `EMAIL_EXISTS` | 409 | An account already uses this email |
| `ALREADY_VERIFIED` | 400 | The email is already verified |
| `INVALID_CODE` | 400 | A verification or reset code is wrong or expired |
| `WEAK_PASSWORD` | 422 | The password fails the [password rules](/docs/get-started/account#password-rules) |
| `VALIDATION_ERROR` | 422 | A field is missing or invalid |
| `USER_NOT_FOUND` | 404 | The account doesn't exist |
| `PLAN_NOT_FOUND` | 404 | The plan ID doesn't exist |
| `PLAN_NOT_PURCHASABLE` | 422 | The plan is free or custom (Enterprise) |
| `CHECKOUT_REQUIRED` | 402 | The plan change needs checkout first |
| `NO_SUBSCRIPTION` | 404 | There's no paid plan to cancel or reactivate |
| `BILLING_UNAVAILABLE` | 503 | Billing isn't configured |
| `BILLING_ERROR` | 502 | The payment provider failed |
| `KEY_LIMIT_REACHED` | 403 | The plan's API key limit is reached |
| `KEY_NOT_FOUND` | 404 | The API key doesn't exist or is already revoked |
| `UPGRADE_REQUIRED` | 403 | Team seats need a Team or Enterprise plan |
| `SEAT_LIMIT_REACHED` | 403 | No seats left |
| `ALREADY_INVITED` | 409 | This email already has a seat or invitation |
| `OWNER_SEAT` | 422 | The owner already has a seat |
| `SEAT_NOT_FOUND` | 404 | The seat doesn't exist |
| `NOT_A_MEMBER` | 404 | You aren't on a team |
## Model API errors [#model-api-errors]
The [model API](/docs/api/chat-completions) (`POST /v1/chat/completions` and `GET /v1/models`) uses a different shape. The body is an `error` object with a human-readable `message`, the error's `type` and a machine-readable `code`:
```json
{
"error": {
"message": "The model \"my-model\" does not exist. Available models: coaade-code-2, coaade-mind-1.",
"type": "not_found_error",
"code": "model_not_found"
}
}
```
`type` is one of `authentication_error`, `permission_error`, `not_found_error`, `invalid_request_error`, `rate_limit_error` or `server_error`. An error about one field of the request also has `param`, naming it. Branch on `code`. The [Call models](/docs/api/chat-completions#errors) page lists every code with its status.
### Tool calling [#tool-calling]
A request with [tools](/docs/api/chat-completions#tool-calling) that fails one of these checks gets `400 invalid_tools`, with `param` naming the field:
```json
{
"error": {
"message": "messages[2].tool_call_id is \"call_x\", which is not one of the tool calls in messages[1].",
"type": "invalid_request_error",
"param": "messages[2].tool_call_id",
"code": "invalid_tools"
}
}
```
| Check | `param` |
| --- | --- |
| `tools` is an array of at most 128 tools, at most 200,000 characters as JSON | `tools` |
| Each tool is `{ "type": "function", "function": { ... } }` | `tools[i]`, `tools[i].type`, `tools[i].function` |
| A name is 1 to 64 letters, digits, underscores or dashes, different for each tool | `tools[i].function.name` |
| `description` is a string | `tools[i].function.description` |
| `parameters` is a JSON Schema object with `"type": "object"`, or has no type | `tools[i].function.parameters` |
| `tool_choice` is `"auto"`, `"none"`, `"required"` or a function in `tools`; `"required"` needs tools | `tool_choice` |
| `parallel_tool_calls` is `true` or `false` | `parallel_tool_calls` |
| An assistant message's `tool_calls` is an array of calls, each with an `id` of its own, `type` `"function"`, a valid name and `arguments` that are a JSON object, as a string | `messages[i].tool_calls[j]` and its fields |
| A `tool` message has a `tool_call_id` | `messages[i].tool_call_id` |
| A `tool` message follows the assistant message whose call it answers, with only other tool messages between | `messages[i]` |
| Its `tool_call_id` is one of that message's calls, answered once | `messages[i].tool_call_id` |
| Every call has its tool message before the next user or assistant message | `messages[i].tool_calls` |
`functions`, `function_call` and `function` messages, the older form of tools, get `400 unsupported_parameter`: send `tools` and `tool` messages instead.
## Handling expired tokens [#handling-expired-tokens]
When a call returns `401` with `TOKEN_EXPIRED`, [refresh](/docs/api/authentication#refresh-tokens) and retry once. If the refresh also fails, sign the user in again.
```ts
async function call(path: string, init: RequestInit = {}) {
let res = await fetch(`https://api.coaade.com${path}`, withAuth(init, tokens.access));
if (res.status === 401) {
tokens = await refresh(tokens.refresh); // POST /v1/auth/refresh
res = await fetch(`https://api.coaade.com${path}`, withAuth(init, tokens.access));
}
return res;
}
```
# API overview (/docs/api)
The Coaade Cloud API is the REST API behind coaade.com, the Cloud IDE, the Desktop App and the CLI. Use it to sign users in, read and change their plan, manage API keys and team seats, read usage, and [call Coaade models](/docs/api/chat-completions) with an API key.
## Base URL [#base-url]
```text
https://api.coaade.com
```
All endpoints on these pages are under `/v1`. Always use HTTPS.
## Authentication [#authentication]
Most endpoints need an **access token** in the `Authorization` header:
```bash
curl https://api.coaade.com/v1/account \
-H "Authorization: Bearer $ACCESS_TOKEN"
```
Get tokens by [signing in](/docs/api/authentication#sign-in). Access tokens last **15 minutes** (`expiresIn: 900`); use the refresh token to get a new pair. Refresh tokens last **30 days**.
Each endpoint shows what it needs:
Needs an access token.
Public.
## Requests and responses [#requests-and-responses]
- Send JSON bodies with `Content-Type: application/json`.
- Responses are JSON.
- Timestamps are ISO 8601 strings in UTC.
- Prices are integers in **cents** (USD).
- Errors share one format. See [Errors](/docs/api/errors).
## Rate limits [#rate-limits]
| Caller | Limit |
| --- | --- |
| Signed in (valid access token) | 100 requests per minute **per user** |
| Anonymous, or with an invalid token | 100 requests per minute **per IP address** |
| `POST /v1/auth/password-check` | 60 requests per minute |
Counting signed-in calls per user means people behind one office or school address don't share a limit. When you go over, the API returns `429 Too Many Requests`; wait and retry with backoff.
## CORS [#cors]
Browsers can call the API from `https://coaade.com`, `https://*.coaade.com`, `https://coaade.app` and `https://*.coaade.app`, with credentials. For other origins, call the API from your server.
## Health check [#health-check]
```bash
curl https://api.coaade.com/health
```
```json
{ "status": "ok", "timestamp": "2026-11-11T09:30:00.000Z", "version": "0.1.0" }
```
## Endpoints [#endpoints]
| Group | Endpoints |
| --- | --- |
| [Authentication](/docs/api/authentication) | Sign up, verify email, sign in, refresh, reset password |
| [Account](/docs/api/account) | Read, update and delete the signed-in account |
| [Subscriptions](/docs/api/subscriptions) | Plans, the current subscription, checkout, plan changes, cancellation |
| [API keys](/docs/api/api-keys) | Create, list, revoke and verify `coaade_sk_` keys |
| [Usage](/docs/api/usage) | Live quotas and monthly summaries |
| [Team licenses](/docs/api/team-licenses) | Team seats |
| [Models and skills](/docs/api/models-and-skills) | Public model and skill-pack registries |
| [Call models](/docs/api/chat-completions) | `POST /v1/chat/completions`, `GET /v1/models`: call Coaade models with an API key |
| [MCP server](/docs/api/mcp-server) | `POST /mcp`: 57 tools for MCP clients, with Sign in with Coaade (OAuth 2.1) or an API key |
# MCP server (/docs/api/mcp-server)
Coaade MCP lets any MCP client work on a user's Coaade projects. Clients sign in with Coaade (OAuth 2.1) or send a Coaade API key. It's available on every plan, including Free, and the plan's limits apply. For client setup, see [Connect your AI](/docs/cloud-ide/connect-your-ai).
It's one server for the whole account: new Coaade products add tool groups here rather than new servers, so client setups keep working.
## Endpoint [#endpoint]
MCP over Streamable HTTP. Stateless with JSON responses: no sessions and no server-to-client stream.
| | |
| --- | --- |
| URL | `https://api.coaade.com/mcp` |
| Transport | Streamable HTTP, stateless, JSON responses |
| Methods | `POST` only. `GET` and `DELETE` return `405`. |
| Capabilities | `tools`, `resources` |
| Server name | `coaade` |
The server sends instructions on `initialize` that tell the client's AI how to work: start with `list_projects` and `get_project`, pass `project` (and `owner` for shared projects) to project tools, and confirm destructive tools with the user.
## Authentication [#authentication]
Every request needs a bearer token: either an OAuth access token from **Sign in with Coaade**, or a Coaade API key. Either way it acts as the user, with their plan, their projects and their role on shared projects.
| Token | Looks like | Get it |
| --- | --- | --- |
| OAuth access token | `coaade_at_…` | The OAuth flow below. Lasts 1 hour. |
| API key | `coaade_sk_…` | The IDE's [MCP page](https://ide.coaade.com/mcp) or [`POST /v1/api-keys`](/docs/api/api-keys#create-a-key) |
```http
Authorization: Bearer coaade_sk_…
```
A request without valid credentials returns `401` with a `WWW-Authenticate` header that points OAuth-capable clients at the discovery document:
```http
WWW-Authenticate: Bearer resource_metadata="https://api.coaade.com/.well-known/oauth-protected-resource/mcp", scope="mcp:full"
```
## Sign in with Coaade (OAuth 2.1) [#sign-in-with-coaade-oauth-21]
Clients that support MCP authorization (ChatGPT, Claude, Claude Code, VS Code, Cursor and others) connect with just the URL. The flow follows the MCP authorization spec:
### Discover [#discover]
The client reads the protected resource metadata (RFC 9728) at `/.well-known/oauth-protected-resource/mcp`, then the authorization server metadata (RFC 8414) at `/.well-known/oauth-authorization-server` (also served at `/.well-known/openid-configuration`).
### Register [#register]
Public clients, no secret. Either register dynamically with `POST /oauth/register` (RFC 7591), or use a Client ID Metadata Document: an `https` URL as the `client_id`, which Coaade fetches and caches for an hour.
### Authorize [#authorize]
Send the user to `GET /oauth/authorize` with **PKCE (S256, required)** and `resource=https://api.coaade.com/mcp`. Coaade redirects them to **coaade.com/oauth/authorize**, where they sign in, see your app's name and where it returns, choose **Full access** or **Read only**, and approve or decline. The browser comes back to your `redirect_uri` with `code`, `state` and `iss`.
### Get tokens [#get-tokens]
`POST /oauth/token` (form or JSON body):
| Grant | Gives |
| --- | --- |
| `authorization_code` | A 1-hour access token (`coaade_at_…`) and a 60-day refresh token (`coaade_rt_…`). Codes are single-use, last 10 minutes, and the PKCE verifier is checked. |
| `refresh_token` | A new pair. Both tokens rotate; **reusing a spent refresh token revokes the whole connection**. |
Clients can revoke tokens with `POST /oauth/revoke` (RFC 7009).
**Redirect URIs** may be `https`, loopback `http` on any port (RFC 8252), or an app scheme such as `cursor://` or `vscode://`. Script schemes and fragments are refused.
**Scopes** are `mcp:full` and `mcp:read`, chosen by the user on the approval screen.
**Connections.** Each approval is a connection the user sees under **Connected apps** on the IDE's MCP page and can disconnect; its tokens stop working at once. Signed-in apps can list and revoke them with `GET /v1/oauth/connections` and `DELETE /v1/oauth/connections/{id}` (bearer access token).
## Key scopes [#key-scopes]
An API key's **MCP access** (its `scope`) decides what the MCP server offers it:
| Key scope | OAuth scope | Tools offered |
| --- | --- | --- |
| `full` (default) | `mcp:full` | All tools |
| `read` | `mcp:read` | Only tools that don't change anything. `run_sql` accepts only `SELECT`, `WITH`, `EXPLAIN`, `SHOW`, `VALUES` and `TABLE` statements. |
| `none` | — | None. The server refuses the key (see below). |
Keys created before scopes existed are `full`. A key's separate **Call models** permission doesn't change what MCP offers; see [API keys](/docs/api/api-keys#permissions).
### A key with MCP access off [#a-key-with-mcp-access-off]
A key whose MCP access is **Off** (`scope: "none"`) was made for [model calls](/docs/api/chat-completions) only. `POST /mcp` logs the request, then refuses it with `403` and a JSON-RPC error (code `-32003`):
```json
{ "jsonrpc": "2.0", "error": { "code": -32003, "message": "This API key has no MCP access…" }, "id": null }
```
Connect with a key that has Full or Read-only MCP access, or turn MCP access on for this key.
## Plans [#plans]
Connecting works on every plan. These tools need **Pro or higher** and return a clear plan error on Free: `run_app_test`, `security_scan`, `pen_test`, and the Copilot CTO tools (`cto_*`, owner only).
Only `ask_coaade`, `run_app_test` and `pen_test` use the account's Coaade AI allowance. `security_scan` uses none; every other tool runs on the client's own AI.
## Rate limits [#rate-limits]
| Limit | Value |
| --- | --- |
| Per API key | 120 requests per minute (sliding window) |
| Per endpoint | 600 requests per minute |
Over the per-key limit, the server returns `429` with JSON-RPC error `-32029`. Wait a minute and retry. If Coaade can't check the credentials right now, it returns `503`; retry shortly.
The server answers with JSON, so it accepts clients whatever `Accept` header they send.
## Tool groups [#tool-groups]
Add `?groups=` with a comma-separated list to offer only some groups. Unknown names are ignored.
```text
https://api.coaade.com/mcp?groups=projects,files,deploy
```
## Tool conventions [#tool-conventions]
- **Project tools** take `project` (the slug from `list_projects`) and, for a project shared with the user, `owner` (the owner's ID from `list_projects`).
- Each tool has a minimum role: `viewer`, `editor` or `owner`. Calls below that role fail with a clear message.
- Tools carry MCP annotations: `readOnlyHint` for tools that only look, `destructiveHint` for ones that can't be undone.
- Errors come back as tool results with `isError: true` and a plain-language message.
- Results longer than 100,000 characters are cut, with a note saying so.
- File changes are saved to the project's storage automatically, a few seconds after the last change.
- Every call is recorded in an audit log with the key, tool, project, result and duration.
## Tool reference [#tool-reference]
57 tools in 12 groups. Legend: **R** read-only, **W** changes something, **D** destructive. **Role** is the minimum project role. **Paid** marks tools that need Pro or higher.
### Projects [#projects]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `list_projects` | R | — | Your projects and ones shared with you, with slugs, deploy URLs, your role and owner IDs |
| `get_project` | R | viewer | A project's live state: deploy, databases, GitHub link, schedules, Copilot CTO, App Test |
| `create_project` | W | — | Create a project (`name`, optional `template`: `blank`, `html`, `node`, `python`, `react`). Returns its slug. |
| `rename_project` | W | owner | Rename a project (`new_name`). The slug changes too. |
### Files and terminal [#files-and-terminal]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `list_files` | R | viewer | List project files |
| `read_file` | R | viewer | Read a file with line numbers. `start_line`/`end_line` for large files (up to 2,000 lines at a time). |
| `search_files` | R | viewer | Grep the project (`query`, optional `regex`, `path`, `ignore_case`, `max_results` up to 300). Skips `node_modules`, `.git`, `.venv`. |
| `write_file` | W | editor | Create or replace a whole file. Parent folders are created. |
| `edit_file` | W | editor | Replace exact text (`old_text` → `new_text`, optional `replace_all`). Fails if the text is missing or not unique. |
| `delete_file` | D | editor | Delete a file |
| `rename_file` | W | editor | Rename or move a file |
| `run_command` | W | editor | Run a shell command in the workspace and return output and exit code. `background: true` for servers and long jobs. Docker isn't available. |
| `task_output` | R | viewer | Output of a background task |
| `task_stop` | W | editor | Stop a background task |
### Deploy [#deploy]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `deploy` | W | editor | Deploy to `https://.coaade.app`. Server apps listen on `PORT`. |
| `deploy_logs` | R | viewer | Deploy and build logs |
| `deploy_set_env` | W | editor | Set environment variables for the deployed app |
| `stop_deploy` | D | owner | Take the site offline (deploy again to bring it back) |
| `list_domains` | R | owner | Custom domains and whether each is verified |
### Databases [#databases]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `db_list` | R | viewer | The project's databases |
| `db_create` | W | editor | Create a PostgreSQL, MongoDB or Redis database |
| `db_connection` | R | editor | Connection URL and credentials, for the project's `.env` only |
| `db_size` | R | viewer | Database size and limit |
| `db_delete` | D | owner | Delete a database |
| `run_sql` | R | viewer | Run SQL on a PostgreSQL database (`db_id`, `sql`). Returns rows as JSON. Viewers and read-only keys can only read. |
### GitHub [#github]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `github_status` | R | viewer | Whether GitHub is connected and the linked repository |
| `github_repos` | R | viewer | Repositories the Coaade GitHub App can use |
| `github_activity` | R | viewer | Recent commits and pull requests |
| `github_link_repo` | W | editor | Link the project to a repository |
| `github_push` | W | editor | Commit and push |
| `github_pull` | W | editor | Pull new commits |
### App Test [#app-test]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `run_app_test` | W | editor | **Paid.** Start App Test on the deployed site (`goal`, optional start `url`). Runs in the background and returns a run ID. Uses Coaade AI. |
| `list_test_runs` | R | viewer | Recent runs with goal, status and verdict |
| `get_test_run` | R | viewer | One run: status, verdict, checks, bugs with steps to reproduce, page errors, and the Playwright spec with `include_spec: true` |
### Security [#security]
These only ever test the project's **own** site: its `*.coaade.app` deploy or a verified custom domain. See [Security and pen testing](/docs/cloud-ide/security).
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `security_scan` | R | viewer | **Paid.** Passive scan of the deployed site (optional `url`): security headers, cookie flags, http→https redirect, CORS, version disclosure, exposed files. Returns findings with severity and fixes. No AI cost; read-only keys may run it. |
| `list_security_scans` | R | viewer | Recent scans: target, one-line summary and when |
| `get_security_scan` | R | viewer | One scan (`scan_id`) with every finding, its severity and fix |
| `pen_test` | W | editor | **Paid.** Start an AI pen test and QA pass (optional `goal`, `url`). Runs a few minutes in the background and returns a run ID. Uses Coaade AI. |
| `list_pentest_runs` | R | viewer | Recent pen test runs: target, status, security score and when |
| `get_pentest_run` | R | viewer | One run (`run_id`): status, score, verdict, and each finding with severity, category, evidence and fix |
### Coaade Code [#coaade-code]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `ask_coaade` | W | editor | Hand a `task` to Coaade Code. Runs in the background as an AI Chat session the user can watch on the dashboard. Optional `session_id` to continue, `autonomous` (default `true`, paid plans). |
| `get_session` | R | viewer | Whether a session is still working, and its latest messages (`last`, default 6) |
| `list_sessions` | R | viewer | Saved AI Chat sessions, newest first |
### Memory [#memory]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `memory_list` | R | viewer | The project's memory notes (optional `query`) |
| `memory_add` | W | editor | Save a note, or remove one. Never store secrets. |
| `memory_search` | R | viewer | Search memory notes |
### Scheduled tasks [#scheduled-tasks]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `schedule_list` | R | viewer | The project's scheduled tasks |
| `schedule_create` | W | editor | Create a scheduled task |
| `schedule_update` | W | editor | Change a scheduled task |
| `schedule_run_now` | W | editor | Run a scheduled task now |
| `schedule_delete` | D | editor | Delete a scheduled task |
### Copilot CTO [#copilot-cto]
**Paid.** Owner only, on plans with Copilot CTO (Pro and above).
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `cto_proposals` | R | owner | Proposals with their status (`status`: `pending` by default, `approved`, `declined`, `all`) |
| `cto_decide` | W | owner | Approve or decline a proposal (`id`, `decision`, optional `note`). Approved work happens on a `cto/` branch. |
| `cto_reports` | R | owner | Recent reviews and tasks with summaries |
| `cto_health` | R | owner | Recent health checks of the deployed app |
### Account [#account]
| Tool | | Role | Does |
| --- | --- | --- | --- |
| `usage_quota` | R | — | Your plan and what's used of each quota |
| `report_bug` | W | — | Report a bug in Coaade itself (`summary`, optional `project`). The team replies by email. |
## Resources [#resources]
For clients that read MCP resources, each of the user's 50 most recent projects has two:
| URI | Contents |
| --- | --- |
| `coaade://project//state` | Same as `get_project` |
| `coaade://project//memory` | Same as `memory_list` |
For a shared project, add `?owner=`.
## Example: raw JSON-RPC [#example-raw-json-rpc]
```bash
curl https://api.coaade.com/mcp \
-H "Authorization: Bearer $COAADE_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "list_projects", "arguments": {} } }'
```
## Usage and limits [#usage-and-limits]
Tools run within the key owner's plan: project, storage, database, build and workspace limits all apply. `ask_coaade`, `run_app_test` and `pen_test` run on Coaade AI and appear on the owner's [Usage](/docs/cloud-ide/usage) page.
# Models and skills (/docs/api/models-and-skills)
Both registries are public and need no authentication. For the models you call with an API key, see [Models for the API](#models-for-the-api).
## Model registry [#model-registry]
Active models, in display order.
```bash
curl https://api.coaade.com/v1/models/registry
```
```json title="Response 200 (one item shown)"
[
{
"id": "coaade-code-1.0",
"name": "Coaade Code 1.0",
"version": "1.0.0",
"sizeBytes": 392167424,
"description": "Compact chat model for explaining, debugging and refactoring code.",
"capabilities": ["explain", "debug", "refactor", "test", "optimize"],
"hardwareRequirements": { "minRamGb": 4 },
"releaseDate": "2026-03-01",
"downloadUrl": "https://…"
}
]
```
## Skill-pack registry [#skill-pack-registry]
Active skill packs (extensions), in display order.
```json title="Response 200 (one item shown)"
[
{
"id": "react",
"name": "React",
"version": "1.0.0",
"type": "framework",
"languages": ["javascript", "typescript"],
"fileExtensions": [".jsx", ".tsx"],
"keywords": ["react", "hooks", "jsx"],
"description": "Idiomatic React components and hooks.",
"systemPrompt": "…",
"rules": ["…"],
"downloadUrl": "https://…",
"sizeBytes": 18432,
"sortOrder": 1
}
]
```
The example values are illustrative. Field names match the API; call the endpoints for the current entries.
## Models for the API [#models-for-the-api]
The [model API](/docs/api/chat-completions) serves these models. Call them by id with an API key that has **Call models** on. `GET /v1/models` (which needs that key, and is not the public `/v1/models/registry` above) returns the ones the key's plan can use.
| Model id | Name | Plans |
| --- | --- | --- |
| `coaade-mind-1` | Coaade Mind 1.0 | All plans |
| `coaade-code-2` | Coaade Code 2.0 | Paid plans (Pro, Team, Enterprise) |
`coaade-mind-1.0` and `coaade-code-2.0` are accepted as aliases, and responses echo the short id. See [Call models](/docs/api/chat-completions) for requests, parameters and errors.
# Private debugging (/docs/api/private-debugging)
For model calls, Coaade keeps metadata only: the time, the key, the model, the status, the latency and the token counts. Private debugging is the one exception, and it is off for every key until you turn it on. Turn it on for an API key for a while, and each call made with that key is stored in full, encrypted so only you can read it, in the [Coaade Console](https://platform.coaade.com/logs). Each record is deleted after 7 days.
## What is recorded [#what-is-recorded]
While a key is recording, each [`POST /v1/chat/completions`](/docs/api/chat-completions) call made with it stores one record:
- the request body, as you sent it;
- the answer: the JSON response, or for a streamed call the stream put back together, with its tool calls;
- the error, if the call ended with one. A stream that failed part way keeps the text sent before the error, and the error;
- the status, the model, whether it was streamed and when it started.
Headers aren't recorded, so neither is your API key. Each record belongs to the call's row on the Logs page, the metadata row Coaade keeps for every call.
Calls Coaade refuses or that fail after it has read the request are recorded too, for example a `422` for a bad request, a `403`, a `429`, a `502` or a `504`. Only the first `429` for a key each minute is recorded. The other `429`s of that minute show **Not stored**, so a client retrying through a limit doesn't fill the store with copies of one request.
Nothing is recorded for:
- keys without private debugging on;
- runs in the console Workbench, including the prompt generator and improver;
- coaade.com chat;
- `GET /v1/models` and the [MCP server](/docs/api/mcp-server);
- a request refused before its body was read, such as a body that is too large. Its row on the Logs page says so.
A call that starts while recording is on is recorded, even if the time runs out before it ends.
## Turn it on [#turn-it-on]
### Open the key [#open-the-key]
In the console, open [API keys](https://platform.coaade.com/api-keys) and choose **Turn on…** in the key's **Private debugging** column. The key needs the **Call models** permission.
### Pick how long [#pick-how-long]
1 hour, 24 hours (the default), 3 days or 7 days. 7 days is the longest.
### Unlock, the first time [#unlock-the-first-time]
Enter your encryption passphrase (see [How it is encrypted](#how-it-is-encrypted)). From then on, calls with the key are recorded for you.
The key list and the Logs page show which keys are recording and until when. Recording turns itself off when the time is up. You can set a new end or turn it off at any time. Turning it off keeps what was recorded until it expires, unless you choose to delete it as well.
## Read a record [#read-a-record]
On the [Logs](https://platform.coaade.com/logs) page, rows with a record show **Private record** in the **Record** column. Open the row's details, unlock if this browser tab is locked, and choose **Open record**. The console decrypts it in your browser and shows the request body, the answer and the error. A row whose key was recording but has no record says why, for example that the account's storage was full.
## How it is encrypted [#how-it-is-encrypted]
Private debugging uses the passphrase of your [encrypted chats](https://coaade.com/settings/encryption) on coaade.com. If you haven't set those up, do that first on coaade.com: the console only unlocks. Changing the passphrase and the recovery code stays on coaade.com too.
- **Unlocking happens in your browser.** Your passphrase, or your recovery code, opens your vault key, the key that encrypts your chats. The vault key opens your private debugging key, a key pair your browser makes the first time you unlock. Coaade stores its private half only encrypted with your vault key. Your passphrase is never sent.
- **Coaade encrypts each record to you.** When a call is recorded, the API encrypts the record with a new random key (AES-256-GCM) and encrypts that key to the public half of each reader's key pair (ECDH P-256 with HKDF-SHA256). The API can write records but not read them.
- **Your browser tab holds the key.** The console keeps your private key in the tab's memory, in a form that can't be copied out, until you lock it, sign out or close the tab. It drops the vault key as soon as your private key is open.
### What Coaade's servers see [#what-coaades-servers-see]
- To answer any call, Coaade's servers process the request and the answer in plain text, with or without private debugging. With it on, the record also exists in plain text in the API's memory for the moment it takes to encrypt it, after the answer has been sent. It is never written unencrypted to a disk, a database or a log.
- Stored in plain: which keys are recording, until when and who turned it on; each record's size, time, expiry and status; whom each record is encrypted to; and the readers' public keys.
### What someone with only the database can read [#what-someone-with-only-the-database-can-read]
That metadata, and the records' sizes and times, but not the records. Opening one needs a reader's private key, which needs their vault key, which needs their passphrase or recovery code. A record that was changed fails to open, and the console says so.
Recording windows and readers' public keys carry a check only Coaade's API can make, so a row added to the database by hand records nothing and receives nothing. Someone who can change the database could still add a member to a team: records made after that are encrypted to that member too, who then shows on the team's Members page.
### If you lose your passphrase [#if-you-lose-your-passphrase]
- **You still have your recovery code:** unlock with the code instead.
- **You lost both:** nobody can open your records, Coaade included. They're deleted when they expire, and you can delete them without unlocking. To record and read again, reset encrypted chats on coaade.com (this deletes your encrypted chats), choose a new passphrase there, and unlock the console with it. Records made before the reset stay unreadable to you.
## Who can read them [#who-can-read-them]
In your own account, only you.
In a team, a key's records are encrypted to the team's owner and admins, and to the member who made the key, each with their own key pair. A reader only gets the records made after they first unlocked private debugging.
| Role | Turn on and off, read and delete records |
| --- | --- |
| Owner, Admin | Every key in the team |
| Developer | The keys they made |
| Billing, Viewer | Neither. They can see which keys are recording and until when |
When someone stops being a reader of a key, their encrypted copies of its records are deleted: when they leave the team or their seat is removed, their role changes, or the team's plan ends. A record nobody can open any more is deleted.
Every on, off, read and delete is written to the account's audit log, as metadata only (**Settings → Security** in the console).
## How long records are kept [#how-long-records-are-kept]
Each record is deleted 7 days after it was made. You can delete one record, one key's records, or every record at once, on the Logs page. Deleted records can stay, still encrypted, in database backups until those backups expire.
## Limits [#limits]
Each plan has a cap on how many records an account keeps and on their total size. A team's records count against the team's plan. The Logs page shows how much is used, as a share.
- When the store is full, calls are answered as usual, their records aren't stored, and their rows show **Not stored**.
- Turning recording on while the store is full returns `403 DEBUG_STORAGE_FULL`. Delete records, or wait for older ones to expire.
Recording never slows down a call or makes it fail. If a record can't be stored, the call is answered as usual and its row says that the record is missing, and why. The caps aren't published and may change.
## Your users' data [#your-users-data]
If your app sends your own users' data in its calls, the records hold it. Turn private debugging on with test traffic, or cover it in your privacy policy.
# Prompt library (/docs/api/prompt-library)
The prompt library keeps the prompts you write in the console's [Workbench](https://platform.coaade.com/workbench) in your Coaade account, not in one browser. Every save is a new version. You can open any version in the Workbench, compare two versions side by side, and make an earlier version current again. On a Team or Enterprise plan, the whole team works in one library.
Open it at [Prompt library](https://platform.coaade.com/prompts) in the Coaade Console, or use **Library** and **Save to library** in the Workbench.
## What a prompt holds [#what-a-prompt-holds]
| Part | What it is |
| --- | --- |
| **Name** | Up to 80 characters, on one line. Two prompts can have the same name. |
| **Description** | Optional, up to 500 characters. It belongs to the prompt, not to a version, so editing it makes no new version. |
| **Versions** | Each version holds a system prompt, a user message template, the model (`coaade-mind-1` or `coaade-code-2`), the temperature, the max tokens and the reasoning effort, and who saved it and when. |
Write variables as `{{name}}`, with letters, digits and underscores in the name. The Workbench fills them in when it runs the prompt. **Generate prompt** and **Improve prompt** in the Workbench write variables the same way, so what they make saves as it is. Each version lists its variables.
A version can name either model on any plan. Your plan decides which model runs it: see [Choosing a model](/docs/api/chat-completions#choosing-a-model).
The library doesn't keep the values you type for variables, the Workbench's other messages, its tools, its connected MCP servers or any output.
## Save from the Workbench [#save-from-the-workbench]
**Save to library** saves the prompt in the Workbench's editor as a new prompt, or as a new version of a prompt in the library, which becomes current. It saves:
- the system prompt;
- the first user message, which becomes the version's user message template;
- the model the Workbench runs, and its temperature, max tokens and reasoning effort.
The dialog lists what stays in the Workbench and isn't saved: the other messages, the tools, the connected MCP servers, the variable values and the output.
If the prompt changed after you opened it, because a teammate saved a version or made another one current, the save stops and says which version is current. You can save anyway or look at the prompt first. Nothing is lost either way, because every save is a new version.
**Library** opens a prompt's current version in the editor, in place of the prompt there. To open an earlier version, use **Open in Workbench** on the prompt's page.
## Versions [#versions]
- **Every save is a new version**, numbered 1, 2, 3 and so on. A version never changes after it's saved.
- **The current version** is the one **Library** opens. A save makes the new version current.
- **Make current** makes an earlier version current again. Nothing is deleted or copied, and the next save gets the next number.
- **Compare** shows two versions side by side: a line-by-line diff of the system prompt and of the user message, and the settings that differ. Your browser works out the comparison.
- **Delete** on a version deletes it for good. Only a version that isn't current can be deleted, so make another version current first. A deleted version's number isn't used again.
- **Delete** on the prompt deletes the prompt and all its versions for good.
## In a team [#in-a-team]
On a Team or Enterprise plan, the owner's library is the team's: the owner and every member work in one library. Members open it in the team's console, using the account switcher. A member's personal account has a library of its own, separate from the team's.
| Role | View, compare, open in the Workbench | Save, make current, edit details, delete |
| --- | :-: | :-: |
| Owner | ✓ | ✓ |
| Admin | ✓ | ✓ |
| Developer | ✓ | ✓ |
| Billing | ✓ | |
| Viewer | ✓ | |
- For Billing and Viewer, the buttons that change the library are locked and say why.
- Billing and Viewer can open a version in the Workbench to read it, but their role can't run the Workbench.
- Each change goes into the team's audit log (**Settings → Security**), with the member who made it.
## Limits [#limits]
Each plan keeps a number of prompts, a number of versions per prompt, a longest prompt and a total size for the library. The numbers aren't published and may change. When you reach one, the console says what to do: delete prompts or old versions you no longer need, save your changes as a new prompt, or move to a bigger plan. In a team's console, the team owner chooses the plan.
## Privacy [#privacy]
- **What's stored.** Each prompt's name and description, and each version's system prompt, user message template, model, settings, number, and who saved it and when.
- **Where.** In Coaade Cloud's database. The name, the description, the system prompt and the user message are encrypted at rest with AES-256-GCM. Each one is bound to its account and to its place in the database, so a copy moved elsewhere doesn't decrypt. The model, the settings, the version numbers, the times and who saved each version aren't encrypted.
- **Not end-to-end encrypted.** Coaade's servers hold the keys. The API decrypts a prompt to answer a signed-in request from someone allowed to read it, so your prompts aren't hidden from Coaade's servers.
- **Who can read it.** In a personal account, you. In a team's library, the owner and every member, whatever their role.
- **Never logged.** Prompt text never goes into Coaade's logs, the console's request logs or the audit log. An audit entry records which prompt (its id) and which versions changed, and who made the change, never a name or any text. The library calls no model, so saving and opening prompts uses no model allowance.
- **How long.** Until you delete it. A plan change deletes nothing. If a team's plan ends, members lose the team's console, and the owner keeps the library. Deleting your Coaade account doesn't erase your prompts by itself, so delete them first if you want them gone.
- **Deleting is for real.** Deleting a version or a prompt removes it from the database at once. Deleted prompts can stay, still encrypted, in database backups until those backups expire.
## Endpoints [#endpoints]
The console calls these endpoints. Authenticate with your signed-in session's access token, as for the other `/v1/console` endpoints; an API key isn't accepted. In a team, the console names the team in an `X-Coaade-Team` header. Without it, a request reads and writes your own account's library.
The library, most recently changed first: each prompt's name, description, current version, number of versions, model and who changed it. No prompt text.
A new prompt, with version 1. Answers `201` with the prompt and the version.
```json title="Request"
{
"name": "Ticket triage",
"description": "Sorts support tickets by team",
"system": "You sort support tickets for {{company_name}}.",
"userMessage": "\n{{ticket}}\n",
"model": "coaade-mind-1",
"temperature": 0.2,
"maxTokens": null,
"reasoningEffort": "low"
}
```
`description`, `temperature`, `maxTokens` and `reasoningEffort` are optional. `null` for the temperature or max tokens means the model's default, and the reasoning effort defaults to `low`. A version needs a system prompt, a user message or both.
The prompt, its current version in full, and every version's number, model, saver and time, newest first.
One version in full.
```json title="Response 200"
{
"prompt": { "id": "…", "name": "Ticket triage", "description": "Sorts support tickets by team", "currentVersion": 2, "latestVersion": 2, "versionCount": 2, "model": "coaade-mind-1", "modelName": "Coaade Mind 1.0", "createdAt": "…", "updatedAt": "…", "createdBy": { "name": "Ada", "you": true }, "updatedBy": { "name": "Ada", "you": true } },
"version": {
"version": 2,
"model": "coaade-mind-1",
"modelName": "Coaade Mind 1.0",
"savedAt": "…",
"savedBy": { "name": "Ada", "you": true },
"current": true,
"system": "You sort support tickets for {{company_name}}.",
"userMessage": "\n{{ticket}}\n",
"variables": ["company_name", "ticket"],
"temperature": 0.2,
"maxTokens": null,
"reasoningEffort": "low"
}
}
```
`createdBy`, `updatedBy` and `savedBy` are `null` for a person whose account was removed.
A new version, which becomes current. The body is a version's fields, as for a new prompt, without `name` and `description`.
Send `expectedCurrentVersion`, the current version you read, to be told when the prompt changed since: the save then answers `409 VERSION_CONFLICT` with `currentVersion` and saves nothing. Without it, the save always goes through.
`{ "version": 1 }` makes that version current. Nothing is deleted. `changed` is `false` when it already was current.
`{ "name"?, "description"? }`: renames the prompt or changes its description. No new version is made.
Deletes a version that isn't current.
Deletes the prompt and all its versions. Answers `deleted: true` and `versions`, the number of versions deleted.
The model API doesn't read the library. A request to [`POST /v1/chat/completions`](/docs/api/chat-completions) carries its own messages and settings.
### Errors [#errors]
Errors use the API's [error format](/docs/api/errors): an `error` code and a `message`.
| Status | Code | When |
| --- | --- | --- |
| 403 | `LIBRARY_FULL` | The library has as many prompts as the plan keeps. |
| 403 | `VERSION_LIMIT_REACHED` | The prompt has as many versions as the plan keeps. Delete old versions, or save as a new prompt. |
| 403 | `LIBRARY_STORAGE_FULL` | The library has no room left for this. |
| 403 | `ROLE_FORBIDDEN` | In a team, your role can't change the library. |
| 404 | `PROMPT_NOT_FOUND` | No such prompt in this account's library. |
| 404 | `VERSION_NOT_FOUND` | No such version of the prompt. |
| 409 | `VERSION_CONFLICT` | The current version isn't `expectedCurrentVersion`. The body has `currentVersion`. |
| 409 | `CURRENT_VERSION` | The current version can't be deleted. |
| 413 | `PROMPT_TOO_LARGE` | The system prompt and user message together are longer than the plan keeps. |
| 422 | `VALIDATION_ERROR` | A field is missing or invalid. The message says which. |
| 500 | `PROMPT_UNREADABLE` | A stored prompt couldn't be decrypted. Contact Coaade support if it keeps happening. |
| 503 | `PLAN_CHECK_FAILED` | The plan couldn't be checked. Try again. |
# Subscriptions (/docs/api/subscriptions)
Plan IDs are `free`, `pro`, `team` and `enterprise`. Paid plans are billed through Stripe.
## List plans [#list-plans]
Active plans with prices, trial length and features.
```json title="Response 200 (one item shown)"
[
{
"id": "pro",
"name": "Pro",
"tier": "pro",
"price": 1899,
"priceYearly": 20388,
"description": "For professional developers who ship fast",
"isPopular": true,
"isCustom": false,
"ctaText": "Get Pro",
"badgeText": "Most Popular",
"trialDays": 7,
"features": ["Everything in Free", "Coaade Code 2.0 (latest models)", "25 projects", "…"],
"modelAccess": "all",
"extensionAccess": "all",
"maxModels": 10,
"maxMessages": 999999,
"maxStorageGb": 50
}
]
```
`price` is monthly and `priceYearly` is the yearly total, both in cents.
The full plan comparison table, grouped into categories of features with a value per plan.
Pricing FAQs: `[{ "id", "question", "answer" }]`.
## Get the current subscription [#get-the-current-subscription]
The signed-in user's plan, status and billing period.
```json title="Response 200"
{
"subscription": {
"planId": "pro",
"planName": "Pro",
"tier": "pro",
"status": "trialing",
"currentPeriodEnd": "2026-11-18T10:00:00.000Z",
"trialEndsAt": "2026-11-18T10:00:00.000Z",
"trialEligible": false,
"cancelAtPeriodEnd": false,
"viaTeam": false,
"customDomains": ["app.example.com"]
},
"usage": { "limits": { "maxModels": 10, "maxMessages": 999999, "maxStorageGb": 50 } }
}
```
| Field | Meaning |
| --- | --- |
| `status` | `active`, `trialing`, `past_due`, `canceled` and similar Stripe statuses. A trial or a renewal being retried keeps the plan. |
| `trialEndsAt` | When the trial ends and the first charge happens. `null` outside a trial. |
| `trialEligible` | The user has never had a paid subscription, so checkout would start a free trial |
| `cancelAtPeriodEnd` | The plan ends at `currentPeriodEnd` |
| `viaTeam` | The plan comes from someone else's Team seat and is read-only for this user |
| `customDomains` | Verified custom domains, which disconnect if the plan ends |
An account with no subscription returns `"subscription": null` and `"trialEligible": true`.
## Start checkout [#start-checkout]
Create a Stripe Checkout session for a paid plan.
```json title="Response 200"
{ "url": "https://checkout.stripe.com/c/pay/…", "sessionId": "cs_…", "trialDays": 7 }
```
Redirect the user to `url`. `trialDays` is `0` when the user isn't eligible for a trial. If the user already has a paid plan, the change is made in place and the response is `{ "upgraded": true, "planId": "team" }`.
Errors: `422 PLAN_NOT_PURCHASABLE` (free or Enterprise), `404 PLAN_NOT_FOUND`, `503 BILLING_UNAVAILABLE`.
## Preview a plan change [#preview-a-plan-change]
What switching an existing subscription would cost now. Changes nothing.
Takes the same body as checkout (`planId`, `billingPeriod`).
```json title="Response 200"
{
"inPlace": true,
"currentPlanId": "pro",
"newPlanId": "team",
"billingPeriod": "monthly",
"creditCents": -1210,
"chargeCents": 1593,
"netCents": 383,
"currency": "usd",
"renewalDate": "2026-12-01T00:00:00.000Z"
}
```
`creditCents` is the unused time on the current plan (negative), `chargeCents` the new plan for the rest of the period, and `netCents` what's charged now. `{ "inPlace": false }` means the change can't be made in place; use checkout.
## Change plan [#change-plan]
Switch to another plan.
```json title="Request"
{ "planId": "free" }
```
Downgrading to Free schedules the paid plan to end at the end of the period:
```json title="Response 200"
{
"subscription": { "planId": "pro", "status": "active", "cancelAtPeriodEnd": true, "currentPeriodEnd": "2026-12-01T00:00:00.000Z" },
"scheduled": true
}
```
Errors: `402 CHECKOUT_REQUIRED` (moving to a paid plan without a subscription), `404 PLAN_NOT_FOUND`, `502 BILLING_ERROR`.
## Billing portal [#billing-portal]
A Stripe billing portal link for cards and invoices.
```json title="Request"
{ "returnUrl": "https://www.coaade.com/console/subscription" }
```
```json title="Response 200"
{ "url": "https://billing.stripe.com/p/session/…" }
```
## Cancel [#cancel]
Cancel at the end of the current period.
```json title="Response 200"
{ "subscription": { "cancelAtPeriodEnd": true, "accessUntil": "2026-12-01T00:00:00.000Z" } }
```
Errors: `404 NO_SUBSCRIPTION`, `502 BILLING_ERROR`.
## Reactivate [#reactivate]
Undo a cancellation before the period ends.
```json title="Response 200"
{ "subscription": { "cancelAtPeriodEnd": false } }
```
If the plan has already ended, start a new checkout instead.
# Team licenses (/docs/api/team-licenses)
Team seats are available on the **Team** and **Enterprise** plans. The account that pays is the **owner**; everyone else is a **member**.
## List seats [#list-seats]
The team roster, from the owner's or a member's point of view.
```json title="Response 200 (owner)"
{
"isMember": false,
"teamId": "team_…",
"planId": "team",
"tier": "team",
"canManageSeats": true,
"used": 2,
"limit": 200,
"seats": [
{ "id": "owner", "email": "ada@example.com", "name": "Ada", "avatarUrl": null, "status": "active", "role": "owner", "isSelf": true, "createdAt": "…" },
{ "id": "5f0a…", "email": "grace@example.com", "name": "grace", "avatarUrl": null, "status": "invited", "role": "member", "isSelf": false, "createdAt": "…" }
]
}
```
A member gets `"isMember": true`, `"canManageSeats": false`, and `ownerEmail` and `ownerName`. `used` counts the owner.
## Preview a seat's cost [#preview-a-seats-cost]
What adding one more seat costs now.
```json title="Response 200"
{ "available": true, "netCents": 1666, "currency": "usd", "perSeatCents": 2499 }
```
`netCents` is the prorated amount charged now; `perSeatCents` is the price each period after that. `{ "available": false }` means no preview could be made.
## Invite a member [#invite-a-member]
Add a seat and email an invitation.
```json title="Request"
{ "email": "grace@example.com" }
```
```json title="Response 201"
{ "id": "5f0a…", "email": "grace@example.com", "status": "invited", "createdAt": "2026-11-11T09:30:00.000Z" }
```
If the person doesn't have an account yet, the seat activates when they sign up with that email.
Errors:
| Status | Code | Meaning |
| --- | --- | --- |
| 403 | `UPGRADE_REQUIRED` | The plan doesn't include team seats |
| 403 | `SEAT_LIMIT_REACHED` | No seats left on the plan |
| 409 | `ALREADY_INVITED` | That email already has a seat or invitation |
| 422 | `OWNER_SEAT` | That's the owner's own email |
| 422 | `VALIDATION_ERROR` | Invalid email |
## Remove a seat [#remove-a-seat]
Remove a member or cancel an invitation. Owner only.
Errors: `404 SEAT_NOT_FOUND`.
## Leave a team [#leave-a-team]
Leave the team you're a member of.
```json title="Response 200"
{ "left": true }
```
Errors: `404 NOT_A_MEMBER`.
# Usage alerts (/docs/api/usage-alerts)
Each plan has a daily allowance for each model, one of its [fair-use limits](/docs/api/chat-completions#limits). Usage alerts tell you when today's usage of a model reaches a share of it, before requests start getting `429 rate_limit_exceeded`. Alerts come by email, and optionally as a signed webhook to an endpoint of yours.
Set them up in the **Usage alerts** card on the [Rate limits](https://platform.coaade.com/limits) page of the Coaade Console. That page also shows each model's allowance and today's usage. Alerts are in percent: allowance numbers aren't published and may change.
## What counts [#what-counts]
- Every model call on the account counts: coaade.com chat, calls with an API key and runs in the console Workbench.
- The allowance is per model and per UTC day. It resets at 00:00 UTC.
- On a Team plan, each seat has its own allowance. Alerts for every seat go to the team owner, and only the owner can change the settings.
## Settings [#settings]
| Setting | Default |
| --- | --- |
| **Email alerts** | On when the account has an API key with **Call models** turned on, otherwise off. Sent to the account owner's email address. |
| **Thresholds** | 80% and 100% on, 50% off. |
| **Webhook** | None. Add an https URL to get alerts as webhooks too. |
Every change is recorded in the account's audit log (**Settings → Security** in the console).
## When an alert is sent [#when-an-alert-is-sent]
After each request, Coaade checks the model's usage for the day. When it reaches a threshold that's on, Coaade sends an alert by email and to the webhook.
- You get at most **one alert per model, threshold and UTC day**, however much traffic follows.
- If one request takes usage past several thresholds, you get one alert, for the highest.
- After an alert, a lower threshold doesn't alert later that day. For example, turning 50% on after the 80% alert has gone out doesn't send a 50% alert.
- An alert that can't be delivered never affects your requests.
The email says it in plain words, for example: "You've used 80% of today's Coaade Mind 1.0 allowance. It resets at 00:00 UTC."
## Webhooks [#webhooks]
Add a webhook URL in the Usage alerts card.
- The URL must use **https** and reach a **public address**. Coaade refuses private, loopback and link-local addresses when you save the URL, and checks the address again before every delivery. It connects to the address it checked and doesn't follow redirects.
- When you add a webhook, the console shows its **signing secret** (`coaade_whsec_…`) once. Store it with your receiver. **Rotate secret** makes a new one, which signs every delivery from then on.
- **Send test** posts a test event, with `"test": true`, and shows how your endpoint answered.
### The request [#the-request]
Coaade sends a `POST` with a JSON body and these headers:
| Header | Value |
| --- | --- |
| `Content-Type` | `application/json` |
| `Coaade-Timestamp` | When the request was sent, in Unix seconds. |
| `Coaade-Signature` | The hex HMAC-SHA256 of the timestamp, a period and the raw body, keyed with your signing secret. |
| `User-Agent` | `Coaade-Webhooks/1.0 (+https://coaade.com)` |
```json title="Body"
{
"type": "usage.threshold",
"model": "coaade-mind-1",
"percent": 80,
"day": "2026-11-30",
"resetsAt": "2026-12-01T00:00:00.000Z",
"account": "6d1f3a2e-5b7c-4e0a-9f21-3c8d4b6a7e10"
}
```
### Verify the signature [#verify-the-signature]
Check every request before you act on it:
Read the raw request body, exactly as received, before you parse the JSON.
Reject the request if `Coaade-Timestamp` is more than 5 minutes from your clock.
Compute the HMAC-SHA256 of `{timestamp}.{raw body}` with your signing secret, as lowercase hex.
Compare it with `Coaade-Signature` in constant time. Accept the request only if they match.
Node.js, with the built-in `crypto` module:
```js
import { createHmac, timingSafeEqual } from "node:crypto";
// timestamp and signature are the Coaade-Timestamp and Coaade-Signature
// headers; rawBody is the request body exactly as received, before parsing.
export function isFromCoaade(secret, timestamp, signature, rawBody) {
const age = Math.abs(Date.now() / 1000 - Number(timestamp));
if (!Number.isFinite(age) || age > 300) return false; // older than 5 minutes
const expected = createHmac("sha256", secret)
.update(`${timestamp}.${rawBody}`)
.digest("hex");
return (
typeof signature === "string" &&
signature.length === expected.length &&
timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
);
}
```
Python's standard library only:
```python
import hashlib
import hmac
import time
def is_from_coaade(secret: str, timestamp: str, signature: str, raw_body: bytes) -> bool:
"""timestamp and signature are the Coaade-Timestamp and Coaade-Signature headers;
raw_body is the request body exactly as received, before parsing."""
try:
age = abs(time.time() - int(timestamp))
except (TypeError, ValueError):
return False
if age > 300: # older than 5 minutes
return False
expected = hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected.encode(), (signature or "").encode())
```
### Responses and retries [#responses-and-retries]
- Answer with any `2xx` status within 5 seconds.
- Coaade makes up to **3 attempts**. A timeout, a connection error, `408`, `429` or a `5xx` is retried after 1 second, then after 4 more. Any other answer, a redirect included, ends the delivery.
- A retried delivery has the same body with a new timestamp and signature. To spot one you already handled, use `account`, `model`, `percent` and `day`, which identify the alert.
- Send test makes a single attempt.
The Usage alerts card lists the last 20 delivery attempts with their time, event, attempt number and result. Coaade keeps only that metadata, never the URL or the body.
A rotated secret signs from the moment you rotate it. Update your receiver right away: until it has the new secret, it rejects every delivery.
# Usage (/docs/api/usage)
## Get quotas [#get-quotas]
Everything the account has used of each plan quota, live. Not cached.
```json title="Response 200 (abridged)"
{
"plan": "pro",
"planName": "Pro",
"generatedAt": "2026-11-11T09:30:00.000Z",
"workspaceLimits": true,
"resets": { "day": "2026-11-12T00:00:00.000Z", "month": "2026-12-01T00:00:00.000Z" },
"quotas": [
{ "id": "ai-credits", "group": "AI", "label": "AI credits this month", "used": 112.5, "limit": 1000, "unit": "count", "resets": "month" },
{ "id": "projects", "group": "Projects", "label": "Projects", "used": 7, "limit": 25, "unit": "count" },
{ "id": "build-minutes", "group": "Builds", "label": "Build minutes this month", "used": 42, "limit": 2000, "unit": "minutes", "resets": "month" },
{ "id": "ram", "group": "Compute", "label": "RAM per workspace", "used": null, "limit": 2147483648, "unit": "bytes" }
],
"projects": [
{
"slug": "pricing-page",
"name": "Pricing page",
"deployed": true,
"deployType": "static",
"deployUrl": "https://pricing-page.coaade.app",
"files": 48,
"storageBytes": 1830221,
"requestsThisMonth": 0,
"bandwidthThisMonth": 0,
"databases": [],
"customDomains": []
}
]
}
```
### Quota fields [#quota-fields]
Quota IDs include `ai-messages`, `ai-requests`, `ai-credits`, `projects`, `deployed`, `storage`, `files`, `upload`, `build-minutes`, `builds`, `bandwidth`, `requests`, `postgresql`, `redis`, `mongodb`, `seats`, `sleep`, `vcpu`, `ram`, `processes` and `timeout`.
AI message, request and token limits only apply to models other than Coaade Code 2.0, which is unlimited.
## Get a monthly summary [#get-a-monthly-summary]
Totals reported by local apps for one month.
| Query | Description |
| --- | --- |
| `month` | `YYYY-MM`. Defaults to the current month. |
```json title="Response 200"
{ "month": "2026-11", "totalMessages": 318, "totalTokens": 412880, "peakModels": 2, "peakStorage": 4831838208 }
```
## Report local usage [#report-local-usage]
Report daily usage from a local app such as the Desktop App.
Each report has `date` (`YYYY-MM-DD`, required), `messagesSent` (required) and optionally `tokensConsumed`, `modelsActive` and `storageUsedBytes`. All numbers are non-negative integers.
```json title="Request"
{
"deviceId": "laptop-1",
"reports": [{ "date": "2026-11-10", "messagesSent": 24, "tokensConsumed": 31200, "modelsActive": 1 }]
}
```
```json title="Response 200"
{ "accepted": 1, "currentMonthTotal": { "messages": 318 } }
```
# Authentication (/docs/cli/authentication)
The CLI needs two things: a **Coaade account session**, and credentials for the **provider** that runs the model. They serve different purposes and are stored separately.
## Sign in to Coaade [#sign-in-to-coaade]
```bash
coaade login
```
`coaade login` starts or connects to Coaade Manager. If Manager already has a valid session, the CLI reuses it. Otherwise Manager opens its sign-in window and the CLI waits. After you sign in, the window hides and Manager keeps running in the background.
Sign up, email verification and password recovery happen in Manager. The CLI doesn't store half-finished sign-ins.
### Sign in to a different account [#sign-in-to-a-different-account]
```bash
coaade login --email you@example.com
```
### Sign in non-interactively [#sign-in-non-interactively]
For automation, pass the password on standard input. Passwords are never accepted as command-line arguments.
```bash
printf '%s' "$COAADE_PASSWORD" | coaade login --email you@example.com --password-stdin
```
## Check who you are [#check-who-you-are]
| Command | Shows |
| --- | --- |
| `coaade whoami` | The cached account, without exposing any tokens |
| `coaade account` | Your account, fetched from the Cloud API |
| `coaade subscription` | Your current plan. Falls back to the cached plan, with a notice, if the API can't be reached. |
| `coaade status` | Account and provider configuration |
## Sign out [#sign-out]
```bash
coaade logout
```
Or type `/logout` in interactive chat. This removes the shared session, so Manager is signed out too.
## How the session works [#how-the-session-works]
- The CLI uses the account database Manager created at `~/.coaade/coaade.db`. It doesn't create its own.
- Access tokens are refreshed automatically when they expire.
- Conversations belong to the account, provider and project they were started in. They can't be resumed under another account, and signing out or switching accounts stops any further tool use in a running session.
## Provider credentials [#provider-credentials]
### Amazon Bedrock [#amazon-bedrock]
The default provider calls Amazon Bedrock with a Bedrock API key (bearer token). Set it in your shell:
```bash
export AWS_BEARER_TOKEN_BEDROCK="..."
```
Or save it once:
```bash
coaade auth bedrock
```
The saved key is stored at `~/.coaade/cli/bedrock.key`. On macOS and Linux the file has mode `0600` inside a `0700` folder. It's plain text on disk, not in the OS keychain. The CLI never reads `.env` files from your projects.
Only Bedrock API keys (bearer tokens) are supported. AWS access-key/secret pairs and SigV4 profiles aren't.
### Local Manager [#local-manager]
To run on a local model through Coaade Manager, you also need a Coaade API key from Manager's [API Keys](/docs/desktop-app/keys-and-licenses#api-keys) page:
```bash
export COAADE_MANAGER_API_KEY="coaade_sk_..."
# or
coaade auth manager
```
The saved key is stored at `~/.coaade/cli/manager.key`.
## Diagnose problems [#diagnose-problems]
```bash
coaade doctor
```
`doctor` checks for a missing session, missing provider key and Manager connectivity. It doesn't make a billed model request.
# Configuration (/docs/cli/configuration)
## Config file [#config-file]
Settings live in `~/.coaade/cli/config.json`. Run `coaade config` to print the current (non-secret) settings and the file's path.
```json title="~/.coaade/cli/config.json"
{
"provider": "bedrock",
"model": "us.anthropic.claude-opus-4-6-v1",
"region": "us-east-1",
"manager_url": "http://127.0.0.1:11434",
"max_tokens": 8192,
"skill_dir": null
}
```
## Providers [#providers]
### `bedrock` [#bedrock]
Runs the model on Amazon Bedrock with streaming responses, images and tool calls. Needs a Coaade sign-in and a Bedrock API key (`AWS_BEARER_TOKEN_BEDROCK` or `coaade auth bedrock`).
- `--region` overrides `AWS_REGION`, then `AWS_DEFAULT_REGION`, then the saved region.
- `--model` overrides the model. When you change region, pick a model or inference profile that exists there; the CLI doesn't rewrite it for you.
Your prompts, the files the agent reads and tool results are sent to AWS Bedrock. Model access and AWS permissions follow your AWS account.
### `manager` [#manager]
Runs on the active local model in [Coaade Manager](/docs/desktop-app). Manager must be running. Needs a Coaade sign-in and a Manager API key (`COAADE_MANAGER_API_KEY` or `coaade auth manager`). Responses arrive complete rather than streamed, and images aren't supported.
```bash
coaade --provider manager "Explain this project"
coaade --provider manager model list
coaade --provider manager model use MODEL_ID
coaade skill # list Manager's installed skill packs
coaade runtime start # start Manager's local engine
coaade runtime stop
```
## Environment variables [#environment-variables]
| Variable | Purpose |
| --- | --- |
| `AWS_BEARER_TOKEN_BEDROCK` | Bedrock API key |
| `AWS_REGION`, `AWS_DEFAULT_REGION` | Bedrock region |
| `COAADE_MANAGER_API_KEY` | API key for Coaade Manager's local API |
| `BRAVE_SEARCH_API_KEY` | Enables the `web_search` tool |
| `COAADE_CLI_HOME` | Moves CLI config, keys, sessions and project settings (default `~/.coaade/cli`) |
| `COAADE_DATA_DIR` | Moves the shared account database folder (for testing) |
| `COAADE_API_URL` | Overrides the Coaade Cloud API endpoint. Must be HTTPS except on loopback. |
| `VISUAL`, `EDITOR` | External editor for **Ctrl+G** |
| `NO_COLOR` | Turns off colors |
Environment variables take priority over saved key files.
## Where data is stored [#where-data-is-stored]
| Path | Contents |
| --- | --- |
| `~/.coaade/coaade.db` | Shared account session, plan and usage (owned by Manager) |
| `~/.coaade/cli/config.json` | CLI settings |
| `~/.coaade/cli/bedrock.key`, `manager.key` | Saved provider keys (`0600`) |
| `~/.coaade/cli/sessions/` | Saved conversations |
| `~/.coaade/cli/checkpoints/` | File snapshots for `/rewind` |
| `~/.coaade/cli/projects/` | Per-project memory, permissions and plugin settings |
| `~/.coaade/skills/` | Skill manifests |
# Images, web and workers (/docs/cli/images-web-and-workers)
## Images [#images]
With the `bedrock` provider, you can attach up to **five** PNG, JPEG, GIF or WebP images to a prompt, each up to **3.75 MB**.
```text
/attach screenshots/error.png
/attachments # list pending images
/attachments clear
```
```bash
coaade --image screenshots/error.png "Explain this error"
```
On macOS, **Ctrl+V** pastes a PNG from the clipboard. Images are saved with the conversation and aren't resized.
The `manager` provider is text-only; the CLI reports an error rather than silently dropping an image.
## Web fetch [#web-fetch]
The `web_fetch` tool reads public HTTP(S) pages as text (HTML, JSON, XML). It:
- Blocks private and local network addresses, and pins the resolved public address
- Checks redirects and limits download size
- Converts HTML to plain text without running JavaScript
- Needs approval unless a rule allows the URL
## Web search [#web-search]
`web_search` uses the Brave Search API. Set `BRAVE_SEARCH_API_KEY` in your environment to enable it. Your provider credentials are never sent to the search service.
Treat fetched pages and search results as untrusted information, not instructions.
## Background tasks [#background-tasks]
Run long commands in the background so you can keep working:
- The agent can start a command with `background: true`.
- Press **Ctrl+B** while a command is running in the foreground.
| Command | Effect |
| --- | --- |
| `/tasks` | List background jobs and their status |
| `/task TASK_UUID` | Show the last 128 KB of each output stream |
| `/stop TASK_UUID` | Stop a job |
Up to **eight** jobs run at once. Jobs end when the CLI exits and don't restart when you resume.
## Parallel read-only workers [#parallel-read-only-workers]
The `delegate` tool runs up to **four** independent workers at the same time, for example to investigate several parts of a codebase.
Each worker has its own context, the project's instructions and your read restrictions, and up to eight model turns. Workers can list, search and read files. They can't edit, run commands, call MCP tools or start more workers. Their findings and token usage are reported back to the main conversation.
Workers use your configured provider, so they count toward usage.
# Coaade CLI overview (/docs/cli)
The Coaade CLI, `coaade`, is a coding agent that works in your own repositories. Ask it to find a bug, explain a module or write tests. It reads the code, proposes edits as diffs and runs commands, and asks before it changes anything.
```bash
coaade "Find and fix the authentication bug"
```
## Highlights [#highlights]
- **Plan and build modes.** Plan mode only reads. Build mode can edit files and run commands, with your approval.
- **Reviewable changes.** Every edit shows a line-numbered diff before you approve it, and `/rewind` undoes changes.
- **Fine-grained permissions.** Allow, ask or deny per tool and per target, with an optional macOS sandbox.
- **Project memory and resumable sessions.** Pick up any conversation with `coaade -r`.
- **Extensible.** Stdio MCP servers, local plugins with custom slash commands, and hooks.
- **Editor-aware.** The VS Code extension shares your active file, selection and language intelligence.
- **Scriptable.** One-shot prompts, piped input, `--json` output and nonzero exit codes for automation.
## A full-screen terminal UI [#a-full-screen-terminal-ui]
Run `coaade` without a prompt to open interactive chat: a compact header with the model and folder, the scrolling conversation, and a fixed composer at the bottom. Type `/` for commands, press **Shift+Tab** to switch between plan and build, and click options with the mouse.
## How it fits with Coaade [#how-it-fits-with-coaade]
The CLI shares your account with the [Desktop App](/docs/desktop-app). If you're signed in to Manager, the CLI is too. It can run on two providers:
| Provider | Where the model runs |
| --- | --- |
| `bedrock` (default) | Amazon Bedrock, in the AWS region you choose |
| `manager` | Your local Coaade Manager, using the active local model |
See [Configuration](/docs/cli/configuration#providers).
## Next [#next]
# Installation (/docs/cli/installation)
## With the Desktop App [#with-the-desktop-app]
The CLI ships inside every Coaade Manager build. On first launch, Manager installs `coaade` into `~/.coaade/bin` and adds it to your shell's `PATH`. Open a new terminal and check:
```bash
coaade --version
```
See [Desktop App installation](/docs/desktop-app/installation).
## With the command-line installer [#with-the-command-line-installer]
The command-line installer installs Manager and the CLI together and verifies both with SHA-256 checksums. It will be published with the next release:
```bash
curl -fsSL https://api.coaade.com/public/install.sh | sh
```
```powershell
irm https://api.coaade.com/public/install.ps1 | iex
```
## From source [#from-source]
If you have access to the CLI source, build it with Rust:
```bash
cargo build --release --locked
./target/release/coaade --version
```
The CLI supports macOS, Linux and Windows.
## Shell completions [#shell-completions]
Generate completions for your shell:
```bash
# zsh
coaade completion zsh > "${fpath[1]}/_coaade"
# bash
coaade completion bash > ~/.local/share/bash-completion/completions/coaade
# fish
coaade completion fish > ~/.config/fish/completions/coaade.fish
```
PowerShell and Elvish are supported too: `coaade completion powershell`, `coaade completion elvish`.
## Clipboard support on Linux [#clipboard-support-on-linux]
Selecting text in the CLI copies it to the clipboard. On Linux this needs `wl-copy` (Wayland) or `xclip` (X11). macOS and Windows work out of the box.
## Next [#next]
[Sign in](/docs/cli/authentication).
# Interactive chat (/docs/cli/interactive)
Run `coaade` without a prompt to open the full-screen terminal UI: a compact header (logo, model and folder), the conversation, and a fixed composer at the bottom.
## Slash commands [#slash-commands]
Type `/` to open the live command menu. Type to filter, use **↑↓** to select, **Enter** to run, **Tab** to complete and **Esc** to close. You can also click entries.
### Core [#core]
| Command | What it does |
| --- | --- |
| `/help` | Commands and keyboard shortcuts |
| `/plan` | Switch to plan mode: inspect and plan without changing files |
| `/build` | Switch to build mode: make changes with your approval |
| `/init` | Create project instructions and local settings ([Project setup](/docs/cli/project-setup)) |
| `/tools` | List the model's tools and their current permissions |
| `/status` | Current mode and provider |
| `/context` | Which folder and editor file the CLI sees |
| `/session` | Show the command to resume this chat |
| `/clear` | Start a fresh conversation |
| `/logout` | Sign out of Coaade and return to the login screen |
| `/exit` | Leave Coaade |
### Conversation [#conversation]
| Command | What it does |
| --- | --- |
| `/compact [focus]` | Summarize the context and keep working, optionally with a focus such as `/compact focus on the API migration` |
| `/rewind` | Restore an earlier checkpoint: code, conversation or both |
| `/branch` | Branch this conversation |
| `/transcript` | Search full messages and tool results |
| `/memory` | View or manage project memory |
### Tools and settings [#tools-and-settings]
| Command | What it does |
| --- | --- |
| `/permissions` | Manage saved permission rules |
| `/sandbox on\|off` | Toggle the macOS shell sandbox |
| `/tasks`, `/task ID`, `/stop ID` | List, inspect and stop background tasks |
| `/attach PATH`, `/attachments` | Attach images, or list and clear pending ones |
| `/mcp` | Configure external MCP tool servers |
| `/plugins` | Install, list or remove local plugins |
| `/skills` | Show installed skill commands |
| `/vim on\|off` | Toggle Vim-style input |
| `/keybind` | Customize an input shortcut |
## Keyboard shortcuts [#keyboard-shortcuts]
| Keys | Action |
| --- | --- |
| **Shift+Tab** | Switch between plan and build mode |
| **↑ / ↓** | Recall previous messages |
| **Enter** | Send. End a line with `\` to continue on the next line. |
| **Ctrl+J** | Insert a newline |
| **Esc** | Interrupt the model's response |
| **Ctrl+C** | Clear the input, or exit when it's empty |
| **Ctrl+L** | Clear the display (keeps the conversation and your draft) |
| **Ctrl+O** | Open the transcript viewer |
| **Ctrl+R** | Search input history |
| **Ctrl+G** | Edit the prompt in your external editor (`$VISUAL`, then `$EDITOR`, then `vi`) |
| **Ctrl+B** | Send a running shell command to the background |
| **Ctrl+V** | Paste a PNG image from the clipboard (macOS) |
| **PageUp / PageDown** | Scroll the conversation |
Text you type while the model is responding is queued for the next turn.
### Custom shortcuts [#custom-shortcuts]
Rebind an action with `/keybind`, for example `/keybind ctrl+o transcript`. Configurable actions are `transcript`, `history`, `clipboard`, `editor`, `newline`, `home`, `end` and `delete_word`. **Ctrl+C**, **Ctrl+D** and **Ctrl+L** are reserved.
### Vim input [#vim-input]
`/vim on` enables insert and normal modes with `i a I A`, `h l`, `w b e`, `0 $`, `x`, `dd dw`, `D C`, and `j k` to browse prompt history. It's an input-editing subset, not full Vim.
## Mouse [#mouse]
- Click approval options, menu entries and history items to choose them. A click needs a press and release on the same option; dragging away cancels.
- Click the plan/build label to switch mode, or click in the input to place the cursor.
- Scroll the wheel over the conversation or a menu to scroll it. Scrolling up holds your place while new output arrives; scroll to the bottom to follow again.
## Select and copy [#select-and-copy]
Drag across text in the conversation. When you release, the selection is copied and the footer shows **✓ Copied**. The view holds still while you select, even if output is arriving. Soft-wrapped lines copy without extra line breaks.
## What you see while it works [#what-you-see-while-it-works]
- Tool calls appear as live rows that update in place. Reads and searches show result counts.
- Edits show line-numbered red/green diffs with an added/removed summary, above the approval prompt. The default choice is to cancel.
- Shell output streams while the command runs.
- The footer shows elapsed time, the number of tools used and token usage when a turn finishes.
## When the agent asks you a question [#when-the-agent-asks-you-a-question]
In plan or build mode the agent can ask one focused question with up to four choices. Pick one with the arrow keys, a click, or **Type your own answer**. **Esc** skips the question. `--yes` never answers questions for you.
## Accessibility and color [#accessibility-and-color]
The CLI honors `NO_COLOR`; selections then use inverse video. `--raw` turns off styling.
# MCP, plugins and hooks (/docs/cli/mcp-plugins-hooks)
None of these turn on by themselves. A repository can't enable an MCP server, plugin or hook; you configure each one explicitly, and the configuration is stored privately for your account and project.
## MCP servers [#mcp-servers]
The CLI supports the [Model Context Protocol](https://modelcontextprotocol.io) over the standard **stdio** transport.
```text
/mcp add example {"command":"/absolute/path/to/server","args":[]}
/mcp # list servers and their status
/mcp reconnect
/mcp remove example
```
The JSON can also include an `env` object. Adding a server runs its executable, so only add servers you trust.
- Each tool call shows its arguments and needs approval unless a [permission rule](/docs/cli/permissions) allows it.
- MCP tools aren't available in plan mode.
- Remote HTTP/OAuth transports, server-initiated sampling and resource subscriptions aren't supported.
## Plugins [#plugins]
A plugin is a folder with a `coaade-plugin.json` manifest. It can add **skills** (custom slash commands) and **hooks**.
```json title="coaade-plugin.json"
{
"name": "team",
"skills": [
{
"name": "review",
"description": "Review against the team's checklist",
"instructions": "Review correctness, error handling and meaningful tests. Cite file locations."
}
],
"hooks": [
{ "event": "PostToolUse", "command": "/absolute/path/to/hook-script" }
]
}
```
```text
/plugins install /absolute/path/to/plugin-folder
/team:review # run the plugin's skill
/skills # list custom commands
/plugins remove team
```
Installing copies the manifest into your private project settings. Hook scripts stay where they are. There's no marketplace.
## Hooks [#hooks]
Hooks run a command when something happens in a session. They receive the event as JSON on standard input.
| Event | Runs | If the hook fails |
| --- | --- | --- |
| `SessionStart` | When a session starts | Reported |
| `PreToolUse` | Before a tool runs | **The tool is blocked** |
| `PostToolUse` | After a tool runs | Reported; the tool isn't undone |
| `Stop` | When the agent finishes a turn | Reported |
- Hooks time out after 30 seconds, and their output is capped.
- A hook's output isn't treated as instructions or permission.
- With `/sandbox on`, hooks run in the sandbox too.
## Skills from Manager [#skills-from-manager]
With the `bedrock` provider, the CLI also loads data-only skill manifests and Markdown rules from `~/.coaade/skills` (or the `skill_dir` setting). No scripts in skill packs are run. With the `manager` provider, Manager handles skills.
# Memory, sessions and checkpoints (/docs/cli/memory-and-sessions)
## Project memory [#project-memory]
The agent can save lasting preferences and corrections with its `memory_write` tool. Memory is loaded into later prompts and sessions for the same project and account. It's background information, never permission to run a tool.
| Command | Effect |
| --- | --- |
| `/memory` | Read the saved notes |
| `/memory add Use pnpm for package commands` | Save a note yourself |
| `/memory auto off` | Ask before the model changes memory |
| `/memory auto on` | Let the model change memory (the default) |
| `/memory clear` | Remove all notes |
Memory is private to your account and project folder, stored under `~/.coaade/cli/projects/`. It isn't synced to the cloud.
## Sessions [#sessions]
Conversations are saved locally under `~/.coaade/cli/sessions`. They can include code and tool output.
```bash
coaade -r # open the history picker for this folder
coaade -r SESSION_UUID # resume one directly, also in scripts
coaade sessions # list sessions
```
The picker shows recent chats first. Use **↑↓** or the mouse wheel to choose, type to filter, **Enter** to resume and **Esc** to close. It only lists sessions for the current folder, account and provider.
Resuming restores the visible messages and your input history. Background tasks don't restart, and interrupted tool calls aren't replayed. Inside chat, `/session` prints the resume command.
Saved sessions are capped at 96 MB.
## Checkpoints and rewind [#checkpoints-and-rewind]
A checkpoint is made before every prompt. `edit_file` and `write_file` record each file's content before and after a change.
Run `/rewind` and choose to restore **code**, **conversation** or **both**.
- Before restoring, the CLI checks every file against what's on disk. If a file was changed outside the CLI, it stops without touching anything.
- If a restore fails partway, files already restored are rolled back where possible.
- The picker keeps the latest 100 checkpoints, and checkpoints survive resume.
Shell commands, MCP servers, hooks and edits you make in your editor aren't checkpointed. Keep using Git for real
version history.
## Branching [#branching]
`/branch` copies the conversation into a new branch with its own checkpoint timeline. It doesn't create a Git branch or worktree, and doesn't copy your files.
## Compaction [#compaction]
When the context reaches about 450 KB of text, the CLI summarizes it automatically so you can keep working. Run `/compact` yourself at any time, optionally with a focus:
```text
/compact focus on the API migration
```
- The newest turn is kept when possible, and a tool call is never separated from its result.
- The full original transcript is kept. Open it with `/transcript` or **Ctrl+O**, and search it with `/`.
- Summaries lose detail. The files and the transcript remain the source of truth.
- Compaction is a normal model request; you can interrupt it, and a failed summary leaves the conversation as it was.
# Modes and tools (/docs/cli/modes-and-tools)
## Plan and build [#plan-and-build]
| Mode | Tools | Use it to |
| --- | --- | --- |
| **Plan** | `list_files`, `search`, `read_file` | Explore, explain and plan. Nothing on disk changes. |
| **Build** (default) | Plan tools plus `edit_file`, `write_file`, `shell` | Make changes, with your approval |
Switch with **Shift+Tab**, `/plan`, `/build`, or `--mode plan|build`. MCP tools aren't available in plan mode.
Run `/tools` to see every tool and its current permission.
## How edits are applied [#how-edits-are-applied]
- An edit needs a **fresh read** of the file first, so the agent never edits a version it hasn't seen.
- Every edit shows a diff before you approve it.
- Ambiguous replacements (text that matches more than once) are rejected.
- Windows line endings (CRLF) are preserved.
- Files open in VS Code with unsaved changes are marked, so the agent doesn't overwrite your edits.
## Shell commands [#shell-commands]
- Commands need approval unless a [permission rule](/docs/cli/permissions) allows them.
- Foreground commands time out after **120 seconds**. Press **Ctrl+B** to move one to the background.
- Provider and AWS credentials are removed from the command's environment.
- Commands otherwise run with your normal user access. Turn on `/sandbox on` (macOS) to restrict them.
## What the agent can't touch [#what-the-agent-cant-touch]
File tools refuse:
- Paths outside the working folder (`--dir`), and path traversal
- Symlinks and, on Unix, hard links
- Common credential locations and the shared Coaade account database
- Binary files and files larger than **256 KB**
- The project's `.coaade/` settings folder
These are practical guards, not a full secret scanner.
## Context the CLI adds for you [#context-the-cli-adds-for-you]
Each prompt includes:
- `AGENTS.md` and `COAADE.md` from the project root
- Files you attach with `--file`
- An ignore-aware file listing and `git status`
- A bounded set of source files picked by keyword
- Your active editor file and selection, if the [VS Code extension](/docs/cli/vscode) is connected
Folders like `node_modules` and build output are skipped. `--no-context` turns off automatic selection and editor context; files you attach explicitly and the root instruction files still apply. Use `--dry-run` to see exactly what would be sent.
## Turn limits [#turn-limits]
Each prompt can make up to 20 model calls by default. Change it with `--max-turns` (1 to 100).
# Permissions and sandbox (/docs/cli/permissions)
## Rules [#rules]
A rule is `TOOL` or `TOOL:TARGET`, in one of three lists:
| List | Effect |
| --- | --- |
| `allow` | Runs without asking |
| `ask` | Always asks, even with `--yes` or `--allow-shell` |
| `deny` | Never runs |
**Deny beats ask, and ask beats allow.**
### Matching [#matching]
- File targets are relative to the CLI's working folder. `./` prefixes are normalized.
- A trailing `*` matches a prefix for non-shell tools: `read_file:private/*`.
- **Shell rules match the whole command exactly.** `shell:npm test` doesn't allow `npm test; rm -rf /`.
- A bare `shell` rule applies to every shell command.
- Rules are per tool. To protect a file from both edits and rewrites, add rules for `edit_file` and `write_file`.
## Manage rules [#manage-rules]
```text
/permissions # show the effective policy and file locations
/permissions allow shell:npm test
/permissions ask write_file
/permissions deny read_file:private/*
/permissions remove shell:npm test
/permissions reload # re-read the files
/permissions trust # review and approve local settings
/permissions reset # restore local defaults
```
Adding a rule to one list removes the same rule from the other local lists. Invalid tool names and empty targets are rejected.
### Effect on reads [#effect-on-reads]
Files denied for `read_file` are also left out of automatic context and search. Files with an `ask` rule aren't added to context automatically.
## How local grants are approved [#how-local-grants-are-approved]
Your approvals are recorded for your account and this project folder, under `~/.coaade/cli/projects/`. A `settings.local.json` only grants access when it matches that record.
That means a checked-out or hand-edited `settings.local.json` doesn't grant anything by itself. Until you review it:
- Its allow rules are inactive
- Automatic memory is off
- Your earlier restrictions stay in place
Run `/permissions trust` to see the proposed settings and confirm them. The CLI refuses a file that changes while you're reviewing it. Changes you make through `/permissions`, `/sandbox` and `/memory auto` update both the file and your record.
The CLI re-reads permission files before collecting context, before each model round and before each tool call. Malformed, oversized, symlinked or hard-linked settings files are rejected.
## Automation flags [#automation-flags]
| Flag | Approves |
| --- | --- |
| `-y`, `--yes` | File edits |
| `--allow-shell` | Shell commands |
Deny rules, ask rules and the sandbox still apply. Without these flags, non-interactive runs deny edits and commands.
## macOS sandbox [#macos-sandbox]
```text
/sandbox on
/sandbox off
```
With the sandbox on, shell commands and hooks run inside the native macOS sandbox. They can:
- Write inside the project
- Read what developer tools normally need
They can't:
- Write anywhere else
- Use the network
- Read common credential paths
On other platforms, asking for the sandbox fails closed: commands are refused rather than run unsandboxed. The sandbox isn't a container, and it doesn't cover MCP servers, which you configure separately.
## Subagents [#subagents]
Read-only workers started with the `delegate` tool can't open approval prompts, so reads that need approval are denied for them. See [Workers](/docs/cli/images-web-and-workers#parallel-read-only-workers).
# Project setup (/docs/cli/project-setup)
Run `/init` in interactive chat, from the project you want to configure. It creates:
Running `/init` again keeps your existing instructions and settings. It doesn't call the model or run any commands.
## COAADE.md [#coaademd]
`COAADE.md` holds instructions the agent reads on every prompt, alongside `AGENTS.md` if you have one. The template starts with working conventions and the package or Rust commands it recognized. Add:
- How the code is organized
- Coding standards
- How to build, test and lint
- Anything the agent should never do
```md title="COAADE.md"
# Project instructions
## Commands
- Install: `pnpm install`
- Test: `pnpm test`
- Lint: `pnpm lint`
## Conventions
- TypeScript strict mode; no `any`.
- UI components live in `src/components`, one per file.
- Run the tests after every change.
```
## Settings files [#settings-files]
| File | Commit it? | Holds |
| --- | --- | --- |
| `.coaade/settings.json` | Yes | Shared restrictions for everyone on the project |
| `.coaade/settings.local.json` | No (ignored by `.coaade/.gitignore`) | Your personal choices |
Both use the same format; omitted fields use defaults:
```json title=".coaade/settings.json"
{
"allow": [],
"ask": [],
"deny": [],
"sandbox": false,
"auto_memory": true
}
```
Shared settings can only **tighten** things: add ask or deny rules, turn on the sandbox or turn off automatic memory. Their `allow` list never grants access. See [Permissions](/docs/cli/permissions) for how local grants are approved.
Neither file contains login credentials.
# Command and flag reference (/docs/cli/reference)
```text
coaade [PROMPT] [COMMAND] [FLAGS]
```
Run without a prompt or command for interactive chat. Use `/help` inside chat.
## Commands [#commands]
| Command | Description |
| --- | --- |
| `coaade "PROMPT"` | Run one prompt and exit |
| `coaade ask PROMPT` | Ask a question |
| `coaade explain [PROMPT]` | Explain code |
| `coaade debug [PROMPT]` | Diagnose an error (use with `--error`) |
| `coaade refactor [PROMPT]` | Refactor code |
| `coaade test [PROMPT]` | Write tests |
| `coaade review [PROMPT]` | Review code or piped diffs |
| `coaade login [--email EMAIL] [--password-stdin]` | Sign in through Coaade Manager |
| `coaade logout` | Sign out (shared with Manager) |
| `coaade whoami` | Show the cached account |
| `coaade account` | Fetch your account from the Cloud API |
| `coaade subscription` | Show your plan |
| `coaade status` | Show account and provider configuration |
| `coaade doctor` | Diagnose session, key and Manager problems |
| `coaade config` | Print settings and the config file path |
| `coaade auth [bedrock\|manager]` | Save a provider key (default `bedrock`) |
| `coaade sessions` | List saved sessions |
| `coaade model [list\|use] [ID]` | List or switch Manager models |
| `coaade skill` | List Manager skill packs |
| `coaade runtime start\|stop` | Start or stop Manager's local engine |
| `coaade completion SHELL` | Print completions for `bash`, `zsh`, `fish`, `powershell` or `elvish` |
## Global flags [#global-flags]
| Flag | Default | Description |
| --- | --- | --- |
| `--dir PATH` | `.` | Working folder. File tools can't reach outside it. |
| `-f, --file PATH` | | Attach a file. Repeat for more. |
| `--lines START-END` | | Only include this line range from `--file`, e.g. `20-45` |
| `--error TEXT` | | An error message to debug |
| `--image PATH` | | Attach an image (PNG/JPEG/GIF/WebP, up to 3.75 MB). Repeat for more. |
| `--mode build\|plan` | `build` | Agent mode |
| `--provider bedrock\|manager` | from config | Model provider |
| `--model ID` | from config | Model or inference profile |
| `--region REGION` | from config | AWS region for Bedrock |
| `-y, --yes` | off | Approve file edits without prompting |
| `--allow-shell` | off | Approve model-requested shell commands |
| `--no-context` | off | Turn off automatic context and editor context |
| `--dry-run` | off | Show the assembled context; no model call, no sign-in needed |
| `--json` | off | One JSON result on stdout, diagnostics on stderr |
| `--raw` | off | No styling |
| `-r, --resume [SESSION_UUID]` | | Open history, or resume a specific session |
| `--max-turns N` | `20` | Model calls per prompt, 1 to 100 |
| `--version` | | Print the version |
| `-h, --help` | | Print help |
# Troubleshooting (/docs/cli/troubleshooting)
Start with:
```bash
coaade doctor
```
It checks your session, provider key and Manager connection without making a billed model request.
Run `coaade auth bedrock`, or `export AWS_BEARER_TOKEN_BEDROCK=...` in your shell. Only Bedrock API keys are supported, not access-key/secret pairs.
You're using the `manager` provider. Create a key on Manager's **API Keys** page, then run `coaade auth manager` or export `COAADE_MANAGER_API_KEY`.
Finish signing in in the Coaade Manager window. If you just signed up, verify your email first. If Manager isn't installed, install the [Desktop App](/docs/desktop-app/installation).
Make sure Coaade Manager is running (check the tray icon) and the runtime is started: `coaade runtime start`. `manager_url` must be a loopback address such as `http://127.0.0.1:11434`.
Pass a valid region with `--region`, and a model or inference profile that exists in that region with `--model`.
Non-interactive runs can't ask for approval. Add `--yes` for edits and `--allow-shell` for commands, or add `allow` rules. Ask and deny rules still apply.
A checked-out or edited `settings.local.json` doesn't grant access until you approve it. Run `/permissions trust`.
Install `wl-copy` (Wayland) or `xclip` (X11).
Sessions are tied to the account, provider and folder they started in. Sign in to the same account, use the same `--provider` and run from the same folder. Very old sessions without an account owner can't be resumed.
File tools skip binaries, files over 256 KB, symlinks, hard links and credential paths. Attach the relevant part with `--file` and `--lines`.
# Everyday usage (/docs/cli/usage)
## Interactive chat [#interactive-chat]
Run `coaade` with no prompt to open interactive chat in the current folder:
```bash
coaade
coaade --dir /path/to/project
```
`--dir` sets the folder the agent works in. File tools can't reach outside it. See [Interactive chat](/docs/cli/interactive).
## One-shot prompts [#one-shot-prompts]
Pass a prompt to run a single task and exit:
```bash
coaade "Find and fix the authentication bug"
coaade --mode plan "Explain this repository"
```
## Task commands [#task-commands]
Shortcuts for common jobs. Each accepts an optional prompt and works with `--file`, `--lines` and `--error`.
| Command | Use it to |
| --- | --- |
| `coaade ask "…"` | Ask a question |
| `coaade explain` | Explain code |
| `coaade debug` | Diagnose an error |
| `coaade refactor` | Improve code without changing behavior |
| `coaade test` | Write tests |
| `coaade review` | Review code or a diff |
```bash
coaade explain --file src/main.rs --lines 20-45
coaade debug --file src/api.py --error "KeyError: user_id"
coaade test --file src/auth.py
```
## Pipe input [#pipe-input]
Anything you pipe in is used verbatim, up to 100 KB:
```bash
git diff | coaade review
cat error.log | coaade debug
```
## Attach files and images [#attach-files-and-images]
```bash
coaade --file src/main.rs --file src/lib.rs "How do these two interact?"
coaade --image screenshots/error.png "Explain this error"
```
## Preview the context without a model call [#preview-the-context-without-a-model-call]
`--dry-run` shows the context the CLI would send, without calling the model or needing to be signed in:
```bash
coaade --dry-run --file src/main.rs "Review this file"
```
## Automation [#automation]
| Flag | Effect |
| --- | --- |
| `--json` | Write one result object to stdout, including usage and elapsed time. Diagnostics go to stderr. |
| `--raw` | Plain text, no styling |
| `-y`, `--yes` | Approve file edits without prompting. Shell commands still need approval. |
| `--allow-shell` | Approve shell commands the model requests |
| `--max-turns N` | Limit model calls per prompt (default 20, maximum 100) |
Failures return a nonzero exit code. Without `--yes` or `--allow-shell`, edits and commands in a non-interactive run are denied rather than waiting for input.
```bash
coaade --json --mode plan "List the main components" > components.json
coaade -y --allow-shell "Run the tests and fix any failures"
```
`--yes` and `--allow-shell` remove the approval step. Saved deny and ask rules still apply, but use these flags
only in environments you trust, such as a disposable CI container.
## Resume a conversation [#resume-a-conversation]
```bash
coaade sessions # list saved sessions
coaade -r # pick one from a searchable history
coaade -r SESSION_UUID # resume a specific session
```
See [Memory and sessions](/docs/cli/memory-and-sessions).
# VS Code extension (/docs/cli/vscode)
**Coaade Editor Context** connects VS Code to the Coaade CLI. With it, the CLI knows which file you're looking at and what you've selected, so requests like "fix this function" work without naming the file.
The extension has no model, credentials or account of its own. It only serves your editor state to the CLI on your machine.
## Install [#install]
The extension is bundled with the CLI. Install the `.vsix` you were given:
```bash
code --install-extension coaade-context-0.1.0.vsix --force
```
If an open VS Code window doesn't pick it up, run **Developer: Reload Window**. Restart the CLI after updating the extension.
## Use it [#use-it]
1. Open your project in VS Code, in a **trusted** workspace.
2. Start `coaade` in VS Code's integrated terminal.
3. Work as usual. Your active file and selection are attached to each prompt automatically.
Check the connection from either side:
- In VS Code, run **Coaade: Show Editor Context** from the command palette.
- In the CLI, run `/context`.
Without a connected editor, an ambiguous request such as "this file" makes the CLI ask which file you mean, rather than guessing.
## What's shared [#whats-shared]
- The active file, including **unsaved** changes. Unsaved files are marked, so the agent avoids overwriting them with disk edits.
- Your selection, which takes priority over the surrounding code.
- Up to **24 KB** of context per prompt.
Files outside the CLI's `--dir` folder, credential paths, symlinks and hard links are never shared.
## Code intelligence [#code-intelligence]
The CLI's `code_intelligence` tool asks VS Code's language services for **definitions**, **references** and **diagnostics** at a position. It uses the language extensions you already have installed, and only reads trusted workspace files. No commands are run.
## Privacy [#privacy]
- The extension keeps code in memory and serves it only over an authenticated loopback connection.
- Its discovery files in `~/.cache/coaade/ide` hold just a temporary port and token.
- With the `bedrock` provider, attached editor text is sent to AWS Bedrock with your prompt and saved in the CLI's local conversation history.
## Turn it off [#turn-it-off]
- In VS Code, set `coaade.shareEditorContext` to `false`.
- In the CLI, pass `--no-context`.
## Remote and multiple windows [#remote-and-multiple-windows]
- For remote workspaces, install the extension on the same host as the CLI.
- New terminals get a window-specific session ID. If several windows are ambiguous, open a new terminal.
- Other editors with compatible extension APIs aren't verified yet.
# AI Chat (Coaade Code 2.0) (/docs/cloud-ide/ai-chat)
Coaade Code 2.0 is the AI engineer in the Cloud IDE's **AI Chat** panel. It understands your whole project, uses real tools and carries a task from request to deploy. Its context window holds up to 1,000,000 tokens, so long tasks and large codebases fit in one conversation. It works through structured tool calls rather than by parsing text, so file edits are reliable.
## What it can do [#what-it-can-do]
- Create and edit files across the project
- Install packages and run commands to check its own work
- Link your GitHub repository, commit, push and pull
- Create databases and set environment variables
- Deploy, read deploy logs and fix failed builds
- Search the web and read pages for current docs, listing the sources it used
- Split large investigations across parallel helpers that read the codebase at the same time
- Show its plan as a live task list, and ask you one focused question when a choice really matters
All of this stays within your plan's limits.
## Modes [#modes]
| Mode | What it does | Changes files? |
| --- | --- | --- |
| **Agent** | Builds, fixes and refactors with every tool available. The default. | Yes |
| **Spec** | Turns your request into requirements, a design and a task list, then implements it task by task. | Yes, after the spec |
| **Ask** | Answers questions about your code with read-only tools. It explains and suggests. | Never |
Use **Spec** for bigger features where you want to agree on the plan first, and **Ask** when you only want to understand something.
## Autonomous or step by step [#autonomous-or-step-by-step]
| | Behavior | Plans |
| --- | --- | --- |
| **Autonomous off** | Coaade works with you step by step. You approve or reject each change, optionally with a note, before it happens. | All plans |
| **Autonomous on** | Coaade works through the whole task on its own, checks its work and stops only when it's done or needs you. | Pro, Team, Enterprise |
## Add context with @mentions [#add-context-with-mentions]
Type `@` in the chat box to attach context:
| Mention | Attaches |
| --- | --- |
| `@file` | A specific file |
| `@terminal` | Recent terminal output |
| `@errors` | Errors from the Console |
| `@all-files` | The project's file list |
You can also paste, drop or upload **screenshots and images**. Coaade Code reads them, which helps with layout bugs and error dialogs.
## Slash commands [#slash-commands]
Type `/` to open the command menu.
| Command | What it does |
| --- | --- |
| `/fix` | Fix errors and bugs in the current file |
| `/explain` | Explain the current file |
| `/refactor` | Refactor for better code |
| `/test` | Generate test cases |
| `/run` | Run a command and fix what fails |
| `/search` | Find where something is in the project |
| `/diff` | Show the changes in a file |
| `/create` | Create a new file |
| `/deploy` | Open the Deploy dialog |
| `/clear` | Clear the conversation |
## Undo AI changes [#undo-ai-changes]
**Undo AI file changes** puts back every file the AI wrote, edited or created in its last reply, in one click.
## Chat history and export [#chat-history-and-export]
Chats are saved per project and are searchable. Use **Export as Markdown** to download any chat.
## Choosing a model [#choosing-a-model]
On Free, AI Chat always uses Coaade Code 2.0. On paid plans you can choose other models from the model picker. Coaade Code 2.0 is unlimited and doesn't use credits. Other models use your monthly AI credits (1,000 on Pro, 2,000 on Team, unlimited on Enterprise) and count toward the daily request and token limits.
## Tips for good results [#tips-for-good-results]
- Say what "done" means: "the form validates email and shows an inline error".
- Mention files and constraints: "keep using Tailwind; don't add new dependencies".
- Attach the error with `@errors` or `@terminal` instead of describing it.
- For a large feature, start in **Spec** mode and review the plan first.
- Put lasting preferences in [Project memory](/docs/cloud-ide/memory) so you don't have to repeat them.
## Limits [#limits]
Coaade Code 2.0 has no message, request or token limits on any plan. Other models are limited by your plan's monthly credits and daily requests and tokens, and web searches have a daily cap. See [Plans and limits](/docs/get-started/plans-and-limits#daily-and-monthly-quotas).
# App Test (/docs/cloud-ide/app-test)
App Test is an AI that uses your deployed app the way a first-time user would, clicking, typing and navigating, then reports what works and what's broken. It's available on **Pro, Team and Enterprise**.
## Run a test [#run-a-test]
1. Deploy your app (see [Deploy](/docs/cloud-ide/deploy)).
2. Open **App Test** and describe what to check in plain words, for example:
```text
Sign up, add three items to the cart, then log out and back in.
The cart should still have three items.
```
3. Start the run. The AI works through it one step at a time.
The run happens in a secure managed browser on Coaade Cloud, not on your machine. Watch every step live, or close the tab and come back later; the run keeps going.
You can also ask Coaade Code in AI Chat to test a flow. It runs App Test for you and reports the result in the conversation.
## What it reports [#what-it-reports]
- Broken links, errors and dead ends
- Confusing flows
- Layout problems, at both **desktop and phone** sizes
Each finding comes with clear steps to reproduce and a screenshot.
## Keep it as a Playwright test [#keep-it-as-a-playwright-test]
Turn any run into a [Playwright](https://playwright.dev) spec. Save it in your project and run it again later, locally or in CI.
# Connect your AI (Coaade MCP) (/docs/cloud-ide/connect-your-ai)
**Coaade MCP** is Coaade's [Model Context Protocol](https://modelcontextprotocol.io) server at `https://api.coaade.com/mcp`. Connect your AI app to it, and that app's AI can work on your Coaade projects: edit files and run commands in the cloud workspace, deploy, add databases, push to GitHub, test and security-check your live site, and hand tasks to Coaade Code.
The thinking is done by your app's own model and subscription. Coaade provides the workspace and the platform, within your Coaade plan.
Connecting works on **every plan, including Free**. A few tools need Pro or higher; see [Paid tools](#paid-tools).
## Two ways to connect [#two-ways-to-connect]
| | How | Best for |
| --- | --- | --- |
| **Sign in with Coaade** | Add the URL. The app opens coaade.com, you sign in, choose **Full access** or **Read only**, and press **Allow**. No key to copy. | ChatGPT, Claude, Claude Code, and Kiro, Cursor or VS Code without a key |
| **API key** | Create a key and put it in the app's config as an `Authorization` header | Tools you configure with a file, scripts and CI |
Manage both on the **MCP** tab of the Cloud IDE dashboard, [ide.coaade.com/mcp](https://ide.coaade.com/mcp).
## Set up your app [#set-up-your-app]
Replace `coaade_sk_YOUR_KEY` with a key from the MCP page where a key is shown.
On chatgpt.com, open **Settings → Apps & Connectors → Create**. Turn on developer mode first if you don't see it; in newer versions, use **Plugins → Add custom MCP server**.
```text
Name: Coaade
MCP server URL: https://api.coaade.com/mcp
Authentication: OAuth
```
ChatGPT opens coaade.com. Sign in and press **Allow**.
On claude.ai or in Claude Desktop, open **Settings → Connectors → Add custom connector**:
```text
Name: Coaade
URL: https://api.coaade.com/mcp
```
Claude opens coaade.com. Sign in and press **Allow**.
Run this, then type `/mcp` in Claude Code, choose **coaade** and sign in with Coaade:
```bash
claude mcp add --transport http coaade https://api.coaade.com/mcp
```
Or with an API key:
```bash
claude mcp add --transport http coaade https://api.coaade.com/mcp \
--header "Authorization: Bearer coaade_sk_YOUR_KEY"
```
Add to `~/.kiro/settings/mcp.json` (all workspaces) or `.kiro/settings/mcp.json` (this workspace), then enable it in the **MCP Servers** panel. Use a recent Kiro version.
```json title="mcp.json"
{
"mcpServers": {
"coaade": {
"url": "https://api.coaade.com/mcp",
"headers": { "Authorization": "Bearer coaade_sk_YOUR_KEY" }
}
}
}
```
To sign in instead of using a key, leave out the `headers` line; Kiro opens coaade.com.
Add to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project), then turn it on under **Customize**. Use a recent version.
```json title="mcp.json"
{
"mcpServers": {
"coaade": {
"url": "https://api.coaade.com/mcp",
"headers": { "Authorization": "Bearer coaade_sk_YOUR_KEY" }
}
}
}
```
To sign in instead of using a key, leave out the `headers` line; Cursor opens coaade.com.
Add to `.vscode/mcp.json`, or run **MCP: Open User Configuration** from the command palette, then **Start** the server. Use a recent version.
```json title=".vscode/mcp.json"
{
"servers": {
"coaade": {
"type": "http",
"url": "https://api.coaade.com/mcp",
"headers": { "Authorization": "Bearer coaade_sk_YOUR_KEY" }
}
}
}
```
To sign in instead of using a key, leave out the `headers` line; VS Code opens coaade.com.
Only if you'd rather use an API key than the Claude connector. Open **Settings → Developer → Edit Config** (`claude_desktop_config.json`). This needs Node.js; restart Claude Desktop after saving.
```json title="claude_desktop_config.json"
{
"mcpServers": {
"coaade": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.coaade.com/mcp", "--header", "Authorization:${COAADE_AUTH}"],
"env": { "COAADE_AUTH": "Bearer coaade_sk_YOUR_KEY" }
}
}
}
```
Then ask your AI to work on Coaade, for example:
```text
List my Coaade projects, add a contact form to my-site, deploy it
and run an App Test on the form.
```
## Create an API key [#create-an-api-key]
On the **MCP** page, name the key and choose its access, then copy it. It's shown **only once**. Keep it secret, like a password.
| Access | The AI can |
| --- | --- |
| **Full access** | Change files, run commands, deploy and manage databases, as you |
| **Read only** | Look at projects, files, logs and test results, but not change anything |
## What your AI can do [#what-your-ai-can-do]
| Group | Tools |
| --- | --- |
| **Projects** | List, create and rename projects; read a project's live state |
| **Files and terminal** | Read (with line ranges), search, write and edit files; run commands and background tasks in the cloud workspace |
| **Deploy** | Deploy, read logs, set environment variables, list custom domains, take a site offline |
| **Databases** | PostgreSQL, MongoDB and Redis: create, connect, check size, run SQL |
| **GitHub** | Status, repositories, link, push, pull, activity |
| **App Test** | Test the live site in a real browser; read verdicts, bugs and Playwright specs |
| **Security** | Security scan and AI pen test of your own deployed site |
| **Coaade Code** | Hand a task to Coaade's own agent and read its sessions |
| **Memory and schedules** | Project memory notes; scheduled tasks |
| **Copilot CTO** | Proposals, approvals, reports and health checks (project owner) |
There are 57 tools in all. See the [MCP server reference](/docs/api/mcp-server) for each one.
## Paid tools [#paid-tools]
Everything else works on Free. These tools need **Pro or higher** and return a clear plan message on Free:
| Tool | Uses Coaade AI |
| --- | --- |
| `run_app_test` | Yes |
| `pen_test` | Yes |
| `security_scan` | No |
| Copilot CTO tools (`cto_*`, owner only) | — |
`ask_coaade` works on every plan and also uses Coaade AI. All other tools use only your app's own AI.
## Too many tools for your client? [#too-many-tools-for-your-client]
Some clients cap how many tools they accept. Add `?groups=` to the URL to offer only some groups:
```text
https://api.coaade.com/mcp?groups=projects,files,deploy
```
Groups: `projects`, `files`, `deploy`, `databases`, `github`, `apptest`, `security`, `agent`, `memory`, `schedules`, `cto`, `account`.
## Permissions [#permissions]
- A connection acts **as you**: your plan, your projects, and your role on projects others shared with you. A **Can view** role on a shared project stays read-only.
- **Read-only** connections and keys only get tools that look. Their SQL is limited to `SELECT`-style queries.
- **Destructive tools** (`delete_file`, `db_delete`, `stop_deploy`, `schedule_delete`) are marked so your app asks you before running them.
- Security tools only ever test **your project's own site**: its `*.coaade.app` deploy or a verified custom domain.
## Connected apps and keys [#connected-apps-and-keys]
The **MCP** page lists:
- **Connected apps**: apps you approved with Sign in with Coaade, with their access. **Disconnect** one to stop it straight away.
- **Your keys**: with their access and when they were last used. **Revoke** a key to cut it off immediately.
Key limits depend on your plan; see [API keys](/docs/desktop-app/keys-and-licenses#key-limits).
## How this differs from Plugins [#how-this-differs-from-plugins]
| | Direction | Where |
| --- | --- | --- |
| **Coaade MCP** (this page) | Outside AI apps use **Coaade** | `api.coaade.com/mcp` |
| [**Plugins**](/docs/cloud-ide/plugins-and-starters#plugins-mcp) | Coaade Code uses **other** MCP servers | Your MCP servers, added in the IDE |
# Copilot CTO (/docs/cloud-ide/copilot-cto)
Copilot CTO keeps watch over a project's code and its live app. It proposes what to do next, with its reasons, and only acts when you say yes. It's available on **Pro, Team and Enterprise**.
## Set it up [#set-it-up]
### Open the Copilot CTO tab [#open-the-copilot-cto-tab]
Open a project and choose **Copilot CTO** in the right panel. Turn it on for the project.
### Tell it about your product [#tell-it-about-your-product]
Describe what you're building, who it's for and what you want next. This brief is saved to [Project memory](/docs/cloud-ide/memory), so AI Chat reads it too.
### Choose capabilities and a schedule [#choose-capabilities-and-a-schedule]
Turn each capability on or off (see below) and set when reviews run and how you want to be emailed.
## Capabilities [#capabilities]
You can switch each of these on or off per project.
| Capability | What it does |
| --- | --- |
| **Code review** | Reviews the code and proposes improvements, performance and maintenance work. |
| **Bug fixing** | Looks for bugs and proposes fixes. |
| **New feature ideas** | Proposes features, with who they're for and why. |
| **Market & competitor research** | Researches the market, revenue potential and competitors for feature ideas. |
| **Architecture planning** | Proposes structural changes as the app grows, with risks and a rollback plan. |
| **Security review** | Scans for security issues and proposes fixes. Serious issues are emailed right away. |
| **Deployed-app health checks** | Checks that your deployed app answers, and tells you when it goes down or comes back. |
| **Email me** | Emails proposals, reports and alerts, right away or as one daily summary. |
| **Start AI Chat tasks** | Carries out approved proposals in AI Chat, on a separate `cto/` branch. |
| **Merge approved branches** | Lets you press **Merge** so Copilot CTO merges a finished branch into yours. |
## Reviews and health checks [#reviews-and-health-checks]
- **Reviews** run once a day by default. Schedule up to **4 a day** on Pro and Team, or **6** on Enterprise. Each review runs the project's build and tests and reports what it found.
- **Health checks** run every hour by default, and as often as every 15 minutes or as rarely as every 6 hours. They don't use AI, so they don't count against your AI allowance.
## Proposals and approval [#proposals-and-approval]
Every proposal explains why, what changes, the plan and the risks. Feature proposals include target customers, market size, revenue potential and a competitor report.
You decide what needs approval: every proposal, or only those that affect your product or company.
When you approve one:
1. AI Chat does the work on a new `cto/` branch.
2. You review the diff.
3. You merge it yourself, or press **Merge** to let Copilot CTO merge it.
## Chat with it [#chat-with-it]
You can talk to Copilot CTO and give it commands, such as "run a review" or "fix the login bug".
## Reports, activity and emails [#reports-activity-and-emails]
Every review, health check and action is listed in the tab. Important items are emailed, at most **10 emails a day per project**, or as one daily summary. You're always emailed right away when your app is down or there's a serious security issue.
## Usage [#usage]
Copilot CTO runs on Coaade Code 2.0, which has no AI limits. Its usage is still recorded on your [Usage](/docs/cloud-ide/usage) page. Health checks don't use AI at all.
# Databases (/docs/cloud-ide/databases)
Create a database from the IDE's database panel, or ask Coaade Code to create one. It's wired into your app for you.
## Engines and plan limits [#engines-and-plan-limits]
| Engine | Free | Pro | Team | Enterprise |
| --- | --- | --- | --- | --- |
| **PostgreSQL** | — | 5 databases, 1 GB each | 10 databases, 4 GB each | Custom |
| **MongoDB** | 1 database, 64 MB | 5 databases, 1 GB each | 8 databases, 2 GB each | Custom |
| **Redis** | — | — | 2 instances, 256 MB each | Custom |
Pro and above include automated database backups. Team and above include connection pooling.
## Connect your app [#connect-your-app]
Deployed server apps get these environment variables automatically:
| Variable | Engine |
| --- | --- |
| `DATABASE_URL` | PostgreSQL |
| `MONGODB_URI` | MongoDB |
| `REDIS_URL` | Redis |
Read them in your code instead of hardcoding credentials:
```js
import pg from 'pg';
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });
const { rows } = await pool.query('SELECT now()');
```
```python
import os
import psycopg
with psycopg.connect(os.environ["DATABASE_URL"]) as conn:
print(conn.execute("SELECT now()").fetchone())
```
## Query from the IDE [#query-from-the-ide]
The database view shows credentials, size and limits next to your code. Write a query and press **Ctrl+Enter** to run it. Redis databases have their own tab for keys and commands.
# Deploy (/docs/cloud-ide/deploy)
## Deploy your project [#deploy-your-project]
Click **Deploy** in the IDE, or type `/deploy` in AI Chat.
- **Static sites and React/Vite apps** build and go live at `your-name.coaade.app` with HTTPS. Available on every plan.
- **Server apps** such as Express, Fastify and Flask run on **Pro, Team and Enterprise**.
Click **Deploy** again to publish an update. You choose the `*.coaade.app` subdomain your project lives at.
## Build logs [#build-logs]
Every deploy's output is kept in one place. When a build fails, Coaade Code can read the log and fix it.
## Environment variables [#environment-variables]
Set your deployed app's environment variables from the Deploy dialog. Your project's [databases](/docs/cloud-ide/databases) are added for you as `DATABASE_URL`, `MONGODB_URI` and `REDIS_URL`.
## Always on [#always-on]
Server apps run around the clock on Pro, Team and Enterprise. They don't go to sleep when nobody visits, so every visit is answered right away.
## Stop a deployment [#stop-a-deployment]
Take a deployed app offline at any time from the Deploy dialog.
## Limits [#limits]
| | Free | Pro | Team |
| --- | --- | --- | --- |
| Server apps | — | ✓ | ✓ |
| RAM per server app | — | 1 GB | 2 GB |
| Build minutes per month | 100 | 2,000 | 10,000 |
| Concurrent builds | 1 | 2 | 5 |
| Requests per month (server apps) | — | 500,000 | 5,000,000 |
| Bandwidth per month | 100 GB | 1 TB | 5 TB |
| Auto-scaling and priority builds | — | — | ✓ |
## Custom domains [#custom-domains]
Custom domains with automatic SSL are available on **Pro, Team and Enterprise**.
### Add the domain [#add-the-domain]
Open **Custom domains** for the project and enter your domain, for example `app.example.com` or `example.com`.
### Prove you own it [#prove-you-own-it]
Add the TXT record the IDE shows at your DNS provider:
| Type | Name | Value |
| --- | --- | --- |
| TXT | `_coaade-challenge.app.example.com` | `coaade-verify=` |
### Point it at your project [#point-it-at-your-project]
- **Subdomain** (such as `app.example.com` or `www.example.com`): add a `CNAME` to `.coaade.app`.
- **Root domain** (such as `example.com`): root domains can't have a CNAME. Use your provider's `ALIAS`, `ANAME` or CNAME flattening, or the `A` records the IDE lists. Add one of these, not both.
The IDE shows the exact records for your domain, including what to type in your provider's **Host** or **Name** field.
### Verify [#verify]
Click **Verify**. Once the records are found, SSL is issued automatically and the domain goes live.
If your plan ends, custom domains are disconnected. The site warns you before you downgrade.
# Editor (/docs/cloud-ide/editor)
The editor has what you expect from a desktop editor, in a browser tab that opens in seconds.
## Features [#features]
- **Syntax highlighting** for JavaScript, TypeScript, JSX, Python, Ruby, Bash, CSS, SCSS, HTML, Vue, Svelte, JSON, YAML, TOML and more, tuned to every theme.
- **Multi-cursor editing**: add the next match, or select every match at once.
- **Find and replace** in a file or across the project, with match case, whole word and regex options.
- **Smart typing**: autocomplete, auto-closing brackets and quotes, smart indentation and a live bracket-balance check.
- **Split view, minimap, word wrap, Zen mode** and full screen.
- **Tabs and breadcrumbs**: drag tabs to reorder, close others or all, copy a file's path from the breadcrumb.
- **Auto-save**: changes save as you type. **Ctrl+S** saves immediately.
- **Indent size**: switch between 2 and 4 spaces.
## Keyboard shortcuts [#keyboard-shortcuts]
On macOS, use **Cmd** in place of **Ctrl**.
### Navigation [#navigation]
| Action | Shortcut |
| --- | --- |
| Command palette | Ctrl+Shift+P |
| Quick open file | Ctrl+P |
| Go to line | Ctrl+G |
| Go to symbol | Ctrl+Shift+O |
### Editing [#editing]
| Action | Shortcut |
| --- | --- |
| Save | Ctrl+S |
| Add next occurrence (multi-cursor) | Ctrl+D |
| Select all occurrences | Ctrl+Shift+L |
| Toggle line comment | Ctrl+/ |
| Format document | Shift+Alt+F |
| Move line up / down | Alt+↑ / Alt+↓ |
| Duplicate line | Shift+Alt+↓ |
| Delete line | Ctrl+Shift+K |
| Undo | Ctrl+Z |
### Search [#search]
| Action | Shortcut |
| --- | --- |
| Find in file | Ctrl+F |
| Replace in file | Ctrl+H |
### View [#view]
| Action | Shortcut |
| --- | --- |
| Zen mode | Ctrl+J |
| Full screen | Ctrl+Shift+F |
| Increase / decrease text size | Ctrl++ / Ctrl+- |
| Reset text size | Ctrl+0 |
| New terminal | Ctrl+Shift+\` |
Actions without a shortcut, such as **Split Editor**, **Toggle Minimap**, **Toggle Word Wrap**, **Toggle Tab Size (2/4)**, **Find in Files** and **Show the IDE tour**, are in the command palette.
## Themes [#themes]
Fourteen themes: Coaade Dark, Midnight, Forest, Sunset, Rose, Coaade Light, Nord, Solarized, and the multi-tone Aurora, Lagoon, Orchid, Dusk, Ember and Sakura.
# Git and GitHub (/docs/cloud-ide/git-and-github)
## Git in the IDE [#git-in-the-ide]
The **Source Control** tab gives you full Git without leaving the editor:
- Start a repository
- Stage changes and commit (**Ctrl+Enter** in the message box)
- Create and switch branches
- Browse history
The status bar shows your branch and how many new commits are waiting on GitHub.
## Connect GitHub [#connect-github]
### Sign in with the Coaade GitHub App [#sign-in-with-the-coaade-github-app]
In Source Control, choose **Connect GitHub**. A small popup opens where you sign in to GitHub and install the Coaade GitHub App.
### Choose repositories [#choose-repositories]
Pick exactly which repositories the app may use. You can change this later in your GitHub settings.
### Link or create a repository [#link-or-create-a-repository]
Point the project at one of your repositories, or create a new one. You can change the link later.
You can also start a project directly from a repository with **New Project → Import from GitHub**.
## Push and pull [#push-and-pull]
Push and pull from Source Control, or ask Coaade Code to commit and push for you.
Every push and pull uses a **short-lived token for that one repository**, revoked right after. Nothing is stored in your workspace.
## Live GitHub updates [#live-github-updates]
The IDE shows new commits on your branch and who pushed them, and lists open pull requests. Pull new commits in with one click.
## Copilot CTO branches [#copilot-cto-branches]
Work done by [Copilot CTO](/docs/cloud-ide/copilot-cto) happens on separate branches named `cto/…`. Review and merge them like any other branch.
# Cloud IDE overview (/docs/cloud-ide)
Coaade Cloud IDE runs at [ide.coaade.com](https://ide.coaade.com). Each project gets its own Linux workspace in Coaade Cloud, so the terminal, dev servers, databases and deployments are real, not simulated. Nothing needs to be installed.
## What's inside [#whats-inside]
An AI engineer with Agent, Spec and Ask modes that edits files, runs commands and deploys.
Daily reviews, health checks and proposals you approve. Pro and above.
An AI that uses your deployed app in a real browser and reports what's broken.
Review your code, scan your live site, or let an AI pen tester probe it. Pro and above for site tests.
Multi-cursor, command palette, split view, 14 themes and the shortcuts you know.
A Linux shell with 10+ runtimes, a live preview and Jupyter notebooks.
Use Coaade from ChatGPT, Claude, Claude Code, Kiro, Cursor or VS Code over MCP.
Static and server apps on `*.coaade.app` or your own domain, with HTTPS.
## The workspace layout [#the-workspace-layout]
| Area | What it holds |
| --- | --- |
| **Left sidebar** | Explorer, search, Source Control, databases, Memory and other panels |
| **Editor** | Tabs, breadcrumbs, split view and the minimap |
| **Right panel** | AI Chat, Preview, Console, Terminal and Copilot CTO |
| **Status bar** | Current branch, new commits on GitHub, cursor position and indent size |
Press **Ctrl+Shift+P** to open the command palette and search every action. On macOS, use **Cmd** wherever these docs say **Ctrl**.
## Your work follows you [#your-work-follows-you]
Projects, chats and Git history live in the cloud. Open the IDE on any device and pick up exactly where you left off. Changes save automatically as you type.
## Plans [#plans]
Everything on this tab works on Free unless a page says otherwise. Server deployments, custom domains, autonomous AI mode, Copilot CTO and App Test need Pro or higher. See [Plans and limits](/docs/get-started/plans-and-limits).
# Project memory (/docs/cloud-ide/memory)
Each project keeps short notes that AI Chat and Copilot CTO read before they work. You don't have to explain your project at the start of every chat.
## What goes in memory [#what-goes-in-memory]
- Your product brief: what you're building and for whom
- Conventions: "use pnpm", "components live in `src/ui`"
- Decisions: "we chose PostgreSQL over MongoDB because…"
After each chat, the AI saves what's worth remembering on its own. You can turn that off.
## Manage notes [#manage-notes]
Open the **Memory** icon in the IDE's sidebar to see, add, edit, **pin** and delete notes. Pinned notes are kept as they are when memory is tidied.
Viewers of a shared project can read the notes but not change them.
## Size and tidying [#size-and-tidying]
| Plan | Memory per project |
| --- | --- |
| Free | 32 KB |
| Pro | 256 KB |
| Team | 1 MB |
| Enterprise | 4 MB (adjustable) |
The project owner's plan applies. When memory fills up, older notes are summarized into shorter ones automatically.
# Plugins and starters (/docs/cloud-ide/plugins-and-starters)
## Plugins (MCP) [#plugins-mcp]
Connect your own [Model Context Protocol](https://modelcontextprotocol.io) servers and Coaade Code can use their tools.
1. Open **Plugins** in the sidebar.
2. Add a server and authenticate with an **API key** or an **OAuth** sign-in.
3. The server's tools become available to AI Chat.
Only connect servers you trust; their tools act with the permissions you give them.
To go the other way, letting Claude Code, Kiro, Cursor or another AI tool work on your Coaade projects, see [Connect your AI](/docs/cloud-ide/connect-your-ai).
## Service starters [#service-starters]
Add a common building block in one click, then ask the AI to adapt it to your app:
- Authentication
- Stripe payments
- A database
- File storage
- Email
- Analytics
- A REST API
- Realtime
## Code and security review [#code-and-security-review]
The code quality scan is now part of **Security & Code review**, which also scans your deployed site for security problems. See [Security and pen testing](/docs/cloud-ide/security).
# Projects and files (/docs/cloud-ide/projects)
## Create a project [#create-a-project]
On the dashboard, click **New Project** and choose a source:
| Source | What happens |
| --- | --- |
| **Blank project** | An empty folder. Ask the AI to scaffold it, or create files yourself. |
| **Import from GitHub** | Pick one of your repositories and a branch. Connects the [Coaade GitHub App](/docs/cloud-ide/git-and-github) if you haven't yet. |
| **Upload from computer** | Upload files or a whole folder. |
There are no language templates. The stack is whatever your files are; the preview and deploys detect it.
The number of projects you can have depends on your plan: 3 on Free, 25 on Pro, 100 on Team and unlimited on Enterprise.
## Manage projects [#manage-projects]
From a project's menu on the dashboard you can open, rename, **Duplicate** or delete it. Projects other people shared with you appear under **Shared with you**.
## The file explorer [#the-file-explorer]
- **Drag and drop** files between folders, or drop files in from your desktop to upload them.
- **Select many** with the mouse, then move, duplicate or delete them in one go.
- **Rename, duplicate, copy path and delete** from the right-click menu. Cut, copy and paste work too.
- **Toggle hidden files** from the command palette.
- Material file and folder icons make React, TypeScript, Python, Docker and config files easy to spot.
## Images and binary files [#images-and-binary-files]
Images preview in the editor. Other binary files, such as fonts, PDFs and archives, can be downloaded.
## Download a project [#download-a-project]
Run **Download Project as ZIP** from the command palette to get the whole project as a `.zip` file.
## Limits [#limits]
| | Free | Pro | Team |
| --- | --- | --- | --- |
| Storage per project | 1 GB | 10 GB | 25 GB |
| Files per project | 1,000 | Unlimited | Unlimited |
| Largest single upload | 100 MB | 1 GB | 2 GB |
# Scheduled tasks (/docs/cloud-ide/scheduled-tasks)
Scheduled tasks run in your project's workspace at the times you set, whether or not the IDE is open.
## Task types [#task-types]
| Type | Runs |
| --- | --- |
| **AI task** | A prompt, carried out by Coaade Code. Needs autonomous mode (Pro and above). |
| **Command** | A shell command, run in the project folder. |
## Schedules [#schedules]
- Once, at a date and time
- Every day
- Weekdays
- Chosen days of the week
- Every few hours
Times are in your own timezone.
## Run history and alerts [#run-history-and-alerts]
Each run keeps a report of its steps and the files it changed. You can continue any run in AI Chat, and you get an email when a run fails.
## Limits [#limits]
| Plan | Active scheduled tasks |
| --- | --- |
| Free | 3 (commands only) |
| Pro | 20 |
| Team | 50 |
| Enterprise | 200 |
# Security and pen testing (/docs/cloud-ide/security)
The Cloud IDE has two security tools. Both open from the project's left rail and fill the editor area.
| | **Security & Code review** | **AI pen test** |
| --- | --- | --- |
| What it checks | Your saved code, plus a passive scan of your deployed site | Your running app, probed like a penetration tester and QA engineer would |
| How | Reads code; sends plain `GET`/`HEAD` requests to the site | An AI agent drives your site in a real cloud browser and sends crafted, safe requests |
| Takes | Seconds | A few minutes |
| Uses Coaade AI | No | Yes |
| Plans | Code review: every plan. Site scan: **Pro and higher**. | **Pro and higher** |
Both tools only test the project's own deployed site: its `*.coaade.app` address or a verified custom domain. They
can't be pointed at anyone else's site.
## Security & Code review [#security--code-review]
Click **Run review**. It does two things together:
- **Code review** scores the project's saved code, including maintainability and project hygiene, and finds hardcoded secrets and issues. It works without a deployment.
- **Security scan** checks your deployed site. It needs a deployed site.
Each finding has a severity and a fix, and **Fix with AI Chat** sends it to Coaade Code.
### What the security scan checks [#what-the-security-scan-checks]
| Area | Checks |
| --- | --- |
| Security headers | Missing or weak `Content-Security-Policy`, `Strict-Transport-Security`, clickjacking protection (`X-Frame-Options` or CSP `frame-ancestors`), `X-Content-Type-Options`, `Referrer-Policy` |
| Cookies | Missing `Secure`, `HttpOnly` or `SameSite` |
| Transport | Plain `http` served without a redirect to `https` |
| CORS | Reflecting any origin, or a wildcard combined with credentials |
| Disclosure | `Server` or `X-Powered-By` headers that reveal versions |
| Exposed files | Accidentally published files such as `.env`, `.git` and credentials |
The scan is non-destructive. Every probe is a plain `GET` or `HEAD` that reads headers, cookie flags and a short sample of the body. It sends no attack payloads and changes nothing.
## AI pen test [#ai-pen-test]
Open **AI pen test** and click **Run AI pen test**. Deploy first; the test runs against your live site.
An AI agent maps your site, plans the test, then probes it in a real AWS cloud browser. Findings stream in live, and the run ends with a **security score from 0 to 100** (100 means nothing was found). Close the view at any time; a running test keeps going. Past runs are listed and can be reopened.
### What it looks for [#what-it-looks-for]
| Category | Examples |
| --- | --- |
| **Auth & sessions** | Pages and actions reachable while signed out, cookie flags, logout, session fixation, weak credentials accepted |
| **Access control / IDOR** | Changing IDs in URLs and requests to reach other people's data; ownership and roles enforced only in the UI |
| **Injection** | Reflected XSS, SQL error signatures, template injection, open redirects, path traversal |
| **Data exposure** | Secrets, stack traces, verbose errors, directory listings, source maps, exposed files, sensitive data in responses or bundles |
| **Transport and config** | HTTPS and security configuration |
| **QA** | Broken flows, dead ends, error states, missing feedback |
By default it does a full pass over all of these. You can start a run focused on one area instead.
Each finding has a severity, a category, the **evidence** (the request or steps, with expected and actual results) and a recommended fix. **Fix with AI Chat** hands it to Coaade Code.
### How it stays safe [#how-it-stays-safe]
- It only tests your project's own site.
- It uses safe HTTP methods (`GET`, `HEAD`, `POST`, `OPTIONS`) and benign marker payloads. It confirms a weakness exists; it doesn't exploit it or destroy data.
- Its requests identify themselves as `Coaade-PenTest/1.0` in the user agent.
A pen test acts like a real visitor and can submit forms on your live site. Run it against a staging deploy, or
expect test entries in your data.
## From your AI app [#from-your-ai-app]
Both tools are also available through [Coaade MCP](/docs/cloud-ide/connect-your-ai): `security_scan` and `pen_test`, with tools to list and read past results.
# Sharing and teams (/docs/cloud-ide/sharing-and-teams)
## Share a project [#share-a-project]
Open **Share** in a project and invite people by **email** or with a **link**. Choose a role:
| Role | What they can do |
| --- | --- |
| **Can edit** | Edit files, use the terminal and AI Chat |
| **Can view** | Read files and project memory, and ask the AI questions. Never changes your files. |
People who don't have a Coaade account yet can sign up from the invitation.
## Manage access [#manage-access]
From the same dialog you can change roles, remove people and cancel pending invitations. Projects others shared with you appear on your dashboard under **Shared with you**.
## Team plans [#team-plans]
The **Team** plan supports up to 200 members. Each member has their own sign-in and gets the plan's benefits. Seats are managed from the Desktop App's [Licenses](/docs/desktop-app/keys-and-licenses#team-licenses) page.
## Your work, everywhere [#your-work-everywhere]
Projects, chats and Git history live in the cloud, so you and your team can pick up on any device.
# Terminal, preview and notebooks (/docs/cloud-ide/terminal-and-preview)
## Terminal [#terminal]
Every project has a real Linux shell in its own cloud workspace. Open one from the right panel, or press **Ctrl+Shift+\`** for a new terminal.
Installed runtimes and tools:
| Runtime | |
| --- | --- |
| Node.js 22 | npm |
| Python 3 | Each project gets its own virtualenv |
| Go, Rust, Ruby, Java, PHP | |
| GCC | C and C++ |
| SQLite | |
Workspace resources depend on your plan:
| | Free | Pro | Team |
| --- | --- | --- | --- |
| vCPU | 0.5 | 2 | 4 |
| RAM | 512 MB | 2 GB | 4 GB |
| Processes | 30 | 100 | 200 |
| Command timeout | 30 s | 60 s | 120 s |
## Dev servers on a URL [#dev-servers-on-a-url]
Start a dev server, for example `npm run dev`, and the IDE opens it in the preview on its own secure address.
## Background tasks [#background-tasks]
Long builds, training runs and watchers keep running in the background while you work.
## Live preview [#live-preview]
HTML, React, JSX and TypeScript render as you type, without a build step. The preview has back and refresh buttons, an address bar and **Open Preview in New Tab**.
The preview adapts to your project type: web apps, API servers, and mobile or desktop projects such as Expo, Flutter, Capacitor, Tauri and Electron.
## Console [#console]
Your app's logs and errors appear in the **Console** tab. Attach them to an AI chat with `@errors`.
## Jupyter notebooks [#jupyter-notebooks]
Open any `.ipynb` file to run it with a live Python runtime. Run cells; see plots, tables and variables; interrupt and restart the kernel, much like Google Colab.
# Usage and quotas (/docs/cloud-ide/usage)
Every quota is shown live on the IDE dashboard and on the **Usage** page, with per-project detail.
## What's tracked [#whats-tracked]
| Quota | Resets |
| --- | --- |
| AI requests and tokens (other models only) | Daily, at midnight UTC |
| AI credits (other models only) | Monthly, on the 1st (UTC) |
| AI web searches | Daily |
| Build minutes | Monthly |
| Bandwidth and requests | Monthly |
| Storage and files | — (per project) |
| Databases | — (per plan) |
Coaade Code 2.0 is unlimited, so AI limits only apply when you pick another model. See [Plans and limits](/docs/get-started/plans-and-limits) for the numbers on each plan.
## When you reach a limit [#when-you-reach-a-limit]
The IDE tells you which quota you've reached. Daily quotas reset the next day and monthly ones at the start of the next calendar month. To get more right away, upgrade your plan.
## From the API [#from-the-api]
Your live quota report is also available from the Cloud API at [`GET /v1/usage/quotas`](/docs/api/usage#get-quotas).
# Chat (/docs/desktop-app/chat)
**Chat** is the page Coaade Manager opens to. It works like other AI chat apps, but runs on the model installed on your computer, so no prompt or reply leaves it.
## Start a conversation [#start-a-conversation]
1. Pick a model with the model selector. Only installed models are listed.
2. Type your message. Replies stream in as they're generated.
## History [#history]
Past conversations are listed under **Recent Chats**. Open one to continue it, or start a new conversation.
## Extensions in chat [#extensions-in-chat]
If you've installed [extensions](/docs/desktop-app/extensions) for the active model, Manager detects when one is relevant to your message and adds its instructions automatically.
## When chat doesn't respond [#when-chat-doesnt-respond]
| Message | What to do |
| --- | --- |
| **AI Runtime Stopped** | Click **Start Runtime** in the banner, or run `coaade runtime start`. |
| **AI Runtime Not Found** | The engine isn't installed yet. Click **Download** (about 50 MB) under **Settings → AI Runtime**, or **Retry** if a download failed. |
| **Model not found.** | Install a model on the **Models** page. |
# Extensions (/docs/desktop-app/extensions)
Extensions are **skill packs**: focused instructions and knowledge that specialize a model for a domain such as a language, a framework or a kind of task. Each extension belongs to a model.
## Install an extension [#install-an-extension]
1. Open **Extensions**. Extensions are grouped by model.
2. Select one to see its description, capabilities, size and the model version it needs.
3. Click **Install**.
An extension that needs a newer model version than you have can't be installed until you update the model.
## How extensions are used [#how-extensions-are-used]
You don't have to turn an extension on. When you chat, Manager matches your message against the keywords of installed skill packs and adds the relevant one to the conversation.
The CLI's local provider uses Manager's skill injection too. See [CLI providers](/docs/cli/configuration#providers).
## Access by plan [#access-by-plan]
Free includes basic skill packs. Pro, Team and Enterprise include all of them.
## Uninstall [#uninstall]
Open the extension and click **Uninstall**.
# Desktop App overview (/docs/desktop-app)
The Coaade Desktop App, called **Coaade Manager**, runs on macOS, Windows and Linux. It installs and runs Coaade's models on your own hardware, so chat works offline and your code stays on your machine.
## What it does [#what-it-does]
| Page | What you do there |
| --- | --- |
| **Chat** | Chat with a local model, with history and model selection. This is the default page. |
| **Models** | Browse, install, update and uninstall models, with live progress. |
| **Extensions** | Add skill packs for a model, with version compatibility checks. |
| **Subscription** | See your plan and usage, and change plans. |
| **API Keys** | Create and revoke keys for the local API and integrations. |
| **Licenses** | Manage Team seats. |
| **System Check** | Check your hardware and see which models it can run. |
| **Updates** | Check for, download and install app updates. |
| **Settings** | Runtime, updates, startup and notification preferences. |
| **Account** | Profile, password and account deletion. |
## It runs in the background [#it-runs-in-the-background]
Coaade Manager keeps a menu-bar (macOS) or system-tray icon with **Open Coaade Manager** and **Quit Coaade**. Closing the window leaves the app running, so the CLI and the VS Code extension can keep using it. On macOS the app then leaves the Dock and app switcher; opening it from the tray brings it back. Choose **Quit Coaade** to stop it completely.
## The CLI comes with it [#the-cli-comes-with-it]
A Manager build includes the matching [Coaade CLI](/docs/cli). On first launch, Manager installs it into `~/.coaade/bin` and adds that folder to your shell's `PATH`. The CLI and Manager share one account session.
## Where it keeps data [#where-it-keeps-data]
| Path | Contents |
| --- | --- |
| `~/.coaade/coaade.db` | Your account session, settings, cached plan and license, and usage. Shared with the CLI. |
| `~/.coaade/bin` | The installed `coaade` CLI |
## Next [#next]
# Installation (/docs/desktop-app/installation)
The Desktop App beta has closed. Downloads return with the launch of Coaade Code 2.0. Use **Get Notified** on
[coaade.com/download](https://www.coaade.com/download) to hear when they're back. In the meantime, the
[Cloud IDE](/docs/cloud-ide) works in any browser with nothing to install.
## System requirements [#system-requirements]
| | Minimum | Recommended |
| --- | --- | --- |
| Operating system | Windows 10, macOS 11, or a recent Linux | Latest version |
| Memory | 4 GB RAM | 8 GB RAM or more |
| Storage | 10 GB free | SSD |
| CPU | Intel Core i5 / AMD Ryzen 5 or better | |
| GPU | Not required | NVIDIA or AMD GPU for faster inference |
Run [System Check](/docs/desktop-app/system-check) after installing to see exactly which models your machine supports.
## Installers [#installers]
Each release pairs a Manager version with a matching CLI version and ships for these platforms:
| Platform | Architectures | Package |
| --- | --- | --- |
| macOS | Apple silicon (arm64), Intel (x64) | `.dmg` |
| Windows | x64, arm64, x86 | Installer for the current user (`.exe`) |
| Linux | x64, arm64 | `.AppImage` |
1. Open the `.dmg` and drag **Coaade Manager** to **Applications**.
2. Open it from Applications.
1. Run the installer. It installs for your user account, so no administrator rights are needed.
2. Open **Coaade Manager** from the Start menu.
```bash
chmod +x Coaade-Manager-*.AppImage
./Coaade-Manager-*.AppImage
```
## Command-line installer [#command-line-installer]
A one-line installer downloads Manager and the CLI together, verifies their SHA-256 checksums and installs both for the current user. It will be published with the next release:
```bash
curl -fsSL https://api.coaade.com/public/install.sh | sh
```
```powershell
irm https://api.coaade.com/public/install.ps1 | iex
```
## First launch [#first-launch]
1. **Sign in** or **create an account**. New accounts verify their email before signing in.
2. Manager sets up its local database and installs the bundled CLI into `~/.coaade/bin`, adding it to your `PATH`. Open a new terminal and run `coaade --version` to check.
3. Open **Models** and install a model.
## Uninstall [#uninstall]
Quit Coaade from the tray icon, then remove the app as usual for your platform. To remove local data too, delete the `~/.coaade` folder. This removes downloaded models, saved sessions and settings.
# API keys and licenses (/docs/desktop-app/keys-and-licenses)
## API keys [#api-keys]
API keys let local tools and integrations call Coaade on your behalf. They look like `coaade_sk_` followed by 40 characters.
### Create a key [#create-a-key]
1. Open **API Keys**.
2. Create a key and give it a name (the default is "Default key").
3. **Copy the key now.** It's shown once. Coaade stores only a hash and can't show it again.
You can also create keys on the Cloud IDE's **MCP** page, where you choose **Full access** or **Read only**.
### Use a key [#use-a-key]
- [Connect your AI app](/docs/cloud-ide/connect-your-ai) (Claude Code, Kiro, Cursor, VS Code, Claude Desktop) to Coaade MCP. ChatGPT, Claude and most of these can also sign in with Coaade instead of using a key.
- The [local API](/docs/desktop-app/local-api) requires a key in every request.
- The CLI's local provider reads it from `COAADE_MANAGER_API_KEY`, or from `coaade auth manager`.
### Revoke a key [#revoke-a-key]
Click **Revoke** next to the key and confirm. Anything using it stops working right away.
### Key limits [#key-limits]
| Plan | Active keys |
| --- | --- |
| Free | 1 |
| Pro | 1 |
| Team | 5 |
| Enterprise | Unlimited |
Treat API keys like passwords. Don't commit them to Git or paste them into chats. If a key leaks, revoke it and
create a new one.
## Team licenses [#team-licenses]
On the Team plan, the account owner buys seats and assigns them on the **Licenses** page.
- **Invite** teammates by email. Each member signs in with their own Coaade account and gets the Team plan's benefits.
- **Seat changes** show a preview first: the prorated amount added to your bill now, then the per-seat price each billing period.
- **Remove** a member to free their seat.
- **Leave team** from the same page if you're a member. Your account returns to its own plan.
Members on a seat see their plan as read-only; billing is managed by the owner.
# Local HTTP API (/docs/desktop-app/local-api)
While Coaade Manager is running, it serves an HTTP API on your own machine. The CLI and the VS Code extension use it, and so can your scripts and tools. Requests never leave your computer.
## Basics [#basics]
| | |
| --- | --- |
| Base URL | `http://127.0.0.1:11434/v1` |
| Listens on | Loopback only (`127.0.0.1`). It isn't reachable from other machines. |
| Authentication | A Coaade API key in `X-Api-Key: ` or `Authorization: Bearer ` |
| Format | JSON. `POST /v1/chat` streams Server-Sent Events. |
Create a key on the [API Keys](/docs/desktop-app/keys-and-licenses#api-keys) page. Requests without a valid key are rejected.
```bash
export COAADE_KEY="coaade_sk_..."
curl -s http://127.0.0.1:11434/v1/status -H "X-Api-Key: $COAADE_KEY"
```
## Get status [#get-status]
The runtime's state, the active model, your cached plan and usage, and the Manager version.
```json
{
"runtime": { "status": "running", "port": 39281, "activeModelId": "coaade-code", "pid": 41822 },
"subscription": { "tier": "pro", "messagesUsed": 120, "messagesLimit": 999999 },
"activeModel": "coaade-code",
"version": "0.2.0"
}
```
## Chat (streaming) [#chat-streaming]
Send a conversation to the active local model and stream the reply as Server-Sent Events.
`context` accepts:
```bash
curl -N http://127.0.0.1:11434/v1/chat \
-H "X-Api-Key: $COAADE_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{ "role": "user", "content": "Explain what this function does" }],
"context": {
"language": "Python",
"files": [{ "path": "app.py", "content": "def add(a, b):\n return a + b" }]
}
}'
```
Each event's `data` is a JSON object with a `type`:
| `type` | Fields | Meaning |
| --- | --- | --- |
| `status` | `message` | Progress, such as "Processing request..." |
| `token` | `content` | The next piece of the reply. Concatenate them. |
| `done` | `usage.completionTokens` | The reply is complete. |
| `error` | `message` | Something failed, for example the runtime isn't running. |
```text
data: {"type":"status","message":"Processing request..."}
data: {"type":"token","content":"This "}
data: {"type":"token","content":"function adds two numbers."}
data: {"type":"done","usage":{"promptTokens":0,"completionTokens":7}}
```
Manager adds the instructions of a matching installed [extension](/docs/desktop-app/extensions) automatically.
## Chat with tools [#chat-with-tools]
A non-streaming chat completion with tool definitions, used by agentic clients such as the CLI.
The response is the completion object, with a `choices` array. If the runtime isn't running, the response has an `error` string and an empty `choices` array.
## List models [#list-models]
Installed models and which one is active.
```json
[
{ "id": "coaade-code", "name": "Coaade Code", "active": true, "sizeBytes": 392167424, "quantization": "Q4_K_M" }
]
```
## Switch the active model [#switch-the-active-model]
Make an installed model the active one.
```bash
curl -s http://127.0.0.1:11434/v1/models/switch \
-H "X-Api-Key: $COAADE_KEY" -H "Content-Type: application/json" \
-d '{ "modelId": "coaade-code" }'
```
```json
{ "success": true, "activeModelId": "coaade-code" }
```
If the model isn't installed: `{ "success": false, "error": "Model not found" }`.
## Start and stop the runtime [#start-and-stop-the-runtime]
Start the local engine with the active model. Waits up to 30 seconds for it to be ready.
Stop the local engine.
| Response | Meaning |
| --- | --- |
| `{ "status": "running", "pid": 41822, "port": 39281 }` | Started |
| `{ "status": "stopped", "message": "Runtime stopped" }` | Stopped |
| `{ "status": "error", "message": "…" }` | It couldn't start, for example it wasn't ready within 30 seconds |
## List extensions [#list-extensions]
Installed skill packs.
```json
[{ "id": "react", "name": "React", "keywords": ["react", "jsx", "hooks"], "localPath": "/Users/you/.coaade/skills/react" }]
```
The example IDs, ports and sizes on this page are illustrative. The engine port is chosen by Manager; read it from
`GET /v1/status`.
# Models (/docs/desktop-app/models)
The **Models** page lists the models available for your account and machine.
## Install a model [#install-a-model]
1. Open **Models**.
2. Select a model to see its details: description, capabilities, size, hardware requirements and version.
3. Click **Install**. Progress is shown while it downloads.
A model marked **Incompatible** needs more hardware than your machine has (for example **GPU Required**). Run [System Check](/docs/desktop-app/system-check) to see why.
## Use a model [#use-a-model]
Pick the active model in [Chat](/docs/desktop-app/chat) with the model selector. The CLI and other local clients use the active model too, and can switch it through the [local API](/docs/desktop-app/local-api#switch-the-active-model).
## Update and uninstall [#update-and-uninstall]
When a newer version of an installed model is available, the model shows an update. Uninstall a model from its details page to free disk space.
## How many models you can install [#how-many-models-you-can-install]
| Plan | Installed models |
| --- | --- |
| Free | 1 |
| Pro | 10 |
| Team | 50 |
| Enterprise | Unlimited |
## The AI runtime [#the-ai-runtime]
Models run on the local **Coaade engine**, which Manager starts and stops for you. If Chat shows **AI Runtime Stopped**, click **Start Runtime** or run `coaade runtime start`. If it shows **AI Runtime Not Found**, download the engine under **Settings → AI Runtime**.
# Settings and updates (/docs/desktop-app/settings-and-updates)
## Settings [#settings]
| Group | Setting | What it does |
| --- | --- | --- |
| **AI Runtime** | AI Engine Status | Shows whether the local engine is installed and running |
| **Updates** | Check Frequency | How often to check for app updates |
| **Startup** | Launch at Startup | Start Coaade when your computer boots |
| | Default View | Which page opens first |
| **Notifications** | Update Alerts | Notify when an app update is available |
| | Download Complete | Notify when a model download finishes |
**Reset Settings** restores every setting to its default.
## Updates [#updates]
Open **Updates** to check for a new version. When one is available you see **New version available** with its release notes. Download it, then restart Coaade to apply it. If you're current, the page says **You're up to date**.
Each Manager release includes the matching CLI, so updating Manager also updates `coaade`.
## Account [#account]
On the **Account** page you can change your display name, change your password and delete your account. See [Accounts](/docs/get-started/account).
# System Check (/docs/desktop-app/system-check)
**System Check** inspects your hardware and compares it with what each model needs.
## What it checks [#what-it-checks]
| Check | Why it matters |
| --- | --- |
| **CPU cores** | More cores means faster inference on CPU. |
| **Memory** | Models need enough RAM for their working set. |
| **GPU and VRAM** | Some models need a GPU; others run faster with one. |
| **Available disk** | Models are downloaded to your disk. |
## Reading the results [#reading-the-results]
- **All Checks Passed**: your machine meets every requirement.
- **Some Checks Failed**: one or more components fall short. **Component Results** shows which.
- **Model Compatibility** lists every model and whether it runs on your hardware. Incompatible models say why, such as **GPU Required**.
If a model you want is incompatible, look at [StrataFlow](/docs/strataflow): it runs Mixture-of-Experts models in far less RAM than their size.
# Accounts (/docs/get-started/account)
One Coaade account signs you in to coaade.com, the Cloud IDE, the Desktop App and the CLI.
## Sign up [#sign-up]
Create an account at [coaade.com/signup](https://www.coaade.com/signup), in the Desktop App, or through the [API](/docs/api/authentication#sign-up). Every new account starts on the **Free** plan.
After you sign up, Coaade emails you a verification code. Enter it to verify your email. **You can't sign in until your email is verified.** If the code doesn't arrive, request a new one from the sign-in screen.
## Password rules [#password-rules]
The same rules apply everywhere you set a password: sign-up, password reset and project invitations. A password must have:
- At least **10** characters (and at most 200)
- A lowercase letter
- An uppercase letter
- A number
- A symbol, like `! @ # ?`
- Not be a common password, a sequence (such as `12345678` or `qwerty`) or contain the name part of your email
Look-alike substitutions don't get around the common-password check: `P@ssw0rd2026!` is treated as `password`.
## Reset a forgotten password [#reset-a-forgotten-password]
1. Choose **Forgot password** on the sign-in screen and enter your email.
2. If an account exists, Coaade emails you a reset code. For privacy, the screen looks the same whether or not the account exists.
3. Enter the code and your new password.
## Sessions and devices [#sessions-and-devices]
When you sign in, Coaade issues a short-lived **access token** (15 minutes) and a longer-lived **refresh token** (30 days). Apps refresh the access token automatically, so you stay signed in while you use them.
On your computer, the Desktop App and the CLI share one session. Signing in to either signs in both, and `coaade logout` (or signing out in the app) signs both out.
## Update your profile [#update-your-profile]
Change your display name and avatar from your account page on coaade.com or in the Desktop App under **Account**.
## Delete your account [#delete-your-account]
You can delete your account from the account page in the Desktop App or console. Coaade confirms the deletion by email. Cancel any paid subscription first so you aren't billed again; see [Plans and limits](/docs/get-started/plans-and-limits#cancel-or-change-plans).
Deleting your account signs you out everywhere. Download anything you want to keep, such as your Cloud IDE
projects (**Download Project as ZIP**), before you delete it.
# FAQ (/docs/get-started/faq)
Coaade Inc. builds compact, domain-expert AI models that run on your own hardware, and the tools to use them:
Coaade Cloud IDE, the Desktop App, the CLI, the VS Code extension and the StrataFlow inference engine.
The AI engineer inside the Cloud IDE. It creates and edits files, runs terminal commands, reads your codebase
and builds complete projects from natural language, using structured tool calls rather than parsing text.
See [AI Chat](/docs/cloud-ide/ai-chat) and [Coaade Code models](/docs/models/coaade-code).
No. Open [ide.coaade.com](https://ide.coaade.com), sign in and start coding. The terminal connects to a real Linux
workspace in Coaade Cloud.
Static sites (React, Vue, Svelte, HTML/CSS/JS) on a free `*.coaade.app` subdomain, up to 3 projects with 1,000
files each, and a small MongoDB database (64 MB). Server apps such as Express or Flask need Pro or higher.
Yes, 7 days, one per account. You add a card but aren't charged until the trial ends.
You keep access until the end of the billing period, then move to Free. Static sites stay live; server
deployments stop.
Yes, on Pro, Team and Enterprise. Ownership is verified by DNS, then SSL is issued automatically. See
[Custom domains](/docs/cloud-ide/deploy#custom-domains).
An AI CTO and product designer for each project on Pro and above. It reviews the code on your schedule, checks
your deployed app's health, and proposes fixes, features and architecture changes. Nothing happens without your
approval. See [Copilot CTO](/docs/cloud-ide/copilot-cto).
Local products (the Desktop App with a local model, StrataFlow) keep your code on your machine. Cloud products
process it on Coaade Cloud. See [Privacy and security](/docs/get-started/privacy-and-security) for exactly what
goes where.
At least 4 GB RAM, 10 GB of free storage and a modern CPU (Intel Core i5 / AMD Ryzen 5 or better). 8 GB+ RAM, an
SSD and a dedicated GPU make inference faster. Windows 10+, macOS 11+ and Linux are supported. The Desktop App's
[System Check](/docs/desktop-app/system-check) tells you which models your machine can run.
The Free plan is for personal and non-commercial use. Pro, Team and Enterprise include commercial use.
StrataFlow is free for personal, non-commercial use only; commercial use needs a separate license.
All major credit cards through Stripe. Enterprise plans can pay by invoice.
# Introduction (/docs/get-started)
Coaade Inc. builds **specialized, local-first AI**. Instead of one giant general model in a data center, Coaade makes compact, domain-expert models that run on your own hardware, starting with AI for software engineering. Around those models sit the tools you use every day: a browser IDE, a desktop app, a terminal agent and an inference engine.
## The four principles [#the-four-principles]
Coaade products are designed around four principles, sometimes written **FPCS**:
| Principle | What it means in practice |
| --- | --- |
| **Freedom** | No token limits on local inference. Your models keep working without a subscription check on every message. |
| **Privacy** | Local models run on your machine, so your code and prompts stay there. Cloud features use scoped, short-lived credentials. |
| **Cost** | Fixed plans and free local inference instead of per-token billing. |
| **Speed** | Small, specialized models answer fast on ordinary laptops. |
## The products [#the-products]
Build, run and ship apps from a browser tab, with Coaade Code 2.0 as your AI engineer.
Install and manage local models, chat offline, and get the CLI on your PATH.
An agent in your terminal that reads, edits and tests your code with your approval.
The engine that runs Mixture-of-Experts models bigger than your RAM.
Read [How the products fit together](/docs/get-started/products) for the full map.
## How these docs are organized [#how-these-docs-are-organized]
- **Get Started**: accounts, plans, privacy and the quickstart.
- **Cloud IDE**: every feature of `ide.coaade.com`, from the editor to Copilot CTO and deployments.
- **Desktop App**: Coaade Manager, local models and its local HTTP API.
- **CLI**: installation, commands, permissions, MCP, plugins and the full flag reference.
- **StrataFlow**: concepts, building from source, the CLI tools and the C API.
- **Models**: Coaade Code and Coaade Mind.
- **API Reference**: the Coaade Cloud API at `api.coaade.com`.
Every page is available as Markdown. Use **Copy Markdown** at the top of a page, or point your assistant at
[`/llms.txt`](/llms.txt) for an index and [`/llms-full.txt`](/llms-full.txt) for the full text.
# Plans and limits (/docs/get-started/plans-and-limits)
Coaade has four plans. Every plan includes the Cloud IDE, Coaade Code 2.0 and deploying models on your own devices. Current prices are always on [coaade.com/pricing](https://www.coaade.com/pricing).
## Plans [#plans]
| | **Free** | **Pro** | **Team** | **Enterprise** |
| --- | --- | --- | --- | --- |
| Price (monthly billing) | $0 | $18.99 / month | $24.99 / user / month | Custom |
| Price (yearly billing) | $0 | $16.99 / month | $22.99 / user / month | Custom |
| Free trial | — | 7 days | — | — |
| Members | 1 | 1 | Up to 200 | Unlimited |
| Projects | 3 | 25 | 100 | Unlimited |
| Storage per project | 1 GB | 10 GB | 25 GB | Custom |
| Files per project | 1,000 | Unlimited | Unlimited | Unlimited |
| Largest single upload | 100 MB | 1 GB | 2 GB | Custom |
| Deployments | Static sites | Static + server | Static + server, auto-scaling, priority builds | Dedicated infrastructure |
| Custom domains with SSL | — | ✓ | ✓ | ✓ |
| Databases | 1 MongoDB (64 MB) | 5 PostgreSQL (1 GB each), 5 MongoDB (1 GB each) | 10 PostgreSQL (4 GB each), 8 MongoDB (2 GB each), 2 Redis (256 MB each) | Custom |
| Autonomous AI mode | — | ✓ | ✓ | ✓ |
| Copilot CTO | — | Up to 4 reviews a day | Up to 4 reviews a day | Up to 6 reviews a day |
| App Test | — | ✓ | ✓ | ✓ |
| Site security scan and AI pen test | — | ✓ | ✓ | ✓ |
| Coaade MCP (connect your AI app) | ✓ | ✓ | ✓ | ✓ |
| Project memory | 32 KB | 256 KB | 1 MB | 4 MB (adjustable) |
| API keys | 1 | 1 | 5 | Unlimited |
| SSO / SAML | — | — | — | ✓ |
| Support | Community | Priority email | Dedicated support + SLA | Dedicated account manager |
## Daily and monthly quotas [#daily-and-monthly-quotas]
Daily quotas reset at midnight UTC and monthly ones on the 1st of the month (UTC). Your live usage is on the Cloud IDE dashboard and its **Usage** page. See [Usage and quotas](/docs/cloud-ide/usage).
AI Chat, Copilot CTO, memory and scheduled tasks run on Coaade Code 2.0, which is **unlimited on every plan**: no
message, request or token caps apply to it. The AI limits below only apply when you choose **another model** in AI
Chat, which is available on Pro and above.
| AI limits for other models | Pro | Team | Enterprise |
| --- | --- | --- | --- |
| AI credits per month | 1,000 | 2,000 | Unlimited |
| AI requests per day | 2,000 | 5,000 | Unlimited |
| AI tokens per day | 5,000,000 | 20,000,000 | Unlimited |
| Quota | Free | Pro | Team | Enterprise |
| --- | --- | --- | --- | --- |
| AI web searches per day | 20 | 200 | 500 | Unlimited |
| Build minutes per month | 100 | 2,000 | 10,000 | Unlimited |
| Concurrent builds | 1 | 2 | 5 | Unlimited |
| Active scheduled tasks | 3 | 20 | 50 | 200 |
| Bandwidth per month | 100 GB | 1,000 GB | 5,000 GB | Custom |
## Workspace resources [#workspace-resources]
Each project runs in its own cloud workspace. The terminal and dev servers get:
| | Free | Pro | Team | Enterprise |
| --- | --- | --- | --- | --- |
| vCPU | 0.5 | 2 | 4 | Up to 16 |
| RAM | 512 MB | 2 GB | 4 GB | Up to 32 GB |
| Processes | 30 | 100 | 200 | 1,000 |
| Command timeout | 30 s | 60 s | 120 s | 300 s |
| RAM per deployed app | — | 1 GB | 2 GB | Up to 16 GB |
| Idle server apps sleep after | — | Never | Never | Never |
Enterprise limits are set per contract; the values above are the defaults.
## Free trial [#free-trial]
Pro starts with a **7-day free trial**, one per account. You add a card at checkout but aren't charged until the trial ends. Cancel before then and you pay nothing.
## Upgrades and team seats [#upgrades-and-team-seats]
- **Upgrading** from a paid plan to another is prorated: you see the cost before you confirm, and the difference is added to your bill right away.
- **Team** is billed per seat. Invite members from the Desktop App's **Licenses** page; each member signs in with their own Coaade account and gets the plan's benefits. A member on someone else's Team seat sees the plan as read-only.
- **Enterprise** isn't bought online. [Talk to sales](mailto:company@coaade.com).
## Cancel or change plans [#cancel-or-change-plans]
Manage billing from the console on coaade.com or the Desktop App's **Subscription** page. **Payment & Invoices** opens the Stripe billing portal, where you can update your card and download invoices.
When you cancel:
- You keep your plan until the end of the billing period, and can reactivate before then.
- After that you're on Free. Deployed static sites stay live; **server deployments are stopped** and custom domains are disconnected.
- Paid plans come with a 30-day money-back guarantee.
## Payment [#payment]
All major credit cards through Stripe. Enterprise can pay by invoice.
## Commercial use [#commercial-use]
The Free plan is for personal and non-commercial use. Pro, Team and Enterprise include commercial use. StrataFlow has its own license; see [StrataFlow license](/docs/strataflow/license).
# Privacy and security (/docs/get-started/privacy-and-security)
Coaade products split into two groups: **local** products that run on your hardware, and **cloud** products that run on Coaade Cloud. This page explains what leaves your machine in each case.
## Where your data goes [#where-your-data-goes]
| Product | Where your code is processed | Notes |
| --- | --- | --- |
| Desktop App with a local model | Your computer | Chat runs through the local Coaade engine. Prompts and code stay on your machine. |
| StrataFlow | Your computer | No network access is needed to run a model. The repository ships no model weights. |
| CLI, `manager` provider | Your computer | Requests go to the Desktop App's loopback API on `127.0.0.1`. |
| CLI, `bedrock` provider | Amazon Bedrock | Selected prompts, source files and tool results are sent to AWS Bedrock in the region you configure. The CLI always shows which provider is active. |
| Cloud IDE | Coaade Cloud | Your project, terminal and AI chat run on Coaade Cloud. |
| Your AI tool via Coaade MCP | Your tool's provider, and Coaade Cloud | Your tool's model reads the files and output it requests through MCP. The work itself runs on Coaade Cloud. |
| Model calls with an API key | Coaade Cloud | Prompts and answers are processed to answer the call and aren't stored or logged, unless you turn on private debugging for a key (below). |
## Model calls and private debugging [#model-calls-and-private-debugging]
For a model call made with an API key ([`POST /v1/chat/completions`](/docs/api/chat-completions)), Coaade keeps metadata only: the time, the key, the model, the status, the latency and the token counts. It doesn't store the prompt or the answer.
The one exception is [private debugging](/docs/api/private-debugging), off for every key until you turn it on for one key, for up to 7 days. Then:
- **What is stored:** each call's request body, its answer (a stream put back together, with tool calls) and its error, if any.
- **Where:** in Coaade's database, encrypted in the API to your own key pair. Its private half is encrypted with your encrypted-chats passphrase, in your browser, so Coaade can't read the records.
- **How long:** each record is deleted after 7 days, or sooner when you delete it. Deleted records can stay, still encrypted, in database backups until those backups expire.
- **Who can read it:** you, in the console, after unlocking with your passphrase. In a team, the owner and admins, and the member who made the key.
## Account security [#account-security]
- Passwords must pass a strength check (length, character classes, no common passwords). See [password rules](/docs/get-started/account#password-rules).
- Passwords are stored as hashes, never in plain text.
- Access tokens expire after 15 minutes; refresh tokens after 30 days.
- API keys (`coaade_sk_…`) are stored only as SHA-256 hashes. The full key is shown once, when you create it.
- The Cloud API is rate-limited to 100 requests per minute per signed-in user (or per IP address for anonymous calls).
## Cloud IDE safeguards [#cloud-ide-safeguards]
- **GitHub access** goes through the Coaade GitHub App. You choose which repositories it can use, and every push and pull uses a short-lived token for that one repository, revoked right after. No GitHub password or token is stored in your workspace.
- **AI changes are reviewable.** Without autonomous mode, you approve each change before it's made. Every AI change can be undone with one click.
- **Copilot CTO never acts alone.** Its proposals need your approval, and approved work happens on a separate `cto/` branch.
- **Sharing is role-based.** Viewers of a shared project can read and ask the AI, but never change files.
- **Security & Code review** flags hardcoded secrets in your code and misconfigurations on your live site, and the **AI pen test** probes your own app with safe, non-destructive requests. See [Security and pen testing](/docs/cloud-ide/security).
- **Connected AI apps** use Sign in with Coaade or API keys, either of which can be read-only and disconnected or revoked at any time. Every MCP tool call is audit-logged, and destructive tools are marked so your client asks first. See [Connect your AI](/docs/cloud-ide/connect-your-ai#permissions).
## CLI safeguards [#cli-safeguards]
- Edits show a diff and need approval; shell commands need separate approval. Plan mode is read-only.
- File tools refuse path traversal, symlinks, hard links, common credential paths, binary files and files over 256 KB.
- Provider credentials are removed from the environment of commands the agent runs.
- On macOS, `/sandbox on` blocks network access and writes outside the project for shell commands and hooks.
- Repository files can't turn on hooks or MCP servers. You configure them explicitly.
See [Permissions and sandbox](/docs/cli/permissions) for details.
## Reporting a security issue [#reporting-a-security-issue]
Email [contact@coaade.com](mailto:contact@coaade.com) with "Security" in the subject. Please don't open a public issue for vulnerabilities.
# How the products fit together (/docs/get-started/products)
All Coaade products share one **Coaade account**. Sign in once and the same plan, API keys and team seats apply in the browser, on the desktop and in the terminal.
## At a glance [#at-a-glance]
| Product | Runs | Best for | Docs |
| --- | --- | --- | --- |
| **Cloud IDE** | Browser (`ide.coaade.com`) and Coaade Cloud | Building and deploying web apps and APIs with an AI engineer | [Cloud IDE](/docs/cloud-ide) |
| **Coaade Code 2.0** | Inside the Cloud IDE | Writing, running and shipping code from natural language | [AI Chat](/docs/cloud-ide/ai-chat) |
| **Copilot CTO** | Coaade Cloud, per project | Daily code review, health checks and proposals you approve | [Copilot CTO](/docs/cloud-ide/copilot-cto) |
| **Desktop App** (Coaade Manager) | macOS, Windows, Linux | Local models, offline chat, managing keys and licenses | [Desktop App](/docs/desktop-app) |
| **Coaade CLI** | Your terminal | Agentic coding in your own repositories | [CLI](/docs/cli) |
| **Coaade Editor Context** | VS Code | Sharing the active file and selection with the CLI | [VS Code](/docs/cli/vscode) |
| **StrataFlow** | Your machine (CPU, optional GPU) | Running large Mixture-of-Experts models in bounded RAM | [StrataFlow](/docs/strataflow) |
| **Coaade Cloud API** | `api.coaade.com` | Integrating accounts, plans, keys and usage | [API Reference](/docs/api) |
| **Coaade MCP** | `api.coaade.com/mcp` | Letting ChatGPT, Claude, Claude Code, Kiro, Cursor or VS Code work on your Coaade projects | [Connect your AI](/docs/cloud-ide/connect-your-ai) |
## How they connect [#how-they-connect]
```text
┌──────────────────────────── Coaade account ────────────────────────────┐
│ one sign-in · one plan · API keys · team seats · usage │
└───────────────┬─────────────────────┬──────────────────────┬───────────┘
│ │ │
┌─────────▼────────┐ ┌────────▼────────┐ ┌────────▼────────┐
│ Cloud IDE │ │ Desktop App │ │ Coaade CLI │
│ ide.coaade.com │ │ (Coaade Manager)│◄───┤ coaade ... │
│ Coaade Code 2.0 │ │ local models │ │ reuses session │
│ Copilot CTO │ │ local HTTP API │ └────────▲────────┘
└─────────┬────────┘ └────────┬────────┘ │
│ │ ┌────────┴────────┐
deploys to *.coaade.app runs models with │ VS Code Editor │
or your own domain the Coaade engine │ Context ext. │
└─────────────────┘
```
- The **Desktop App** owns your local account session and model runtime. The **CLI** reuses that session, so signing in to one signs in the other.
- The **Cloud IDE** runs entirely in the browser. Nothing needs to be installed.
- **StrataFlow** is the inference engine for very large models on everyday hardware.
## Which one should I start with? [#which-one-should-i-start-with]
Start with the [Cloud IDE quickstart](/docs/get-started/quickstart). You get an AI engineer, a terminal, a database and hosting in one browser tab.
Install the [Coaade CLI](/docs/cli/installation) and, if you use VS Code, the [Editor Context extension](/docs/cli/vscode).
Install the [Desktop App](/docs/desktop-app/installation) and add a model from the Models page.
Read [StrataFlow: how it works](/docs/strataflow/how-it-works), then follow the [StrataFlow quickstart](/docs/strataflow/quickstart).
[Connect your AI tool](/docs/cloud-ide/connect-your-ai) to Coaade's MCP server. Its AI can then build, deploy and test your Coaade projects.
Go to the [Cloud API reference](/docs/api).
# Quickstart (/docs/get-started/quickstart)
This guide takes about five minutes. You need a modern browser and an email address. Nothing has to be installed.
### Create your Coaade account [#create-your-coaade-account]
Go to [coaade.com/signup](https://www.coaade.com/signup) and enter your email and a password. Passwords need at least 10 characters with a lowercase letter, an uppercase letter, a number and a symbol. See [Accounts](/docs/get-started/account) for the full rules.
Coaade emails you a verification code. Enter it to verify your email; you can't sign in until it's verified.
### Open the Cloud IDE [#open-the-cloud-ide]
Go to [ide.coaade.com](https://ide.coaade.com) and sign in with the same account. Your dashboard lists your projects and shows your plan's usage.
### Create a project [#create-a-project]
Click **New Project**, give it a name and choose how to start:
| Source | Use it for |
| --- | --- |
| **Blank project** | Starting from an empty folder |
| **Import from GitHub** | Bringing in one of your repositories and a branch |
| **Upload from computer** | Files or a whole folder from your machine |
There are no language templates to pick. The IDE detects the stack from your files, and the preview and deploys adapt to it.
The project opens with the file explorer on the left, the editor in the middle and the AI chat on the right.
### Ask Coaade Code to build something [#ask-coaade-code-to-build-something]
In the AI chat, describe what you want in plain words:
```text
Build a pricing page with three plans and a monthly/yearly toggle.
Use the existing styles and make it responsive.
```
Coaade Code reads your project, creates and edits files, installs packages and runs commands to check its work. On the Free plan you approve each change; on paid plans you can let it work through the task on its own. See [AI Chat](/docs/cloud-ide/ai-chat).
The **Preview** tab renders HTML, React, JSX and TypeScript as you go.
### Deploy [#deploy]
Click **Deploy**, or type `/deploy` in the chat. Static sites and React/Vite apps build and go live at `your-project.coaade.app` with HTTPS. Deploying again updates the site.
Server apps (Express, Fastify, Flask and others) and custom domains need a Pro plan or higher. See [Deploy](/docs/cloud-ide/deploy).
## Next steps [#next-steps]
Link a repository and push and pull from the IDE.
PostgreSQL, MongoDB or Redis, connected to your app automatically.
Daily reviews and proposals for your project (Pro and above).
Bring the same kind of help to repositories on your own machine.
# Support (/docs/get-started/support)
## Support by plan [#support-by-plan]
| Plan | Support |
| --- | --- |
| Free | Community support |
| Pro | Priority email support |
| Team | Dedicated support with an SLA |
| Enterprise | Dedicated account manager |
## Contact [#contact]
| For | Contact |
| --- | --- |
| Account, billing and general questions | [contact@coaade.com](mailto:contact@coaade.com) |
| Enterprise plans and commercial licensing | [company@coaade.com](mailto:company@coaade.com) |
| Contact form | [coaade.com/contact](https://www.coaade.com/contact) |
## Report a bug in the Cloud IDE [#report-a-bug-in-the-cloud-ide]
Use the feedback option in the IDE. It attaches the project and page you were on, which helps the team reproduce the problem.
## When you email us [#when-you-email-us]
Include:
- Your account email (never your password)
- The product and version (for the Desktop App, see **Updates**; for the CLI, run `coaade --version`)
- What you did, what you expected and what happened
- For the CLI, the output of `coaade doctor`
## Follow Coaade [#follow-coaade]
- [X (Twitter)](https://x.com/CoaadeInc)
- [LinkedIn](https://www.linkedin.com/company/coaade/)
- [GitHub](https://github.com/Coaade-Inc)
- [Blog](https://www.coaade.com/blog)
# Coaade Documentation (/docs)
Coaade builds specialized, local-first AI: compact domain-expert models that run on your own hardware, and the tools to build software with them. These docs cover every Coaade product.
## Start here [#start-here]
} title="Quickstart" href="/docs/get-started/quickstart">
Create an account, open the Cloud IDE, build an app with Coaade Code and deploy it, in about five minutes.
} title="How the products fit together" href="/docs/get-started/products">
What each product does, where it runs and which one to pick.
## Products [#products]
} title="Cloud IDE" href="/docs/cloud-ide">
A browser IDE with a real Linux terminal, live preview, Git, databases and one-click deploys.
} title="Coaade Code & Copilot CTO" href="/docs/cloud-ide/ai-chat">
The AI engineer inside the IDE, and the AI CTO that reviews your project every day.
} title="Desktop App" href="/docs/desktop-app">
Coaade Manager: local models, offline chat, extensions, API keys and team licenses.
} title="Coaade CLI" href="/docs/cli">
A coding agent for your terminal, with permissions, checkpoints, MCP and VS Code context.
} title="StrataFlow" href="/docs/strataflow">
Run very large Mixture-of-Experts models in bounded RAM by streaming experts from disk.
} title="Models" href="/docs/models">
Coaade Code and Coaade Mind: what they are, their status and the hardware they target.
} title="Connect your AI (MCP)" href="/docs/cloud-ide/connect-your-ai">
Let ChatGPT, Claude, Claude Code, Kiro, Cursor or VS Code work on your Coaade projects.
} title="Cloud API reference" href="/docs/api">
REST endpoints for authentication, accounts, subscriptions, API keys and usage.
## Get help [#get-help]
- Questions about your account or billing: [contact@coaade.com](mailto:contact@coaade.com)
- Enterprise and commercial licensing: [Talk to sales](mailto:company@coaade.com)
- Something in the docs is wrong or missing: use **Edit on GitHub** at the bottom of any page.
# Coaade Code (/docs/models/coaade-code)
Coaade Code is the model line for software engineering. It's built to run offline on a laptop and to work as an agent, not just autocomplete.
## Versions [#versions]
| | Coaade Code 1.0 | Coaade Code 2.0 |
| --- | --- | --- |
| Status | Trained | In development |
| Parameters | 0.5B | 7.4B total, about 2B active per token |
| Architecture | Fine-tuned Qwen 2.5 Coder | Transformer with Mixture-of-Experts and Multi-head Latent Attention |
| Context window | — | 64,000 tokens |
| Vocabulary | — | Custom 160K-token, code-optimized |
| Modes | Chat | Chat and Agent |
| Size on disk | 374 MB | About 4 GB at Q4_K_M |
| Target hardware | Any laptop | Laptops with 8 GB+ RAM |
## Coaade Code 1.0 [#coaade-code-10]
A compact chat model for everyday coding help: **explain, debug, refactor, test and optimize**. It runs at about 71 tokens per second in 374 MB.
## Coaade Code 2.0 [#coaade-code-20]
The first flagship model. The goals:
- **Agent mode.** Read files, edit code, run commands, search the codebase and carry out multi-step workflows, locally.
- **Reasoning.** Trained to think through problems step by step.
- **Code that works.** Reinforcement learning rewards code that actually runs and passes tests.
- **Self-verification.** The model checks its own work before answering.
- **Long context.** 64K tokens, about 1,600 lines of code, enough for several files or a whole module.
- **Fast local inference.** Speculative decoding for quicker responses.
Supported modes:
| Mode | Does |
| --- | --- |
| **Chat** | Explain, debug, refactor, test, optimize |
| **Agent** | Read files, edit code, run commands, search the codebase, multi-step work |
## In the Cloud IDE [#in-the-cloud-ide]
The Cloud IDE's AI engineer is branded **Coaade Code 2.0**. It works through structured tool calls to create files, run commands and deploy. See [AI Chat](/docs/cloud-ide/ai-chat).
## Skill packs [#skill-packs]
Skill packs add domain knowledge, such as a framework or a language, to a Coaade Code model without retraining it. Install them as [extensions](/docs/desktop-app/extensions) in the Desktop App.
## Privacy [#privacy]
When you run Coaade Code locally, it works fully offline. Your code stays on your device, and there are no API costs after download.
# Coaade Mind (/docs/models/coaade-mind)
Coaade Mind 1.0 is in planning. Specifications may change before release. Follow
[coaade.com](https://www.coaade.com/products/models/coaade-mind) for the release date.
Coaade Mind is a separate line from Coaade Code. Coaade Code is a specialist software engineer; Coaade Mind is a **personal intelligence** that lives on your own devices, from phone to desktop.
## At a glance [#at-a-glance]
| | |
| --- | --- |
| Parameters | 1.5B, with a possible later Mixture-of-Experts stage of about 3B total |
| Context window | 1,000,000 tokens |
| Runs on | Apple, Windows and Ubuntu devices, phone to desktop, through [StrataFlow](/docs/strataflow) |
| Works | Fully on-device and offline |
## What it's designed to do [#what-its-designed-to-do]
- **Call tools.** Native function calling with full MCP-client support, parallel and sequential calls, agentic think-act-observe loops and recovery from errors. It doesn't just suggest what to do; it does it.
- **Decide.** Frame the problem, lay out the options, score them against criteria and commit to a recommendation, with the trade-offs stated.
- **Know your company.** Connect Notion, Gmail, Calendar, Slack, Drive, your CRM and databases, and reason across them in its million-token context.
- **Answer visually.** When a widget beats text, it returns a safe declarative UI spec that your device renders into a live chart, sortable table, decision tree, form, map or dashboard.
- **Learn from you, privately.** It personalizes to your habits, voice and corrections from your feedback, and none of it leaves your device.
Core domains are personal intelligence, finance, marketing and copywriting, on top of broad general knowledge.
## Hardware targets [#hardware-targets]
| Platform | Acceleration |
| --- | --- |
| macOS | Metal / MLX with unified memory |
| Windows | CUDA for NVIDIA GPUs, with a DirectML fallback |
| Linux | CUDA, ROCm for AMD, or CPU for headless servers |
# Models overview (/docs/models)
Coaade builds **specialized** models instead of one general model: each line is an expert in its domain and small enough to run on hardware you already own.
| Model line | Purpose | Status |
| --- | --- | --- |
| [**Coaade Code**](/docs/models/coaade-code) | Software engineering: chat and agentic coding | 1.0 trained; 2.0 in development |
| [**Coaade Mind**](/docs/models/coaade-mind) | On-device personal intelligence: tool calling, decisions, your data | Planned |
## Where models run [#where-models-run]
| Where | How |
| --- | --- |
| **Cloud IDE** | AI Chat runs Coaade Code 2.0 on Coaade Cloud. Paid plans can choose other models. |
| **Desktop App** | Install a model on the **Models** page and chat offline. |
| **CLI** | Use a local model through the `manager` provider. |
| **StrataFlow** | Run large Mixture-of-Experts models in bounded RAM. Coaade Mind is designed to run on it. |
| **Coaade Cloud** | Deploy models on private, dedicated infrastructure for your team. Speed depends on plan: normal inference on Pro, fast on Team, real-time on Enterprise. |
## Why small, specialized models [#why-small-specialized-models]
- **They run locally.** No per-token fees, no data leaving your device, and they work offline.
- **They're fast.** Small models answer quickly on ordinary laptops.
- **They're good where it matters.** Training focuses on one domain instead of everything.
- **They're efficient.** Mixture-of-Experts designs use only a fraction of their weights per token.
## The model registry [#the-model-registry]
The list of currently available models, with sizes and hardware requirements, is public:
```bash
curl https://api.coaade.com/v1/models/registry
```
See [Models and skills](/docs/api/models-and-skills).
# Build from source (/docs/strataflow/building)
## Requirements [#requirements]
- CMake 3.20 or newer
- A C++20 compiler: GCC 11+, Clang 14+ or MSVC 2022
- Ninja
- Git (for the vendored llama.cpp/ggml submodule)
## Build [#build]
```bash
git clone https://github.com/Coaade-Inc/strataflow.git
cd strataflow
git submodule update --init --recursive
cmake --preset release
cmake --build build/release
```
The first build compiles llama.cpp and ggml and takes a few minutes. The tools are written to `build/release/bin/`:
| Binary | Purpose |
| --- | --- |
| `strataflow` | Run a model |
| `strata-pack` | Convert a GGUF file to `.strata` |
## Presets [#presets]
| Preset | Use it for |
| --- | --- |
| `debug` | Development. Warnings are errors. |
| `release` | Optimized CPU build |
| `clang` | Build with Clang |
| `release-cuda`, `debug-gpu-cuda` | NVIDIA GPUs |
| `release-metal`, `debug-gpu-metal` | Apple GPUs |
| `release-vulkan`, `debug-gpu-vulkan` | Vulkan GPUs |
GPU builds can also be selected with one option: `-DSTRATAFLOW_GPU=cuda|metal|vulkan` (default `off`). HIP/ROCm has a lower-level `-DSTRATAFLOW_HIP=ON` toggle.
A GPU build only uses the GPU when you also pass `--device` and a GPU is present; otherwise it falls back to the
CPU. Full GPU-accelerated execution is still on the roadmap. See [Status](/docs/strataflow/status).
## Run the tests [#run-the-tests]
```bash
cmake --preset debug
cmake --build build/debug
ctest --preset debug
```
CI builds and tests on Linux (GCC and Clang), macOS and Windows (MSVC).
## Contributing [#contributing]
- Branch from `main` and open a pull request into `main`; CI must pass on all platforms.
- Keep the build warning-free on GCC, Clang and MSVC.
- Greedy generation must stay deterministic.
- Add a test for new engine logic and format with the repository's `.clang-format`.
Contributions are licensed to Coaade Inc. under the same [license](/docs/strataflow/license).
# C API (/docs/strataflow/c-api)
StrataFlow exposes a stable C ABI in `include/strataflow/strataflow.h`. The CLI uses it, and so can your application or a language binding. Everything below the API (the weight store, scheduler and predictor) is private C++.
## Example [#example]
```c title="generate.c"
#include
#include
static int on_token(const char *text, void *user_data) {
(void)user_data;
fputs(text, stdout);
fflush(stdout);
return 0; /* return non-zero to stop early */
}
int main(void) {
sf_context_params cp = sf_context_default_params();
cp.model_path = "/models/mixtral.strata";
cp.cache_budget = 4ull << 30; /* at most 4 GiB of resident experts */
sf_context *ctx = NULL;
sf_status st = sf_context_create(&cp, &ctx);
if (st != SF_OK) {
fprintf(stderr, "load failed: %s\n", sf_status_str(st));
return 1;
}
sf_session *session = NULL;
sf_session_create(ctx, &session);
sf_sampling_params sp = sf_sampling_default_params();
sp.temperature = 0.0f; /* greedy */
sp.max_tokens = 64;
st = sf_generate(session, "The city of", &sp, on_token, NULL);
sf_runtime_stats stats;
if (sf_session_stats(session, &stats) == SF_OK) { /* inspect memory and timing */ }
sf_session_free(session);
sf_context_free(ctx);
return st == SF_OK ? 0 : 1;
}
```
## Lifecycle [#lifecycle]
| Function | Purpose |
| --- | --- |
| `sf_context_default_params()` | Safe defaults: automatic planning, CPU backend |
| `sf_context_create(params, &ctx)` | Create an engine and load a model. On failure `ctx` stays `NULL`. |
| `sf_session_create(ctx, &session)` | Open a session, which owns a KV cache (one conversation) |
| `sf_generate(session, prompt, sampling, cb, user_data)` | Generate a completion, streaming UTF-8 pieces to `cb`. Blocks until done. |
| `sf_session_stats(session, &stats)` | Runtime statistics |
| `sf_describe_plan(ctx, buf, size)` | Write the placement plan as text |
| `sf_session_free`, `sf_context_free` | Release resources |
| `sf_version()`, `sf_status_str(status)` | Version string and error messages |
## Context parameters [#context-parameters]
`expert_slots` and `async_prefetch` are applied through process-wide settings read when a context is created. Don't
create contexts with different values for them from several threads at once; create them one after another.
## Sampling parameters [#sampling-parameters]
## Status codes [#status-codes]
| Code | Value | Meaning |
| --- | --- | --- |
| `SF_OK` | 0 | Success |
| `SF_ERR_INVALID_ARGUMENT` | 1 | A parameter is invalid |
| `SF_ERR_FILE_NOT_FOUND` | 2 | The model file doesn't exist |
| `SF_ERR_UNSUPPORTED` | 3 | The feature or model isn't supported yet |
| `SF_ERR_OUT_OF_MEMORY` | 4 | Not enough memory |
| `SF_ERR_IO` | 5 | A read failed |
| `SF_ERR_MODEL_LOAD` | 6 | The model couldn't be loaded |
| `SF_ERR_RUNTIME` | 7 | A runtime error, including a target RAM ceiling that can't be met |
## Linking [#linking]
Build StrataFlow as a shared library by defining `STRATAFLOW_SHARED`; the header exports symbols with the right visibility on Windows, Linux and macOS.
# CLI reference (/docs/strataflow/cli-reference)
## strataflow [#strataflow]
```text
strataflow --model [options] [-- ]
```
| Option | Description |
| --- | --- |
| `--model PATH` | Model file (`.gguf` or `.strata`). **Required.** |
| `--prompt TEXT` | Prompt text. You can also pass it after `--`. |
| `--max-tokens N` | Generation cap (default 64) |
| `--vram-gb X` | VRAM budget in GiB (0 = auto) |
| `--ram-gb X` | RAM budget in GiB (0 = auto) |
| `--cache-gb X` | Cap resident expert RAM to X GiB (0 = auto from free RAM) |
| `--expert-slots N` | Hold N expert bundles (0 = auto). Fewer than the model's expert count forces bounded streaming. |
| `--target-ram-gb X` | Fit the projected peak within X GiB, or refuse and name the achievable floor. Overrides `--ram-mode`. |
| `--ram-mode auto\|max` | `auto` (default) leaves headroom for other apps; `max` dedicates the machine |
| `--max-performance` | Alias for `--ram-mode max` |
| `--device cpu\|cuda\|metal\|vulkan\|hip` | Preferred compute backend (default `cpu`). Uses a GPU only on a GPU build with a GPU present; otherwise falls back to CPU. |
| `--async-prefetch on\|off` | Overlap the next layer's expert reads with compute (default `on`) |
| `--plan` | Print the placement plan and exit |
| `--version` | Print the version and exit |
| `-h, --help` | Show help |
### Environment variables [#environment-variables]
| Variable | Effect |
| --- | --- |
| `STRATAFLOW_ENGINE_KV_WINDOW` | Bound the KV cache to this many columns. See [Memory tuning](/docs/strataflow/memory-tuning#the-kv-window). |
### Output [#output]
| Line | Contents |
| --- | --- |
| `plan:` | The placement plan, including `compute=` |
| `prompt:` / `output:` | Your prompt and the streamed generation |
| `stats:` | Resident model weights, peak RSS, time to first token (TTFT) and the bytes streamed from disk |
Errors are printed to standard error and return a nonzero exit code.
## strata-pack [#strata-pack]
```text
strata-pack [--compress ]
```
Converts a GGUF checkpoint into the `.strata` format, with verbatim weight bytes and aligned expert blobs.
| Option | Description |
| --- | --- |
| `--compress none` | Store expert blobs verbatim (default). Byte-for-byte identical to earlier packers. |
| `--compress lz` | Compress each expert bundle with the built-in lossless LZ codec |
`--compress` can appear before or after the file arguments.
# Run on Google Colab (/docs/strataflow/colab)
The repository includes a Colab flow that proves the "big model, bounded RAM, no GPU" path on a real machine. It lives in [`colab/`](https://github.com/Coaade-Inc/strataflow/tree/main/colab).
## Before you start [#before-you-start]
- Use a **CPU runtime** (Runtime → Change runtime type → CPU). StrataFlow's engine runs on the CPU; a GPU runtime isn't used.
- The first build compiles llama.cpp and ggml, which takes a few minutes.
- Free Colab has about **12 GB RAM** and **70 to 100 GB** of temporary disk. Disk, not RAM, is the limit: the model and its packed `.strata` copy both need to fit.
## Two flows [#two-flows]
| Flow | What it does |
| --- | --- |
| **Generated demo** (default) | Generates a larger-than-toy F32 MoE and streams it. Needs no download. |
| **Real model** (`--real-model`) | Downloads a real quantized GGUF from Hugging Face, packs it to `.strata`, runs it bounded and records the output, tokens per second and peak RSS. |
```bash
# Generated demo
python3 colab/strataflow_colab.py --layers 24 --experts 32 --max-tokens 16
# A real quantized MoE
python3 colab/strataflow_colab.py --real-model --is-moe
```
The script prints the placement plan, runs the model with a bounded `--expert-slots`, and reports the results.
## Benchmarks [#benchmarks]
`colab/strataflow_bench.py` runs a matrix of configurations and reports tokens per second, time to first token, peak RSS, resident weights, on-disk size and bytes read per token, with JSON and CSV output.
## What to expect [#what-to-expect]
A real Mixtral-8x7B-Instruct Q3_K_M (about 19 GB on disk) has run end to end on a free Colab CPU box with coherent output. On the free tier, throughput is limited by disk reads; automatic expert residency and async prefetch target exactly that, and settled throughput numbers are still being measured.
# How it works (/docs/strataflow/how-it-works)
## Strata of memory [#strata-of-memory]
Model weights live in *strata*, layers of memory, and *flow* between them on demand:
```text
VRAM (fastest, smallest) <- hot experts, trunk, KV cache
^v
RAM (fast, medium) <- warm experts, resident trunk
^v
SSD (large, slowest) <- the full model; cold experts stream in per token
```
## Why a big MoE model fits in small RAM [#why-a-big-moe-model-fits-in-small-ram]
A Mixture-of-Experts layer has many **experts**, and a **router** that picks a few of them (the top-k) for each token. Everything else in that layer goes unused for that token.
So for each token, RAM only needs:
1. The **trunk**: embeddings, attention and other always-used weights
2. The **top-k experts** of the current layer
3. The **KV cache** for the conversation
The rest of the model only has to be **reachable on disk**.
## Per-expert streaming [#per-expert-streaming]
For each layer, StrataFlow:
1. Runs the layer's router.
2. Reads back which experts it chose.
3. Makes only those experts resident, loading any that aren't cached.
4. Runs the expert computation.
Experts live in a bounded **slot pool** with least-recently-used eviction. One slot holds one *expert bundle*: the gate, up and down weights for one expert in one layer. With fewer slots than experts, StrataFlow streams; with enough slots for the whole working set, nothing is evicted.
Because the computation is the same either way, the output is **byte-identical** whether the model is fully resident or tightly bounded.
## Prefetching [#prefetching]
The router's choices feed a **predictor** that guesses the next layer's experts. A background I/O thread loads them while the current layer computes, hiding disk latency. A wrong guess is just a cache miss, corrected by the normal synchronous load, so prefetching never changes the output. It's on by default (`--async-prefetch on`).
## The `.strata` format [#the-strata-format]
`strata-pack` converts a GGUF file into `.strata`, a single file laid out for streaming:
- The trunk is stored together, so it can be loaded once and kept resident.
- Each expert bundle is an aligned blob, so it can be read with one direct I/O call.
- Weight bytes are copied **verbatim**: no re-quantization.
- Optional lossless per-expert compression (`--compress lz`).
Loading a `.strata` file holds only the trunk in RAM; the full expert footprint is never allocated. Older Mixtral GGUFs that store experts one tensor per expert are regrouped automatically.
## The placement planner [#the-placement-planner]
On load, StrataFlow profiles your hardware (cores, free RAM, VRAM, SSD speed) and plans where everything goes:
- How many expert slots to keep resident, from free RAM and the model's expert layout
- How large a KV window to keep
- Whether to stream parts of the trunk
- What to place in VRAM, when a GPU is present
Print the plan without running the model:
```bash
./bin/strataflow --model model.strata --plan
```
See [Memory tuning](/docs/strataflow/memory-tuning) to override it.
# StrataFlow overview (/docs/strataflow)
**StrataFlow** runs very large Mixture-of-Experts (MoE) models, quantized or full-precision, on everyday hardware **without a GPU**, in a **bounded RAM budget**. The full model stays on your SSD; only the parts each token needs are held in memory.
It's a Coaade Inc. project, [source-available on GitHub](https://github.com/Coaade-Inc/strataflow) and free for personal, non-commercial use.
## Why it exists [#why-it-exists]
An MoE model is huge on disk but uses only a small slice of its weights for each token. StrataFlow keeps the always-used **trunk** and the currently active **experts** in memory and streams the rest from disk on demand. A model far bigger than your RAM can then run on a normal laptop or desktop CPU.
**More memory buys speed, not capability.** The output is identical at every memory size.
## What makes it different [#what-makes-it-different]
- **Its own forward pass over ggml.** StrataFlow builds and runs the compute graph itself, so it decides exactly which weights are in memory and when. It isn't a wrapper around another engine.
- **One tiered weight store** across VRAM, RAM and SSD, with one caching policy.
- **True per-expert streaming.** Each layer's router runs first; only the top-k experts it picks are loaded before the expert computation.
- **Automatic tuning.** It sizes the expert cache from your free RAM and the model's layout. No hand-tuning needed.
- **Prefetching.** A predictor warms the next layer's likely experts on a background I/O thread while the current layer computes.
- **Byte-identical output.** Bounded streaming decodes the same tokens as running the whole model in memory.
## Proof points [#proof-points]
- A real **Mixtral-8x7B-Instruct Q3_K_M** (about 19 GB on disk) runs end to end on a free Colab CPU machine with **12 GB RAM and no GPU**, with coherent output.
- Peak process memory stays flat as models grow: a 785 MiB and a 1,177 MiB model both run in about **132 MiB** peak RSS.
## Supported today [#supported-today]
| | Supported |
| --- | --- |
| Architectures | llama-arch Mixture-of-Experts (such as Mixtral), dense llama |
| Weight types | F32/F16; Q8_0, Q4_K and Q6_K validated; others run unvalidated |
| Model files | `.gguf`, and the streaming-friendly `.strata` format |
| Platforms | Linux (GCC, Clang), macOS, Windows (MSVC) |
| Compute | CPU. GPU backends can be compiled in; see [Status](/docs/strataflow/status). |
## Next [#next]
# License (/docs/strataflow/license)
StrataFlow is **source-available** under the **Coaade Source-Available License, Version 1.0**. Read the full text in [`LICENSE`](https://github.com/Coaade-Inc/strataflow/blob/main/LICENSE).
## In short [#in-short]
| You may | You may not |
| --- | --- |
| Read, learn from, run and modify StrataFlow for **personal, non-commercial** use | Use it commercially |
| | Resell, rebrand or white-label it |
| | Host it as a service |
| | Build a competing product on it |
- It is **not** an OSI open-source license.
- It does **not** convert to Apache, MIT or another license over time.
- Companies, teams and organizations need a separate **commercial license**, including for internal use.
**To use StrataFlow commercially, contact [contact@coaade.com](mailto:contact@coaade.com).**
## Third-party code [#third-party-code]
StrataFlow is built on [llama.cpp and ggml](https://github.com/ggml-org/llama.cpp), which remain under their own MIT license. See [`NOTICE`](https://github.com/Coaade-Inc/strataflow/blob/main/NOTICE).
## Model weights [#model-weights]
The repository contains no model weights. Models you run with StrataFlow are covered by their own licenses.
This summary is for convenience. The `LICENSE` file is the binding text.
# Memory tuning (/docs/strataflow/memory-tuning)
By default StrataFlow plans memory for you and leaves room for other apps. These options let you change that.
## The options [#the-options]
| Option | Effect |
| --- | --- |
| `--ram-mode auto` | **Default.** A conservative share of RAM that leaves headroom for other apps. |
| `--ram-mode max` | Dedicate the machine: use all RAM and the VRAM placement budget, keep the full KV window, the largest expert cache and the whole trunk resident. Fastest, leaves no headroom. |
| `--max-performance` | Same as `--ram-mode max`. |
| `--target-ram-gb X` | Fit the projected peak under X GiB using every lever (KV window, expert cache, trunk streaming, VRAM placement). If it can't, it **refuses** and names the smallest achievable size. Overrides `--ram-mode`. |
| `--cache-gb X` | Cap the RAM used for resident experts at X GiB. Only lowers the automatic choice. |
| `--expert-slots N` | Hold exactly N expert bundles. Fewer than the model's expert count forces bounded streaming. |
| `--ram-gb X`, `--vram-gb X` | RAM and VRAM budgets in GiB (0 = automatic). |
| `--async-prefetch on\|off` | Overlap expert reads with compute (default `on`). Output is identical either way. |
## Precedence [#precedence]
When options overlap, the most specific one wins:
1. Manual levers: `--expert-slots`, `--cache-gb`, and the `STRATAFLOW_ENGINE_KV_WINDOW` environment variable
2. `--target-ram-gb`
3. `--ram-mode max`
4. `--ram-mode auto` (default)
Among the expert levers: `--expert-slots` > `--cache-gb` > automatic from free RAM.
## How the automatic expert cache is sized [#how-the-automatic-expert-cache-is-sized]
StrataFlow measures free RAM and reads the model's expert layout (layers, experts per layer, experts used per token, bytes per expert). It then keeps as many expert bundles as fit:
- If RAM holds the whole working set, it caches all of it and never re-streams.
- If not, it bounds the cache, but never below one layer's top-k experts.
No model-specific constants are involved, so it adapts to any MoE shape.
## The KV window [#the-kv-window]
`STRATAFLOW_ENGINE_KV_WINDOW` bounds the KV cache to a number of columns. The KV store grows on demand up to that window instead of allocating the full context up front. For example, on Mixtral a 512-column window cuts the resident KV from 8 GiB to 128 MiB, with byte-identical output for short generations.
```bash
STRATAFLOW_ENGINE_KV_WINDOW=512 ./bin/strataflow --model mixtral.strata --prompt "The city of"
```
## Recipes [#recipes]
```bash
# A laptop you're also using for other work: the defaults
./bin/strataflow --model m.strata --prompt "..."
# A machine dedicated to inference
./bin/strataflow --model m.strata --max-performance --prompt "..."
# A hard ceiling, for example in a container with an 8 GiB limit
./bin/strataflow --model m.strata --target-ram-gb 8 --prompt "..."
# Stress-test streaming with very few experts resident
./bin/strataflow --model m.strata --expert-slots 4 --prompt "..."
```
## What memory buys you [#what-memory-buys-you]
More memory means fewer disk reads per token, so it's faster. It doesn't change the output: decoding with few expert slots produces the same tokens as decoding with the whole model in memory. When RAM is tight, a fast NVMe SSD helps most.
# Quickstart (/docs/strataflow/quickstart)
This guide runs a model with StrataFlow and reads its memory report. You need a [StrataFlow build](/docs/strataflow/building) and a GGUF model of a [supported architecture](/docs/strataflow#supported-today): llama-arch MoE (such as Mixtral) or dense llama.
Qwen2-MoE and DeepSeek-MoE use different architectures that StrataFlow doesn't support yet. Don't point it at them.
### Pack the model [#pack-the-model]
Convert the GGUF file into the streaming-friendly `.strata` format:
```bash
cd build/release
./bin/strata-pack /models/mixtral-8x7b-instruct.Q3_K_M.gguf /models/mixtral.strata
```
The `.strata` file is about the same size as the GGUF, so make sure you have the disk space. Add `--compress lz` for optional lossless compression of the expert blobs.
### Look at the plan [#look-at-the-plan]
```bash
./bin/strataflow --model /models/mixtral.strata --plan
```
The `plan:` line shows how StrataFlow will place the model on your machine: the number of expert slots, whether experts stream or stay resident, the compute backend and the projected peak memory.
### Run it [#run-it]
```bash
./bin/strataflow --model /models/mixtral.strata --max-tokens 64 --prompt "The city of"
```
You can also pass the prompt after `--`:
```bash
./bin/strataflow --model /models/mixtral.strata -- "Write a haiku about disks"
```
StrataFlow prints the prompt, then streams the output.
### Read the stats [#read-the-stats]
After generation, a `stats:` line reports:
- **resident model weights**: how much of the model was in memory
- **peak RSS**: the process's peak memory
- **TTFT**: time to first token
- **streamed**: how much was read from disk while streaming experts
## Run in less memory [#run-in-less-memory]
Cap the RAM used for experts, or set a ceiling for the whole process:
```bash
# Keep at most 4 GiB of experts resident
./bin/strataflow --model /models/mixtral.strata --cache-gb 4 --prompt "Hello"
# Fit the whole run under 8 GiB, or fail with the smallest achievable size
./bin/strataflow --model /models/mixtral.strata --target-ram-gb 8 --prompt "Hello"
```
See [Memory tuning](/docs/strataflow/memory-tuning) for every option.
## Run a GGUF directly [#run-a-gguf-directly]
`strataflow` also loads `.gguf` files. Packing to `.strata` is what gives you bounded RAM: with `.strata`, only the trunk is held in memory and experts stream from disk.
# Status and roadmap (/docs/strataflow/status)
StrataFlow hasn't cut a versioned release yet; current work is on `main`. The repository's [`ROADMAP.md`](https://github.com/Coaade-Inc/strataflow/blob/main/docs/ROADMAP.md) and [`CHANGELOG.md`](https://github.com/Coaade-Inc/strataflow/blob/main/CHANGELOG.md) are the source of truth.
## Done [#done]
- Its own forward pass for llama-arch MoE and dense llama, built from ggml operations and checked against a reference
- Engine-owned KV cache and multi-token decoding
- Bounded per-expert streaming with byte-identical output
- The `.strata` single-file loader, holding only the trunk resident
- Predictor-driven prefetch, and async prefetch overlapping disk reads with compute (on by default)
- Quantized weights: Q8_0, Q4_K and Q6_K validated
- Older per-expert Mixtral GGUF layouts packed automatically
- RAM-aware automatic expert residency, the `--cache-gb` and `--target-ram-gb` dials, and RAM modes
- Flat peak memory: staging is capped to one layer
- A benchmark harness with measured results
- Real models end to end on Colab: TinyLlama-1.1B Q4_K_M (dense) and Mixtral-8x7B Q3_K_M (MoE, about 19 GB)
## In progress and next [#in-progress-and-next]
| Area | Status |
| --- | --- |
| Large-MoE throughput | Runs end to end; settled tokens-per-second numbers on real hardware are being measured |
| Quantization coverage | The IQ families aren't validated yet |
| Architectures | Qwen2-MoE and DeepSeek-MoE aren't implemented |
| GPU execution | The planner budgets VRAM and GPU backends compile, but accelerated execution needs validation on real GPUs. The engine runs on the CPU. |
| Release | No release tag yet, and no HTTP server; only the CLI is wired to the engine |
| Later phases | Speculative decoding and low-bit CPU kernels haven't started |