No human in the loop — by design
CommandAGI is built for unattended execution as well as interactive collaboration. An agent holding a matching standing grant opens hardware channels, arms actuators, deploys sites, places shipments or market orders, executes Python jobs, and updates folders across threads, MCP, and the HTTP API without interactive popups on each step. Safety rests on three hard controls: the standing grant, the driver's protocol and motion bounds, and the append-only record.
Principals and credentials
Every acting party in CommandAGI is typed as one of four principal forms:
agent:<name>— an AI agent runtime or fork (agents/<folder>/agent.tsx)person:<name>— a human operator (acct:user:<id>when signed in)contract:<program-id>— a verified coordination contract seatscript:<path>— a scheduled or reactive.script.tsxin a Drive
No principal asserts its identity in plain text; every privileged request verifies a signed or hashed credential:
- Host credential (
cagp_…): Minted once viacommandagi grant token --principal agent:<name>(or duringgrant add); only its SHA-256 digest is stored in~/.commandagi/principals.json. Rotate withgrant token; revoke withgrant forget. - Account credential (
cagc.<payload>.<signature>): Signed with an account's Ed25519 key (commandagi grant sign --key-file …, or issued by the cloud for relayedhost_callinvocations), binding principal, account, expiry, and optional target host id. Revoke withcommandagi grant revoke-credentialorgrant rotate.
Standing grants
A standing grant is authority conferred on one principal by an explicit act of another principal with authority on the account. People carry no hidden privilege exception over agents: identical identity, scope, and rate validations apply to both.
CommandAGI validates seven kinds of standing grant uniformly across the workbench UI, local host (~/.commandagi/grants.json), and cloud (standing_grants in D1, via packages/domain/world/grants.js):
| kind | bounded scope | commandagi grant add flags |
|---|---|---|
unit | Physical world address, optional units, channels, and verbs (open, arm, run, send) | --world <world> [--unit U] [--channel C] [--verb V] |
files | Write access to relative path prefixes inside one folder address | --folder <dir> --file <prefix> |
code | Host Python execution inside a folder with allowlisted service secrets | --folder <dir> --code python [--secret svc] |
outreach | Sending outbound campaigns over named connected apps with daily cap | --folder <dir> --outreach <app> [--per-day N] |
market | Venue orders bounded by venues, symbols, --max-qty, --max-notional, --per-day | --folder <dir> --market <venue> [--symbol S] [--max-qty N] |
shipping | Buying postage labels and scheduling pickups bounded by cost and daily count | --folder <dir> --ship <carrier> [--max-cost N] [--currency USD] |
money | Transfers across named accounts, payment rails, counterparties, and tx/day/month cents caps | Workbench Settings -> Grants or account API |
# Hardware unit grant (expires in 8 hours)
commandagi grant add --principal agent:night-shift \
--world worlds/shop/world.tsx --unit mill-1 --channel gcode \
--verb open --verb arm --verb run --verb send --for 8h --note "night shift"
# Folder files + sandboxed Python execution with one secret
commandagi grant add --principal agent:analysis \
--folder ~/work/cell --file outputs/ --code python --secret alpaca --for 24h
commandagi grant list
commandagi grant revoke g-3f9a1c20b7deGrants apply to worlds, which name real machines. A design (a .3d.tsx) and a world's twin are simulated, and need none.
Verbs, arming and safing
A hardware unit grant grants any subset of four actuation verbs: open, arm, run, and send.
- Actuating devices always open disarmed. Any principal holding
armcan arm the unit; idle armed sessions disarm automatically after five minutes. - Non-mechanical host inputs (PTY shells, Python kernels, software relays) evaluate the grant directly on every call.
- Safing is always allowed.
stop,disarm, andclose— plus equipment safing commands such as feed hold, emergency stop, torque off, and cancelling a resting market order — remain open to anyone holding an unexpired grant on the unit, the session opener, and the account owner.commandagi unit stop --world <world> --unit <uid>sends the safing command to every open channel and stops running agents on that unit.
The rules every action follows
- Recorded before it is sent. Before any driver executes, an entry naming the principal and the command is appended to the run stream and flushed. A read-only Drive or folder refuses the action rather than acting off the record.
- An acknowledgement is not a state. Returning
okor HTTP200never implies the commanded physical state was reached; state stays pending until the device reports back. - Unknown stays unknown. Dropped sockets record
state: unknown, and streams ending without an explicit close banner render as interrupted: state unknown. - No silent retries. The platform never silently retries physical commands, transfers, shipments, or market orders.
- Bounds live in the driver. Soft limits, workspace bounds, intervals, and rate pacing (at least
30 msbetween discrete inputs) are enforced below the agent inside the driver. - Simulated and physical never mix. A run's
reality(simulationorphysical) is immutable, and simulated runs never count as physical commissioning evidence.
Threads, approval barriers, and local CLI supervision
A thread (POST /threads) backs a multi-participant session in runs/<run>/, joining humans, cloud/BYOK models, and local AI CLIs in members.jsonl with task mounts (mounts.tsx).
- Approval barriers & proposals: Where an agent lacks write authority on guarded files — or reaches an explicit
<approval>step in a.flow.tsxworkflow — it submits a semantic diff proposal (propose/propose_change, orcommandagi task propose) or pauses withask_question. Only an operator at their own terminal or session approves (commandagi task approve). - Automated trace judge: Run
commandagi judge <run-folder> [--follow]to continuously inspect thread streams in bounded windows and emit cited defect records to thejudgestream. - Supervising local AI CLIs: Seat Claude Code, Codex, Gemini CLI, Cursor Agent, or Qwen Code directly into any CommandAGI world or folder thread, tracking subscription usage against configured
agents.usagePolicycaps:
commandagi agents list # detect installed CLIs
commandagi agents signin claude-work --cli claude-code
commandagi agents start --of worlds/cell/world.tsx --agent claude-work --member codex-review --mount tasks/
commandagi agents tasks --run <run-address>
commandagi agents usage
commandagi agents say --run <run-address> --member codex-review --now "Verify clearances before export"