Security and Access

API Key Management

Each agent has three keys with different scopes and trust levels. Using the right key in the right place is the most important step in keeping your integration secure.

The three keys

PrefixNameWhere it goesKeep secret?
agt_Public agent keyWidget data-agent-id attribute, client-side SDK. Included in HTML served to browsers.No - it is intentionally public.
sk_Client API keyYour server when creating signed sessions. Never sent to the browser.Yes - treat like a password.
ck_Management keyServer-to-server admin calls: creating agents, uploading documents, managing databases via the REST API.Yes - treat like a password.

What each key can and cannot do

Operationagt_sk_ck_
Load agent widget configYesYesYes
Create anonymous sessionYesYesNo
Create signed sessionNoYesNo
Send messagesNo (session token required)No (session token required)No
Upload documentsNoNoYes
Create / update / delete agentsNoNoYes
Manage databasesNoNoYes

Storing keys safely

Store sk_ and ck_ keys in environment variables or a secrets manager - never in source code, client bundles, or public repositories. Reference them at runtime on your server only.

Rotating a key

In the console open the agent, go to the API Keys tab, and click Rotate next to the key you want to replace. A new key is issued immediately. The old key continues working for a short grace period to allow for a zero-downtime rollover - update your server environment and then revoke the old key.

Revoking a key

Click Revoke on the key in the console. Revocation is immediate - all requests using that key will be rejected with HTTP 401 from that point on. Use this if a key is exposed or you suspect it has been compromised.

If a key is leaked

Revoke the compromised key immediately, then rotate to a new one. Review your session and action logs for any anomalous calls made with the exposed key. If the leaked key was a ck_ management key, audit recent document uploads and agent configuration changes.