AIec

API keys

An API key is how your agent talks to AIec. It is shown once, stored hashed, and can be rotated or revoked at any time.

Public alpha signup is invite-only. If you do not have an account yet, request access. The key management UI below is live for invited accounts.

Create a key

  1. Open the dashboard with the key you were invited with.
  2. Choose a name that says where it will run, for example ci-agent or local-dev.
  3. Select the scopes it needs. Least privilege is the default: a key that only creates and execs should not be able to read billing or rotate other keys.
  4. Copy the key. It is shown exactly once — AIec stores only a hash and cannot show it again.

Scopes

ScopeAllows
sandboxes:readList and inspect sandboxes
sandboxes:writeCreate, start, stop, destroy sandboxes
exec:writeRun commands and manage files
snapshots:readList and restore snapshots
snapshots:writeCreate and delete snapshots
artifacts:read / artifacts:writeUpload and download artifacts
usage:readRead usage and quota for your tenant
keys:writeCreate, rotate and revoke API keys

Using a key

curl https://api.aiec.gobrowse.dev/v1/sandboxes \
  -H "Authorization: Bearer af_live_..."
from agentforge import AIec
af = AIec(api_key="af_live_...")
# or, without hardcoding it
export AGENTFORGE_API_KEY="af_live_..."
export AGENTFORGE_URL="https://api.aiec.gobrowse.dev"

Rotate a key

Rotation issues a new key and immediately invalidates the old one. There is no overlap window, so rotate deliberately — a running agent using the old key will start receiving 401 the moment you rotate.

  1. Create the replacement key with the same scopes.
  2. Update the secret store your agent reads from.
  3. Revoke the old key.

Revoke a key

Revocation takes effect immediately. A revoked key returns 401 unauthorized and the action is recorded in the tenant's audit log.

Good practice

Keys are transmitted only over TLS. AIec stores a hash, never a recoverable value, and never logs a key. If you believe a key has been exposed, revoke it and report it — see security.