Skip to content

Commands

alter agents

Manage managed-agent identities and their API keys.

A managed agent is a first-class identity for an AI workload, with its own keys and its own audit attribution. These commands manage agents and their key lifecycle.

alter agents list [--status ...] [--type ...] [--provider ...] [--search ...]
alter agents create --name <name> [--display-name ...] [--type ...] [--scopes ...] [--input ...]
alter agents show --agent <agent-id>
alter agents audit --agent <agent-id> [--limit ...] [--offset ...]
alter agents registry-list [--limit ...] [--offset ...]
alter agents registry-show --agent <actor-id>
alter agents update --agent <agent-id> [--display-name ...] [--metadata ...]
alter agents revoke --agent <agent-id> [--yes]
alter agents mint-key --agent <agent-id>
alter agents list-keys --agent <agent-id>
alter agents revoke-key --agent <agent-id> --key <key-id> [--force] [--yes]
alter agents deprecate-key --agent <agent-id> --key <key-id>
alter agents undeprecate-key --agent <agent-id> --key <key-id>

All commands are app-scoped — pass --app <id>, or link a workspace / set ALTER_APP_ID. Reads (list / show / list-keys) need dashboard_agents:read; create / update / mint-key / deprecate-key / undeprecate-key need dashboard_agents:write; revoke and revoke-key need dashboard_agents:admin. audit needs dashboard_audit:read (it reads the audit log, not the agent registry).

FlagDefaultDescription
--status <list>allComma-separated filter: active, inactive, revoked.
--type <type>allagent or service.
--provider <provider>allAgents whose scopes include this provider.
--search <query>Substring match on name / display name.
--limit <n>50Page size (1–1000).
--offset <n>0Pagination offset.
Terminal window
alter agents list --status active --type service

Paginated audit feed for one agent — the portal actions taken against it (create / update / revoke and key lifecycle), newest first. Needs dashboard_audit:read.

FlagDefaultDescription
--limit <n>50Page size (1–500).
--offset <n>0Pagination offset.
--output <format>tablejson, jsonl, or table.
Terminal window
alter agents audit --agent <agent-id> --output table

The read-only agent registry — agents seen in audit data, with activity stats (last activity, 30-day count). This is distinct from agents list / show, which manage the configured agent identities; the registry is the observability view. Both need dashboard_agents:read.

Terminal window
alter agents registry-list
alter agents registry-show --agent <actor-id>

Create a managed agent. --name is required unless you supply --input.

FlagRequiredDescription
--name <name>yesStable identifier.
--display-name <name>noHuman-readable name.
--type <type>noagent (default) or service.
--scopes <json>noJSON-encoded initial scope set (advanced; most operators edit scopes in the dashboard).
--input <path>noJSON body from a file (@path) or stdin (-); replaces the per-field flags.
Terminal window
alter agents create --name nightly-sync --type service --display-name "Nightly Sync"
Terminal window
alter agents show --agent <agent-id>

Edit cosmetic fields. At least one of --display-name or --metadata (a JSON object) is required.

Terminal window
alter agents update --agent <agent-id> --display-name "Nightly Sync (EU)"

Revoke an agent. This cascade-revokes all of its keys. Revocation is recoverable — you can re-create an agent with the same scopes — so the prompt is a simple y/N (skip with --yes).

Terminal window
alter agents revoke --agent <agent-id>

An agent can hold several keys, which lets you rotate without downtime: mint the new key, deploy it, then revoke the old one.

Terminal window
# Mint a fresh key (plaintext shown once)
alter agents mint-key --agent <agent-id>
# List every key (active / deprecated / revoked) with last-used timestamps
alter agents list-keys --agent <agent-id>
# Revoke one key
alter agents revoke-key --agent <agent-id> --key <key-id>

revoke-key accepts --force to override the last-active-key guard (leaving the agent with no active key) and --yes to skip the prompt.

Before revoking, you can deprecate a key to signal it should be retired. A deprecated key still authenticates — the backend just returns an advisory deprecation header to callers so they can migrate first. It is fully reversible, so there is no prompt.

Terminal window
# Mark a key deprecated (still works; advisory only)
alter agents deprecate-key --agent <agent-id> --key <key-id>
# Undo it
alter agents undeprecate-key --agent <agent-id> --key <key-id>

Rotate an agent’s key without downtime

Terminal window
# 1. Mint a fresh key (printed once) and deploy it to the agent.
alter agents mint-key --agent <agent-id>
# 2. Confirm the agent is calling with the new key — check the LAST USED column.
alter agents list-keys --agent <agent-id>
# 3. Revoke the superseded key.
alter agents revoke-key --agent <agent-id> --key <old-key-id>