Open-source email infrastructure for AI agents
Your agents need mailboxes. You should own the post office.
One Cloudflare account, one mail domain, many agent mailboxes. Receive, poll, send, and reply without handing message data to a hosted control plane.
Built only for Cloudflare. No hosted control plane.
Operator-ownedRuns in your Cloudflare account
Multiple mailboxesOne custom mail domain
Pull-basedREST, CLI, and MCP
Open sourceInspect every boundary
MIT-licensed infrastructure
Open source. Host it yourself.
Clone the repository, provision the Cloudflare resources in your own account, and keep the Worker, database, objects, queues, tokens, and message data under your control. Agent Post Office has no hosted service to subscribe to and no control plane to trust.
Inspect the open-source repository
Create many addresses. Poll one domain-wide feed.
Give research, support, operations, or any other agent a durable address on the domain you control. Active mailboxes receive mail. Disabled and unknown addresses do not.
Messages stay unprocessed until an agent acknowledges them. Sending and replies use explicit scopes and idempotency keys, so automation has visible boundaries.
Mail moves on your agent’s schedule.
No inbound webhook is required. Agents initiate every API connection.
-
Receive
Cloudflare Email Routing invokes the Worker for the exact envelope recipient.
-
Store and parse
Raw MIME goes to private R2 before an ID-only task enters Queues.
-
Poll and acknowledge
Agents read a unified feed and explicitly mark completed messages processed.
-
Send or reply
Cloudflare Email Sending handles transactional mail with scoped authorization.
Built only for Cloudflare
Six services. One operator-owned boundary.
There is no Agent Post Office account, hosted database, or message relay outside your deployment.
- Email Routing
- Receives inbound SMTP and invokes the Email Worker.
- Workers
- Runs ingestion, REST endpoints, and Queue consumers.
- D1
- Stores mailbox state, message indexes, and hashed token metadata.
- R2
- Keeps raw MIME, complete bodies, and attachments private.
- Queues
- Parses messages and retries deletion work without carrying MIME.
- Email Sending
- Sends transactional messages and threaded replies.
The data boundary is the product.
Message bodies, attachments, bearer-token hashes, and mailbox state remain inside the Cloudflare resources you provision. Logs use generated IDs instead of message content. HTML is never rendered by an administration page because there is no hosted administration page.
One domain does the sorting.
Create a durable address for each agent without provisioning another vendor inbox. Mail arrives through one routing boundary, then remains isolated by mailbox identity, token scope, and explicit acknowledgement.
Cloudflare requirements
Bring one domain and your Cloudflare account.
Workers Paid account ($5/month) A Workers Paid account is required for sending email to arbitrary recipients through Cloudflare Email Sending.
A domain on Cloudflare DNS Required for Email Routing, mail authentication records, and your agent addresses.
Your own deployment Agent Post Office is free and open source. You install and operate the Worker, D1, R2, and Queues resources.
Run the post office where your mail already lives.
Start with the architecture, inspect the security boundaries, then deploy deliberately.