Create an Agent Access Token
An Agent Access token lets a client work with your canvases without your browser session. Each token is named, scoped and revocable on its own.
In the Gavana interface these are called Personal Access Tokens. “Agent Access token” is the same credential: the name used by the API, the CLI and these docs. They live in Settings → Connect an agent → Developer.
When you need one
You do not need a token for:
- Claude, ChatGPT, Cursor, VS Code, Codex, or any other MCP client that signs in through the browser. Those connect to the hosted MCP server with OAuth.
- Interactive CLI use.
gavana auth loginopens a browser and stores a revocable credential for you, and the local MCP server can reuse that login.
You do need one for:
- A local MCP server on a machine where the CLI login isn’t available to it, for example a desktop app that cannot read the CLI’s Keychain entry.
- Unattended automation: CI, a cron job, a backend service.
- Direct Canvas API calls from your own code.
Before you start
- Sign in at app.gavana.ai as the account whose canvases the client should reach. A token acts as that account.
- An account can hold at most 20 active tokens, and browser sign-ins from MCP clients count toward that limit.
The whole flow
Watch it once from Settings to a token copied into your app, or click a step under the replay to jump to it.
6 stepsFrom Settings to a token copied into your app
Open Connect an agent
Open Settings with the gear button in the sidebar footer. Under You, click Connect an agent.
You can also go straight to app.gavana.ai/settings/access-tokens?legacy=1 , which opens the page on the Developer tab.
Open the Developer tab
The page has three tabs: Connect an app, Connected, and Developer. Click Developer.
The tab starts with the Gavana CLI install commands. Scroll past them to Personal access tokens.
Name the device
Under New token, replace This device in the Device field with the app and the computer this token is for. Use one token per app per machine:
Claude Code · MacBook Air
Claude Desktop · Studio iMac
Codex · CI runner
Cursor · work laptopThe name is not decoration. Gavana records it on the canvas changes the token makes, so later you can tell which client did what. Names can be up to 80 characters.
Check expiry and permissions
Expires is Never by default: the token works until you revoke it. Choose Custom expiry for a temporary or less trusted device and enter 1 to 90 days. Neither the expiry nor the permissions can be changed after the token is created.
Permissions starts collapsed and reads 8 permissions. Click Show to see all nine. Every permission except Analyze and save selected reference images is selected, which covers the full canvas, image and video workflow. Clear the ones this client should not have; see Permissions below.
Create the token
Click Create token. Gavana confirms Personal Access Token created. and shows the token under a warning: Your Personal Access Token is shown once.
Tokens look like cba_<token-id>.<secret>: cba_, a UUID, a dot, and a 43-character secret.
Copy it and save it
Click Copy next to the token and paste it straight into the client’s private configuration or your secret store. Never put it in a note, a chat message, or a repository.
Below the token, Connect with offers ready-made setup for Claude Code, Claude Code on Windows, Desktop MCP app, and Custom agent or API. The Claude Code commands ask for the token in the terminal, so it never lands in your shell history. For Codex, ChatGPT, or Cursor the token is not needed: they use the hosted MCP connector and sign in through the browser.
Click I saved it when you’re done. The token is listed under Tokens, and there is no way to show it again. If you lose it, revoke it and create another.
Permissions
| Scope | Label in Settings | What it allows |
|---|---|---|
canvas:read | Read canvases | Find and read canvases you can access |
canvas:write | Change canvases | Add images and generation results to a canvas, and create, change, move, resize and delete nodes and connections |
asset:read | Read assets | Read the image assets connected to your work |
element:read | Read Elements | Find and read reusable Elements |
element:write | Create and manage Elements and Saved references | Create, update, archive and restore reusable Elements and Saved references |
image:generate | Generate/upload images and run Recipes | Run image generation using your saved Gavana connections, upload local images, and start Recipes |
video:generate | Generate videos from prompts and frames | Run video generation using your saved Gavana connections |
job:manage | Observe and cancel Runs | Check, wait for and cancel the generation jobs this token starts |
reference:extract | Analyze and save selected reference images | Upload selected reference images, analyze them using Gavana managed extraction, and save their ingredients |
A new token starts with the first eight. reference:extract is off by default; turn it on only for a client that should build Saved references from your images.
Browser sign-ins (OAuth) grant the same first eight. A client connected with Read-only access gets only canvas:read and element:read.
Permission dependencies
Some permissions cannot work alone. The picker selects their requirements for you, and the server rejects an invalid combination if you call it directly.
| Selecting… | Also requires |
|---|---|
canvas:write | canvas:read |
element:write | element:read |
reference:extract | element:read, element:write, asset:read |
image:generate | canvas:read, canvas:write, asset:read |
video:generate | canvas:read, asset:read |
video:generate does not require canvas:write. Video generation can produce a downloadable Job output without writing a video node to a canvas.
Clearing a permission also clears the ones that depend on it:
- Clearing
canvas:readclearscanvas:write,image:generateandvideo:generate. - Clearing
canvas:writeclearsimage:generate. - Clearing
asset:readclearsimage:generate,video:generateandreference:extract. - Clearing
element:readclearselement:writeandreference:extract. - Clearing
element:writeclearsreference:extract.
job:manage has no dependencies and nothing depends on it. The next section explains why you almost always want it anyway.
Why job:manage matters more than it looks
Without job:manage, a token can start generation but cannot check on it, wait for it, or cancel it. Every CLI and MCP path that waits for a result fails at the waiting step.
There are two workable setups:
Normal (recommended). Include job:manage. The client starts work and follows it to the result.
Start-only with a webhook. Leave out job:manage, start work with --no-wait, and supply a signed webhook so Gavana calls you back when the work finishes. Gavana keeps the Run going after your process exits.
A start-only token stays revocable while Gavana is running the job. If the token expires or is revoked before the Run finishes, Gavana stops the Recipe with delegation_revoked and sends its signed failed callback. Revoking is not a silent way to cancel.
MCP tools never take webhook secrets as arguments, so the webhook path is an API and CLI feature. See Webhooks.
Scope recipes
| Client and intent | Scopes |
|---|---|
| Review-only agent, no changes | canvas:read, asset:read, element:read |
| Structure-building agent: notes, sections, connections | canvas:read, canvas:write, asset:read, element:read |
| Element librarian | element:read, element:write |
| Saved-reference builder | element:read, element:write, asset:read, reference:extract |
| Full creative agent (the default) | the first eight |
| Backend service using webhooks instead of polling | canvas:read, canvas:write, asset:read, image:generate, with no job:manage |
What the token can and cannot do
A token acts as your account, limited to its permissions. It reaches the canvases you can reach, and it still gets a per-canvas access check on every request.
It cannot:
- Widen its own permissions.
- Create other tokens.
- Read or change your AI provider keys.
- Change its permissions or expiry after creation. Create a replacement if either needs to change.
- Keep working after a custom expiry passes.
If your account already has 20 active tokens, creating another fails with You can create up to 20 agent access tokens. Expired tokens are cleaned up when you create a new one, and when an MCP client signs in again Gavana makes room by retiring the least recently used browser sign-ins.
Revoke a token
The Tokens list on the Developer tab shows every credential on your account, including the ones browser sign-ins created, with its name, expiry, when it was last used, and its permissions. Click the red trash button next to a token, then Revoke in the confirmation.
RevokeCut off one token without touching the others
The token stops working on its next request. Because each token belongs to one client, revoking it does not disturb your other connections. The Connected tab lists the same credentials, each marked OAuth or Token, and can revoke them too.
Revoke a token at once if it was pasted into a chat, committed to a repository, captured in a screenshot, or used on a machine you no longer control. A token marked Never used, or one you don’t recognise, is also a good candidate.
Handling the token safely
- Never type a literal
cba_…value into a shell command. Use the stdin prompt shown in Install the CLI or the Connect with commands, so it never reaches shell history or the process list. - Store it in the client’s private configuration or your platform’s secret store. On macOS, the CLI’s browser login keeps its credential in Keychain automatically.
- Keep it out of the places listed in the safety contract: chat, URLs, logs, screenshots and repositories.
- If a token stops working unexpectedly, check whether your Gavana sign-in itself was revoked. The API then answers
The delegated Firebase session was revoked. Create a new agent token.Signing out of Gavana everywhere invalidates tokens created from that session.
Compatibility
The cba_ token prefix, the CRAFTBOARD_* environment variables, and the craftboard command alias all remain supported. A token created today works with both GAVANA_AGENT_TOKEN and CRAFTBOARD_AGENT_TOKEN.