Agent Inbox CLI reference

early-access

Commands and configuration for the remote Agent Inbox CLI.

Usage: agent-inbox <command>
Category: agents

agent-inbox is the remote client for the hosted or self-hosted Agent Inbox HTTP API.

Commands

agent-inbox login
agent-inbox inboxes
agent-inbox webhooks list --inbox <owner/domain|id>
agent-inbox webhooks add  --inbox <owner/domain|id> --url URL [--match PATTERN]
agent-inbox webhooks rm   --inbox <owner/domain|id> <webhookId>
agent-inbox webhooks test --inbox <owner/domain|id> <webhookId>
agent-inbox version

Agent mailbox commands

agent-inbox new [--label s] [--ttl 24h|7d] [--allow pat]... [--prefix s] [--domain d] [--keep] [--pair] [--json]
agent-inbox wait [--timeout 10m] [--from s] [--subject re] [--json] [--no-mark] [--new-only]
agent-inbox emails [--unread] [--limit n] [--json]
agent-inbox read <id> [--json] [--raw] [--no-mark]
agent-inbox attachment <id> <name> [-o path]
agent-inbox allow [ls|add|rm] [pattern]
agent-inbox mailboxes [--json]
agent-inbox extend --ttl 24h|7d [address]
agent-inbox keep [address]
agent-inbox rm [address]
agent-inbox mcp [--mailbox a]
agent-inbox channel [--mailbox a]
agent-inbox init [--agent claude|codex|cursor|all] [--channel] [--skill] [--force]
agent-inbox skill

Every mailbox command accepts --mailbox <address>. The default is $AGENT_INBOX_MAILBOX, otherwise the newest active mailbox.

CommandWhat it does
newGets an address. Logged in: created directly. Otherwise on a public domain: created at once with no login (at most 72h, not kept). Otherwise prints a pairing code and link for a human to approve. --pair forces pairing.
waitPrints the oldest unread matching message, or blocks until one arrives, and marks it read. --from matches sender text, --subject is a regular expression, --new-only ignores mail already waiting.
emails, readList mail and read one message. Bodies are framed as untrusted. --raw streams the RFC 822 message.
attachmentDownloads an attachment to ./<name> or -o path.
allowShows or changes the sender allow-list. add and rm need the human to have allowed the agent to edit it, or an owner login on this machine.
mailboxesLists local mailboxes and their state.
extend, keepChange the lifetime or make the address permanent. Need the owner's login. Not available on public no-login mailboxes.
rmGives the address up. The mailbox token is enough. Its mail is deleted.
mcpRuns a stdio MCP server for the mailbox, with inbox_whoami and inbox_wait_for_email.
channelRuns a Claude Code channel that wakes the session on new mail.
initRegisters the MCP server for an agent. --skill writes .claude/skills/agent-inbox/SKILL.md. No token is written to config.
skillPrints the agent skill.

Allow-list entries: ann@example.com, *@github.com, *@*.example.com, *@* (any sender that passes DMARC alignment), and * (anyone, authentication not checked).

Exit codes

CodeMeaning
0Success
1Error
2wait timed out; or wrong usage with no command
3Pairing was denied by the human
4Pairing request expired
5Pairing request already claimed

Webhook match

--match accepts *, an exact local part such as orders, or a prefix such as support-*.

Environment variables

VariableDefaultPurpose
AGENT_INBOX_SERVERhttps://inbox.agentics.dkInbox API base URL
AGENT_INBOX_MAILBOXnewest activeMailbox address used by mailbox commands
AGENT_INBOX_CLIENTagent-inboxClient name shown to the human when pairing
AGENT_INBOX_ISSUERAgentics realmOIDC issuer
AGENT_INBOX_CLIENT_IDagentics-inbox-desktopOIDC public client
AGENT_INBOX_HOME~/.agent-inboxCredential and configuration directory
USE_ASPIREunsetUse the local Aspire credential home when set to 1, true, yes, or on

To target a self-hosted instance:

AGENT_INBOX_SERVER=https://inbox.example.com agent-inbox login

The selected server, issuer, and client ID are retained with the login. Environment variables override retained values.

Webhook signature

The secret returned by webhooks add is displayed once. A receiver must calculate HMAC-SHA256 over the raw body and compare it with:

X-Inbox-Signature: sha256=<hex-digest>

Use webhooks test to validate connectivity and signature handling before relying on live email events.