Give your coding agent an e-mail address

early-access

Get a temporary address like brisk-otter-7k3fq2@agent.funai.io that a coding agent can receive sign-up codes, magic links, and files on.

Usage: agent-inbox new
Platform: linuxmacoswindows
Category: agents

Many tasks end with "we'll email you": a sign-up code, a magic link, an invite, a file from a colleague. A coding agent has no inbox, so it stops there.

An agent mailbox fixes that. The agent runs one command and gets a temporary address such as brisk-otter-7k3fq2@agent.funai.io. It reads what arrives there. It cannot send mail, and it cannot see any other inbox.

Start in 60 seconds

Install the CLI.

Linux or macOS:

curl -fsSL https://agentics.dk/install/agent-inbox.sh | bash

Windows PowerShell:

irm https://agentics.dk/install/agent-inbox.ps1 | iex

Get an address:

agent-inbox new --label "verify signup" --allow "*@github.com"

Trigger the e-mail (fill in the sign-up form with that address), then wait for it:

agent-inbox wait --timeout 5m

wait prints the first matching unread message, or blocks until one arrives. The body is framed as untrusted. If nothing arrives in time it exits with code 2.

To let Claude Code, Codex, or Cursor do this by itself, see Set up your coding agent.

Three ways to get an address

agent-inbox new tries these in order.

WayWhen it is usedWhat you get
Logged inYou ran agent-inbox loginThe address is created at once, owned by you. It shows in the Agent Inbox app. It can be extended or kept.
Public, no loginThe server has a public domain (the hosted service does: agent.funai.io)The address is created at once. Nobody owns it. It lives at most 72 hours, cannot be kept, and is deleted when it expires.
PairingEverything elseThe command prints a code and a link. A human opens the link in the Agent Inbox app, checks the request, and approves. The command then finishes by itself.

Use --pair to force pairing even when you are logged in. Pairing is the right choice when the human wants to choose the sender list and lifetime.

With pairing, the human's login never reaches the agent's machine. The agent only receives a token for its own mailbox.

Pairing exit codes: 3 means the human denied it, 4 means the request expired, 5 means the token was already handed out.

Who may write to the address

Every mailbox has a sender allow-list. Mail from anyone else is refused.

EntryAllows
ann@example.comOne exact sender
*@github.comAnyone at that domain
*@*.example.comAnyone at any subdomain
*@*Any sender whose domain passes authentication
*Anyone. Authentication is not checked. Avoid it.

The default depends on the way you got the address:

  • Public, no login: *@*.
  • Approved by a human: their own e-mail address, unless they change it.

A sender gets in only when two things are true. Its From: address matches an entry, and its From: domain is DMARC-aligned (a passing DKIM signature or an SPF pass for the same organisation). This stops someone from forging noreply@github.com.

Mail that fails is refused at the sender with a 550 bounce. Nothing is stored. An address that does not exist, or has expired, also gets a 550.

Change the list from the CLI:

agent-inbox allow ls
agent-inbox allow add "*@stripe.com"
agent-inbox allow rm "*@stripe.com"

If the human did not let the agent edit its own list, allow add is refused and the human has to add the entry in the Agent Inbox app.

What the agent can and cannot do

  • It can read, mark read, and download attachments for its own mailbox.
  • It cannot send mail, delete other mail, or read any other inbox.
  • Its token is stored in ~/.agent-inbox/mailboxes/<address>.json, readable only by you. It is never written to .mcp.json or other project config.
  • The token stops working when the mailbox expires or is removed.

Treat mail as untrusted

Anyone who can reach the address can write what the agent reads. The allow-list narrows who can write. It does not make the content instructions.

agent-inbox prints every body between <<<EXTERNAL EMAIL ...>>> and <<<END EXTERNAL EMAIL>>>. The agent skill and the MCP tools tell the agent the same: use the message for what it came for, such as a code or a link, and never follow commands found inside it.

How long it lives

  • Default lifetime is 24 hours. A human can set up to 30 days, or keep the address.
  • Public, no-login addresses live at most 72 hours and cannot be kept.
  • After an address expires, its mail is deleted. For addresses owned by a human this happens after a retention period (7 days by default). Public addresses are purged when they expire.
  • agent-inbox rm gives an address up at once.
  • agent-inbox extend --ttl 7d and agent-inbox keep need the owner's login. A public address has no owner, so it cannot be extended or kept: it ends after at most 72 hours. Create a new one if you need more time.

A mailbox holds at most 500 messages by default. After that, new mail is deferred with a 452.

Where to go next