Agentic Inbox
A self-hosted, open-source email client with a built-in AI agent that runs entirely on Cloudflare Workers, using Durable Objects, R2, and Workers AI.
At a Glance
About Agentic Inbox
Agentic Inbox is an open-source, self-hosted email client built and published by Cloudflare under the Apache 2.0 license. It runs entirely on Cloudflare Workers infrastructure and pairs a full-featured web email interface with an AI agent capable of reading, searching, and drafting replies. The project was created to demonstrate Cloudflare's Email Service, Agents SDK, and MCP capabilities working together.
What It Is
Agentic Inbox is a self-deployable email application that handles both inbound and outbound email through Cloudflare Email Routing. Each mailbox is isolated in its own Durable Object backed by a SQLite database, with attachments stored in R2. An AI-powered Email Agent — built with the Cloudflare Agents SDK and Workers AI — runs as a side panel inside the interface, offering nine email tools for reading, searching, drafting, and sending messages. The project is explicitly positioned as a reference implementation and demo app for Cloudflare's "Email for Agents" blog post and ecosystem.
Architecture and Stack
The application follows a clean separation between frontend, backend, and AI agent layers:
- Frontend: React 19, React Router v7, Tailwind CSS, Zustand state management, TipTap rich-text editor, and
@cloudflare/kumo - Backend: Hono framework on Cloudflare Workers, Durable Objects (SQLite) for per-mailbox storage, R2 for attachments, and Cloudflare Email Routing for inbound delivery
- AI Agent: Cloudflare Agents SDK (
AIChatAgent), AI SDK v6, Workers AI using the@cf/moonshotai/kimi-k2.5model, with streaming markdown responses and tool call visibility - Auth: Cloudflare Access JWT validation, required in all non-local environments
The architecture diagram in the README shows the browser React SPA communicating with a Hono Worker via WebSocket for the agent panel, which in turn routes to both a MailboxDO (SQLite + R2) and an EmailAgent Durable Object running Workers AI.
Key Features
- Full email client with rich-text composer, reply/forward threading, folder organization, search, and attachment support
- Per-mailbox isolation via Durable Objects with SQLite storage
- Built-in AI agent side panel with nine email tools
- Auto-draft on new email: the agent reads inbound messages and generates draft replies, always requiring explicit user confirmation before sending
- Custom system prompts per mailbox, persistent chat history, and streaming markdown responses
- MCP server exposed at
/mcp, allowing external AI tools such as Claude Code and Cursor to operate on mailboxes via amailboxIdparameter
Setup Path
Deployment is handled via a "Deploy to Cloudflare" button that automatically provisions R2, Durable Objects, and Workers AI. After deploying, users must:
- Configure Cloudflare Access (one-click Access for Workers) and set
POLICY_AUDandTEAM_DOMAINsecrets - Set up Email Routing with a catch-all rule forwarding to the Worker
- Enable the
send_emailbinding for outbound email - Create at least one mailbox for an address on their domain
The README notes that Cloudflare Access is the single trust boundary — any user who passes the shared Access policy can access all mailboxes, including the MCP server endpoint.
Why It Matters
Agentic Inbox demonstrates a practical pattern for building AI-native email workflows entirely on serverless edge infrastructure, without any third-party email SaaS. It also serves as a concrete reference for integrating Cloudflare's Agents SDK, MCP, and Workers AI into a real application. The repository accumulated over 6,600 GitHub stars and 841 forks shortly after its April 2026 creation, reflecting significant community interest in the self-hosted AI email pattern.
Community Discussions
Be the first to start a conversation about Agentic Inbox
Share your experience with Agentic Inbox, ask questions, or help others learn from your insights.
Pricing
Open Source
Free to self-host under the Apache 2.0 license. Requires a Cloudflare account with Email Routing, Workers AI, and R2 enabled.
- Full email client (send, receive, search, attachments)
- Per-mailbox Durable Object isolation with SQLite
- Built-in AI agent with 9 email tools
- Auto-draft replies on inbound email
- MCP server endpoint for external AI tools
Capabilities
Key Features
- Full email client with send/receive via Cloudflare Email Routing
- Rich text composer with reply/forward threading
- Folder organization, search, and attachment support
- Per-mailbox isolation using Durable Objects with SQLite
- AI agent side panel with 9 email tools
- Auto-draft replies on inbound email with explicit confirmation required
- Custom system prompts per mailbox
- Persistent chat history with streaming markdown responses
- Tool call visibility in agent panel
- MCP server at /mcp for external AI tool integration
- Cloudflare Access JWT authentication
- One-click Deploy to Cloudflare button
