Overview
Agentic Inbox is a self-hosted email client that runs entirely in your own Cloudflare account, with a built-in AI agent that can read, search, and draft replies to your mail. Incoming messages arrive through Cloudflare Email Routing, every mailbox lives in its own Durable Object with a SQLite database, and attachments are stored in R2.
Key Features
- Full email client: rich-text composer, threaded replies and forwards, folders, search, and attachments
- Per-mailbox isolation: each mailbox runs in its own Durable Object with SQLite storage
- Built-in AI agent: a side panel with tools for reading, searching, drafting, and sending email
- Auto-drafting: the agent reads new inbound mail and prepares draft replies — sending always requires your explicit confirmation
- Configurable: custom system prompt per mailbox, persistent chat history, and visible tool calls
- Protected by Cloudflare Access: production deployments require Access, so your inbox is never exposed to the public internet
Tech Stack
| Layer | Technologies |
|---|---|
| Frontend | React 19, React Router v7, Tailwind CSS, TipTap, Kumo |
| Backend | Hono, Workers, Durable Objects (SQLite), R2, Email Routing |
| AI | Agents SDK (AIChatAgent), AI SDK, Workers AI |
| Auth | Cloudflare Access JWT validation |
Getting Started
You need a Cloudflare account with a domain, plus Email Routing (receiving), Email Service (sending), and Workers AI enabled.
- Deploy with the “Deploy to Cloudflare” button, which provisions R2, Durable Objects, and Workers AI and asks for the domain you want to receive mail on.
- Enable Cloudflare Access on the Worker and save the
POLICY_AUDandTEAM_DOMAINvalues as Worker secrets. - Create an Email Routing catch-all rule that forwards to the Worker.
- Enable the
send_emailbinding for outbound mail. - Create a mailbox in the app, such as
[email protected].
For local development:
npm install
npm run dev
Use Cases
- A private, AI-assisted inbox for a personal or company domain
- A reference architecture for building email-driven agents on Cloudflare
- Triage and draft help for shared support addresses
License
Apache License 2.0.