@Jolyne_AI: 想用自己的域名收发邮件,要么自己搭一整套邮件服务器,麻烦;要么用第三方服务,隐私又不踏实。 Cloudflare 团队最近开源了 Agentic Inbox:完全跑在 Cloudflare Workers 上的自托管邮箱客户端,还内置 A…
摘要
Cloudflare 开源了 Agentic Inbox,一个完全运行在 Cloudflare Workers 上的自托管邮箱客户端,内置 AI 助手,支持自动阅读邮件并生成回复草稿,可一键部署到 Cloudflare 账户。
查看缓存全文
缓存时间: 2026/07/05 10:33
想用自己的域名收发邮件,要么自己搭一整套邮件服务器,麻烦;要么用第三方服务,隐私又不踏实。
Cloudflare 团队最近开源了 Agentic Inbox:完全跑在 Cloudflare Workers 上的自托管邮箱客户端,还内置 AI 助手。
部署到你的 Cloudflare 账户基本一键搞定:用自定义域名收发邮件;每个邮箱独立隔离存储;附件放对象存储,清晰可控。
GitHub:http://github.com/cloudflare/agentic-inbox…
AI 邮件助手会在新邮件到达后自动阅读,生成回复草稿,但不会自动发送,必须你确认后才会发出。
它还支持搜索历史邮件、整理对话;不同邮箱还能配置不同提示词,按你的习惯来。
如果你的域名在 Cloudflare 托管,又想要一个轻量、数据完全自持的邮箱方案,部署起来就能直接用。
cloudflare/agentic-inbox
Source: https://github.com/cloudflare/agentic-inbox
Agentic Inbox
A self-hosted email client with an AI agent, running entirely on Cloudflare Workers
Agentic Inbox lets you send, receive, and manage emails through a modern web interface – all powered by your own Cloudflare account. Incoming emails arrive via Cloudflare Email Routing, each mailbox is isolated in its own Durable Object with a SQLite database, and attachments are stored in R2.
An AI-powered Email Agent can read your inbox, search conversations, and draft replies – built with the Cloudflare Agents SDK and Workers AI.

