
agentic-inbox
Self-hosted email client with AI agent on Cloudflare Workers
Replaces Superhuman, Shortwave, Hey, Spark

Who it's for
If you already use Cloudflare for domains or hosting, Agentic Inbox adds a working email client with AI drafting to your existing infrastructure. The setup path (Wrangler and the Cloudflare dashboard) will be familiar, and your email data stays in Durable Objects under your account.
Skip if you need per-mailbox access control for multiple users, or if you are not already running Cloudflare infrastructure and do not want to start.
Replaces AI email clients like Superhuman or Shortwave for teams already in the Cloudflare ecosystem. The AI agent auto-drafts replies and lets you manage email through a modern web interface at no additional per-seat software cost.
Skip if your team needs a mobile app, calendar integration, or a managed support tier. Agentic Inbox is a developer-deployed tool with no mobile client documented in the README.
The MCP server at /mcp lets external AI tools query any mailbox by passing a mailboxId parameter. This makes Agentic Inbox a practical integration point for agents that need to read, search, or send email as part of a larger automated workflow.
Skip if you need per-tool or per-agent mailbox authorization. The Cloudflare Access policy is the single trust boundary; all authorized users and tools can access all mailboxes.
The problem
AI-enhanced email clients have become a crowded SaaS category. Superhuman, Shortwave, HEY, and Spark each offer intelligent inbox features, but every one of them requires handing your email over to their servers. There is no self-hosting path, no data portability guarantee beyond a GDPR export, and no protection if their pricing changes or the service shuts down. For developers and teams that handle sensitive communications, running email through a third-party SaaS is a real risk. The inbox is one of the most data-dense places in any organization: it holds contracts, credentials, client conversations, and internal decisions. Storing that on a commercial service you do not control is a tradeoff many teams accept only because no self-hosted alternative with AI capabilities previously existed.
How it works
Sends and receives email via Cloudflare Email Routing. Includes a rich text composer with reply/forward threading, folder organization, search across conversations, and R2 attachment storage. All email stays in Cloudflare infrastructure under your account.
Each mailbox runs in its own Cloudflare Durable Object with a dedicated SQLite database, keeping storage scoped and isolated by design. One mailbox cannot read another's data. Attachments go to R2, keeping binary storage separate from the relational database.
A side panel runs an AI agent built on the Cloudflare Agents SDK and Workers AI (moonshotai/kimi-k2.5 model). It provides nine tools: reading the inbox, searching conversations, drafting replies, and sending on confirmation. All operations require explicit user approval before sending.
When a new email arrives, the AI agent reads it automatically and generates a draft reply. The draft waits for your review; the agent never sends without explicit confirmation. Custom system prompts per mailbox let you control the agent's writing tone and behavior.
Ships with an MCP server at /mcp so external AI tools (Claude Code, Cursor, and others) can operate on any mailbox by passing a mailboxId parameter. Authorization is governed by the Cloudflare Access policy, which is the single trust boundary for all mailbox access.
Features
- Full email client on Cloudflare Workers
- Per-mailbox Durable Object isolation
- AI agent with nine email tools
- Auto-draft on incoming email
- MCP server for external AI tool integration
How to install
Self-hosting deploys to Cloudflare Workers; clone the repo, install dependencies, and run the deploy script.
git clone https://github.com/cloudflare/agentic-inbox
cd agentic-inbox
npm install
npm run deployRecommended for this setup
Strengths
- Email data stays in your Cloudflare account: All email storage lives in Cloudflare Durable Objects and R2 under your own account. Unlike Superhuman or Shortwave, which route and process your email through their own infrastructure, Agentic Inbox keeps mail on infrastructure you control.
- Apache-2.0 license with no restrictions: Apache-2.0 allows commercial use, modification, and distribution with no copyleft requirements. You can fork the project, modify it for your team, and run it in production without licensing fees or vendor approval.
- No per-seat software cost: Runs entirely on Cloudflare's serverless edge using Workers, Durable Objects, R2, and Email Routing. You pay Cloudflare's standard usage rates, which include free tiers for low volume, rather than a monthly per-user SaaS fee layered on top of infrastructure costs.
Trade-offs
- Cloudflare-only deployment: Agentic Inbox runs exclusively on Cloudflare Workers and is not portable to other cloud providers or bare-metal servers. You need a Cloudflare account with a custom domain. Teams not already in the Cloudflare ecosystem must migrate or add infrastructure to use it.
- Multi-step setup with several dependencies: Deployment is not a single-command operation despite the Deploy button. You must separately configure Cloudflare Access, set up Email Routing with a catch-all rule, enable the Email Service binding for outbound sending, and create at least one mailbox. Expect 30 to 60 minutes for first-time setup.
- No per-mailbox access control: Any user who passes the Cloudflare Access policy can read and write all mailboxes, including via the MCP server. There is no per-mailbox authorization. For teams where inbox isolation between members matters, the README notes this is an explicit architectural decision, not a configuration gap.
Tech stack
FAQ
The software is Apache-2.0 licensed and free to deploy. You pay Cloudflare's standard rates for Workers, Durable Objects, R2, and Email Routing, all of which have free tiers for low-volume use. There is no per-seat fee for the software itself.
It works with any domain managed on Cloudflare. You set the domain at deployment time via the DOMAINS variable, configure Email Routing to forward inbound email to the Worker, and create mailboxes for any address on that domain. Domains not on Cloudflare require adding or transferring DNS to Cloudflare first.
No. The agent auto-drafts a reply when new email arrives, but it holds that draft for explicit confirmation before sending. All outbound sending requires your approval. You can also customize the agent's tone and behavior with per-mailbox system prompts.
The agent runs on Cloudflare Workers AI using the moonshotai/kimi-k2.5 model. Workers AI runs on Cloudflare's own network; no third-party AI API key is required beyond what Cloudflare provisions automatically during deployment.
Yes, with a caveat: any user who passes the Cloudflare Access policy can access all mailboxes. There is no per-mailbox access control; the Access policy is the single trust boundary. For small teams where everyone should see everything, this works well. For teams that need per-user mailbox isolation, this is a current architectural limitation noted explicitly in the README.