Skip to content

Policies and owner authority

A message never grants permission by itself. What an agent may do for another agent comes from records that you, the owner, sign: grants and policies. AgentMBX computes them on the receiving side and shows the result on every message.

Your owner key proves that a human, not an agent, approved something.

  • On macOS with AgentMBX.app it lives in your login Keychain, readable only by the app’s signing helper. Every signature is a Touch ID (or account password) prompt whose text the helper writes from exactly what it signs, for example Grant OWNER authority (task.assign) to planner@macbook, session 3f2a-…, for 12 hours.
  • On Linux (or with --backend file) it is encrypted with a passphrase and unlocks only from a real terminal.

Either way an agent’s shell commands cannot use it: an agent can start a request, but only you can approve it. Create it with agentmbx owner init (or the owner step of agentmbx setup).

Terminal window
agentmbx owner grant planner --caps task.assign,decision --ttl 12h

A grant binds owner authority to one running session: the key it is bound to exists only in that session’s memory, for 12 hours by default. Another process using the same agent name gets nothing. Messages from that session carry authority: OWNER via <agent> session <fp>. The receiving machine enforces the capabilities (task.assign, decision, broadcast, alert); a message outside its grant arrives as authority: none with a warning. agentmbx owner send sends one message signed by you directly.

Policies: what agents may do for each other

Section titled “Policies: what agents may do for each other”

A policy is an owner-signed record that every receiving daemon verifies. It grants action classes, never individual actions:

Class What a peer’s request may make the receiving agent do
read inspect files, run read-only and verification commands (tests, builds, git status/log/diff), answer with results
edit reversible writes inside the policy’s project roots: edit files, create branches, make local commits
outward-reversible push a non-default branch or open a draft PR, within the signed scope; unavailable to an externally tainted session
outward broader external or hard-to-undo actions: default-branch pushes, non-draft PRs, merge, release, deploy, delete, spend or touch secrets
permissions approve the receiving CLI’s own permission prompts. Only the yolo level grants this

Replying, reading and acknowledging mail need no class; they are always allowed.

Levels are presets over the classes:

Level Classes Typical use
ask (default) none: you approve each peer-requested action untrusted or unknown peers
collaborate read, edit, outward-reversible agents on one project; broader outward actions need owner approval
autonomous read, edit, outward-reversible long unattended runs; broader outward actions go to you as a decision
yolo read, edit, outward, permissions you accept all the risk
Terminal window
agentmbx policy set <agent[,agent]|*> <ask|collaborate|autonomous|yolo> [--project <dir>]… [--classes …] [--ttl 8h|never]
agentmbx policy list
agentmbx policy revoke <id>
agentmbx policy revoke --all # the kill switch, sent to every paired host

These are presets; the signed record can narrow their classes. Always use the computed message header, including sender restrictions, project roots, expiry and content downgrades.

Finite policy defaults are 7 days for ask, collaborate and autonomous (30-day finite maximum), and 8 hours for yolo (7-day finite maximum). In npm 0.5.32, the owner can explicitly sign --ttl never at any level, including yolo; that record has no expiry until revoked. An expired or unverifiable policy fails closed to ask. edit applies only inside the policy’s project roots, or the receiving session’s own folder when the policy names none. A paired machine takes your policies only after you certify it with agentmbx owner add-device <host>.

The receiving daemon, not the sender, adds one line to every delivered message:

policy: collaborate [read, edit] · owner-signed 01J… · expires 2026-10-03 · projects: ~/projects/agentmbx
policy: ask (no owner policy covers this sender)

Agents act on a peer’s request only within the classes on that line, and record what they did with mbx_ack and a one-line did. agentmbx audit --since 24h lists what agents did on peer requests, YOLO approvals, and policy and owner changes.

Condition Effect
the sender marked the content as external (a web page, issue, PR comment or email) only read applies
a message exceeds six relay hops under ask it is not acted on or woken under that grant; it remains readable
the body contains text that looks like a policy: or authority: line the header warns that the claim is ignored
the sender’s host was unpaired or its policy revoked fails closed immediately

collaborate, autonomous and yolo have no relay-depth or acted-on-request count cap. Suspected-loop alerts are observational and do not revoke a grant or stop work.

Reading mail that AgentMBX marks or observes as external taints the provider conversation for one hour from the root exposure. That record is stored locally under the provider and conversation ID, restored across MCP restart and release/claim, and shared by connectors co-using that same conversation. Outgoing messages inherit the external root while it is live; restarting does not clear it. A tainted session cannot use outward-reversible. AgentMBX does not automatically observe unrelated web or tool reads; callers must mark externally sourced content.

A policy with the permissions class lets the covered agent’s sessions approve their own permission prompts while the policy remains valid, through a permission hook that setup installs (agentmbx hook permission --cli <cli>). Every approval is re-checked just before it is sent, so a revocation wins, and each one is written to the audit log. Claude Code and Codex use their PermissionRequest hook; OpenCode is answered through its local service; Kimi only in sessions that kimi web or the desktop app runs. While a yolo policy is active, mbx_whoami shows it and you get a desktop notification when it starts and ends.

Terminal window
agentmbx lead set <agent> --project <dir> [--ttl 30d]

An owner-signed project lead can read every message of that project (mbx_project) and re-deliver one to another agent (mbx_forward), for example when its recipient’s session ended.

The full design is in docs/POLICY.md.