Read the blog post to learn more about Cloudflare Email Service and how to use it with the Agents SDK, MCP, and from the Wrangler CLI: Email for Agents.
How to setup
Important: Clicking the ‘Deploy to Cloudflare’ button is only one part of the setup. You must follow the After deploying steps as well. For a full step-by-step guide with screenshots, refer to this comment: https://github.com/cloudflare/agentic-inbox/issues/4#issuecomment-4269118513
To set up
-
Deploy to Cloudflare. The deploy flow will automatically provision R2, Durable Objects, and Workers AI. You’ll be prompted for DOMAINS, which is the domain (yourdomain.com) you want to receive emails for ([email protected]).
-
Configure Cloudflare Access – Enable one-click Cloudflare Access on your Worker under Settings > Domains & Routes. The modal will show your
POLICY_AUDandTEAM_DOMAINvalues.TEAM_DOMAINcan be either your Access team URL or the full.../cdn-cgi/access/certsURL. You must set these as secrets for your Worker. -
Set up Email Routing – In the Cloudflare dashboard, go to your domain > Email Routing and create a catch-all rule that forwards to this Worker
-
Enable Email Service – The worker needs the
send_emailbinding to send outbound emails. See Email Service docs -
Create a mailbox – Visit your deployed app and create a mailbox for any address on your domain (e.g.
[email protected])
Troubleshooting Access
- If you see
Invalid or expired Access token, that usually meansPOLICY_AUDorTEAM_DOMAINsecrets are incorrect.- Resolution: turn Access off and back on for the Worker to get the Access modal again, then reset your Worker secrets to the latest
POLICY_AUDandTEAM_DOMAINvalues shown there.
- Resolution: turn Access off and back on for the Worker to get the Access modal again, then reset your Worker secrets to the latest
- If you see
Cloudflare Access must be configured in production, this application is intentionally enforcing Cloudflare Access so your inbox is not exposed to anyone on the internet.- Resolution: enable Access using one-click Cloudflare Access for Workers, then set the
POLICY_AUDandTEAM_DOMAINWorker secrets from the modal values.
- Resolution: enable Access using one-click Cloudflare Access for Workers, then set the
Features
- Full email client — Send and receive emails via Cloudflare Email Routing with a rich text composer, reply/forward threading, folder organization, search, and attachments
- Per-mailbox isolation — Each mailbox runs in its own Durable Object with SQLite storage and R2 for attachments
- Built-in AI agent — Side panel with 9 email tools for reading, searching, drafting, and sending
- Auto-draft on new email — Agent automatically reads inbound emails and generates draft replies, always requiring explicit confirmation before sending
- Configurable and persistent — Custom system prompts per mailbox, persistent chat history, streaming markdown responses, and tool call visibility
Stack
- Frontend: React 19, React Router v7, Tailwind CSS, Zustand, TipTap,
@cloudflare/kumo - Backend: Hono, Cloudflare Workers, Durable Objects (SQLite), R2, Email Routing
- AI Agent: Cloudflare Agents SDK (
AIChatAgent), AI SDK v6, Workers AI (@cf/moonshotai/kimi-k2.5),react-markdown+remark-gfm - Auth: Cloudflare Access JWT validation (required outside local development)
Getting Started
npm install
npm run dev
Configuration
- Set your domain in
wrangler.jsonc - Create an R2 bucket named
agentic-inbox:wrangler r2 bucket create agentic-inbox
Deploy
npm run deploy
Prerequisites
- Cloudflare account with a domain
- Email Routing enabled for receiving
- Email Service enabled for sending
- Workers AI enabled (for the agent)
- Cloudflare Access configured for deployed/shared environments (required in production)
Any user who passes the shared Cloudflare Access policy can access all mailboxes in this app by design. This includes the MCP server at /mcp – external AI tools (Claude Code, Cursor, etc.) connected via MCP can operate on any mailbox by passing a mailboxId parameter. There is no per-mailbox authorization; the Cloudflare Access policy is the single trust boundary.
Architecture
┌──────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Browser │────>│ Hono Worker │────>│ MailboxDO │
│ React SPA │ │ (API + SSR) │ │ (SQLite + R2) │
│ Agent Panel │ │ │ └─────────────────┘
└──────┬───────┘ │ /agents/* ──────┼────>┌─────────────────┐
│ │ │ │ EmailAgent DO │
│ WebSocket │ │ │ (AIChatAgent) │
└─────────────┤ │ │ 9 email tools │
│ │────>│ Workers AI │
└──────────────────┘ └─────────────────┘
License
Apache 2.0 – see LICENSE.
相似文章
dreamhunter2333/cloudflare_temp_email
一个基于 Cloudflare Workers 的免费开源临时邮箱服务,具备 Rust WASM 邮件解析、多语言界面、地址密码保护和 AI 代理集成功能。
每个智能体都有独立的收件箱吗?
作者为每个 AI 智能体(受理、审计、经纪服务台、注册等)分配独立邮箱,甚至为每个任务创建短期的 run-xxxx 邮箱来接收验证码,认为这样比共用一个 Gmail 邮箱更整洁,并询问他人是否有类似的按任务创建邮箱的做法。
@indie_maker_fox: Inbox Zero 的作者刚发布了 Inbox Zero Mail,定位是开源版的 Superhuman。 - 键盘优先,操作快 - Gmail 和 Outlook 统一收件箱,还能分栏 - AI 自动分类邮件、预写回复 - 一键批量退…
Inbox Zero 的作者发布了 Inbox Zero Mail,定位为开源版 Superhuman,提供键盘优先操作、Gmail/Outlook 统一收件箱、AI 自动分类与预写回复、批量退订及团队协作,并支持网页、桌面、iOS 和自托管部署。
@0xzi11a:我构建了一个专注的邮件客户端,用于管理工作邮件,使用 IMAP 和 SMTP 登录。它是开源的:https://github.co…
开发者发布开源桌面邮件客户端 Inboxed,基于 Tauri、SvelteKit、Tailwind 和 Go 构建,支持多账户统一收件箱、双向 IMAP 同步、SMTP 收发与本地 SQLite 存储,目前仅支持 macOS。
我为我的智能体搭建了一个免费的邮件通知方案,只在真正重要的时候才会触发
作者构建了 agent-notify,这是一个免费的 Cloudflare Worker,可以让任意 AI 智能体向固定收件人(即部署者)发送邮件通知,旨在只推送真正重要的智能体告警,过滤掉无关噪音。它可以与任何能够使用 MCP 服务器或发送网络请求的工具配合使用。