Cloudflare Email Service: now in public beta. Ready for your agents¶
Summary¶
Cloudflare's 2026-04-16 Agents-Week post moves Email Sending out of private beta into public beta, pairing it with the long-standing free Email Routing inbound product to give Workers and the Agents SDK a complete bidirectional email primitive — "receive an email, process it in a Worker, and reply, all without leaving Cloudflare." The framing thesis: email is becoming a core interface for agents ("everyone already has an email address"), and the inbox is the natural channel for agents that "think, acts, and communicates on its own timeline" — a long-running asynchronous response surface, not a synchronous chat pane. Together with the product, Cloudflare ships a full toolkit: Workers EMAIL binding, REST API + TS/Python/Go SDKs, wrangler email send CLI, a new Email MCP server on the Cloudflare MCP server, an Email Service skill for coding agents, and an open-source Agentic Inbox reference app that wires Email Routing + Email Sending + Workers AI + R2 + Agents SDK into a deployable end-to-end email-agent pipeline. The Agents SDK's existing onEmail hook now composes with this.sendEmail(...) so an agent instance can "receive a message, spend an hour processing data, check three other systems, and then reply with a complete answer" — the differentiator vs a chatbot. SPF / DKIM / DMARC are auto-configured on domain attach. Agent identity is encoded in the address — the address-based resolver routes support@… / sales@… to distinct Durable Object instances, sub-addressing (support+ticket-123@…) extends this to namespaces — and reply routing headers are HMAC-SHA256-signed so replies to an agent-sent email route back to the exact DO instance that sent it (security concern most "email for agents" solutions skip, per Cloudflare).
Key takeaways¶
-
Email is a first-class agent interface, not just a notification sink. "Email is the most accessible interface in the world. It is ubiquitous. There's no need for a custom chat application, no custom SDK for each channel. Everyone already has an email address, which means everyone can already interact with your application or agent. And your agent can interact with anyone." The thesis reframes email from a transactional-send channel into a bidirectional agent interface — customer support agents, invoice processing pipelines, account verification flows, multi-agent workflows all run on email rather than over a bespoke chat UI. Canonical wiki instance of concepts/email-as-agent-interface. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents)
-
Email Sending is a native Workers binding — no API keys, no secrets management. The post ships
env.EMAIL.send({ to, from, subject, text })as a first-party Workers binding alongside the existingai,durable_objects, andai_search_namespacesbindings. Also available from any runtime via REST API + TypeScript / Python / Go SDKs. Canonical shape: "transactional email as a platform primitive, billed per-Worker account, no third-party account to provision." Combined with the free Email Routing inbound product this is "complete bidirectional email within a single platform." (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents) -
Deliverability plumbing is auto-configured. "Sending email that actually reaches inboxes usually means wrestling with SPF, DKIM, and DMARC records. When you add your domain to Email Service, we configure all of it automatically. Your emails are authenticated and delivered, not flagged as spam." The customer-facing promise is the same managed-primitive shape as Universal SSL (patterns/default-on-security-upgrade family) — the hard configuration is absorbed into the platform. "Because Email Service is a global service built on Cloudflare's network, your emails are delivered with low latency anywhere in the world." (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents)
-
An agent is not a chatbot — the difference is the async-reply surface. "A chatbot responds in the moment or not at all. An agent thinks, acts, and communicates on its own timeline. With Email Sending, your agent can receive a message, spend an hour processing data, check three other systems, and then reply with a complete answer. It can schedule follow-ups. It can escalate when it detects an edge case. It can operate independently. In other words: it can actually do work, not just answer questions." The inbox is the substrate that tolerates arbitrary agent latency — unlike a WebSocket chat session, an hour-gap reply is normal email. See concepts/asynchronous-reply-email, patterns/inbound-classify-persist-reply-pipeline. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents)
-
Agent identity is encoded in the email address itself — address-based resolver + sub-addressing. "Each agent gets its own identity from a single domain. The address-based resolver routes
support@…to a 'support' agent instance,sales@…to a 'sales' instance, and so on. You don't need to provision separate inboxes — the routing is built into the address. You can even use sub-addressing (support+ticket-123@…) to route to different agent namespaces and instances." The Agents SDK shipscreateAddressBasedEmailResolver("SupportAgent")as a drop-in. This is the email-tier realisation of one-to-one agent — the address is the DO-ID selector, same shape the SDK applies on the HTTP + WebSocket surface viarouteAgentRequest. See concepts/address-based-agent-routing, patterns/sub-addressed-agent-instance. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents) -
State persists across emails — the inbox is the agent's memory. "Because agents are backed by Durable Objects, calling
this.setState()means your agent remembers conversation history, contact information, and context across sessions. The inbox becomes the agent's memory, without needing a separate database or vector store." Extends concepts/agent-memory — fourth substrate alongside the DO-SQLite conversation trees (Project Think), per-tenant search indexes (AI Search), and Git-session repos (Artifacts). The email thread itself is the memory primitive — no additional store. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents) -
Secure reply routing is HMAC-SHA256 signed — per-instance replay + forgery protection. "When your agent sends an email and expects a reply, you can sign the routing headers with HMAC-SHA256 so that replies route back to the exact agent instance that sent the original message. This prevents attackers from forging headers to route emails to arbitrary agent instances — a security concern that most 'email for agents' solutions haven't addressed." The
inReplyTo: parsed.messageIdfield carries the HMAC signature across the email round-trip; the receive side verifies + routes. Canonical wiki instance of patterns/signed-reply-routing-header. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents) -
Email is accessible to agents running anywhere, not just Workers — three integrations. (a) Email MCP server on the Cloudflare MCP server (same Code Mode-powered surface) — any MCP-aware agent (Claude, Cursor, Copilot) can send emails with a prompt: "Send me a notification email at alex@example.com from my staging domain when the build completes." (b) Wrangler CLI —
wrangler email send --to … --from … --subject … --text …— discovers capabilities on demand via--help, sidestepping the MCP-context-window-bloat problem named in the Code Mode post ("tool definitions can consume tens of thousands of tokens before your agent even starts processing a single message"). (c) Email Service skill in the cloudflare/skills repo — drop-in guidance for coding agents covering bindings, REST API, SDKs, Email Routing config, Agents-SDK integration, Wrangler usage, deliverability, transactional-email craft. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents) -
Agentic Inbox — open-source reference app for the full inbound-classify-persist-reply pipeline. Cloudflare open-sources github.com/cloudflare/agentic-inbox — "a reference application with full conversation threading, email rendering, receiving and storing emails and their attachments, and automatically replying to emails. It includes a dedicated MCP server built-in, so external agents can draft emails for your review before sending from your agentic-inbox." Stack: Email Routing inbound + Email Sending outbound + Workers AI classification + R2 attachments + Agents SDK stateful agent logic. Deploy-to-Cloudflare button. Positioning: "Rather than every team rebuilding the same inbound-classify-reply pipeline, start with this reference application." Canonical wiki instance of patterns/inbound-classify-persist-reply-pipeline; sibling in the "dogfood the platform as a customer-facing product" 2026-04 Cloudflare launch cluster. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents)
-
Human-in-the-loop is load-bearing for email agents, not a future-work item. "During the private beta, we also experimented with email agents. It became clear that you often want to keep the human-in-the-loop element to review emails and see what the agent is doing. The best way to do that is to have a fully featured email client with agent automations built-in." Agentic Inbox ships with a built-in MCP server exactly so "external agents can draft emails for your review before sending." Same reasoning shape as Agent Lee's elicitation gate for write ops — email-tier gate is a drafts folder with agent access rather than a dashboard approval UI. (Source: sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents)
Architecture¶
Email Service — role in the Workers developer platform¶
┌─────────────────────────── Cloudflare Email Service ─────────────────────────┐
│ │
│ Email Routing (free, inbound) Email Sending (public beta, │
│ └─ route incoming mail to outbound, native binding) │
│ a Worker / address env.EMAIL.send(...) │
│ REST + TS/Python/Go SDKs │
│ wrangler email send CLI │
│ Email MCP server │
│ │
│ SPF / DKIM / DMARC auto-configured on domain attach │
│ │
└──────────────────────────────────┬───────────────────────────────────────────┘
│
┌─────────────┴─────────────┐
▼ ▼
┌─────────────────────┐ ┌─────────────────────┐
│ Workers handler │ │ Agents SDK onEmail │
│ export default { │ │ class Agent { │
│ async email() │ │ async onEmail() │
│ } │ │ this.sendEmail()│
└──────────┬──────────┘ └──────────┬──────────┘
│ │
│ ▼
│ ┌─────────────────────┐
│ │ Durable Object │
│ │ per agent instance │
│ │ (state = memory) │
└──────── route ──►└─────────────────────┘
Three surfaces for sending email from anywhere:
- Workers binding (env.EMAIL) — in-platform
- REST API + SDKs — any runtime, any language
- Wrangler CLI / Email MCP server — coding agents (Claude / Cursor / Copilot) running locally
Agent email pipeline — canonical shape¶
Inbound email → Email Routing → routeAgentEmail(message, env, { resolver })
│
createAddressBasedEmailResolver("SupportAgent")
│
address parse (support+ticket-123@domain)
│
selects DO instance
│
▼
SupportAgent extends Agent
│
async onEmail(email)
│
┌──────────────────┼──────────────────┐
▼ ▼ ▼
PostalMime.parse this.setState(...) kick off queue /
(postal-mime pkg) (persistent DO state) background task
│ │ │
└──────────────────┼──────────────────┘
│
▼
this.sendEmail({
binding: env.EMAIL,
inReplyTo: messageId, ← HMAC-signed headers
...
})
│
▼
reply → client inbox
│
replies route back to SAME DO instance
via signed inReplyTo → HMAC verify → DO-ID
Address routing topology¶
domain: your-agents.example
support@your-agents.example → SupportAgent instance "support"
support+ticket-123@your-agents.example → SupportAgent instance "ticket-123"
sales@your-agents.example → SalesAgent instance "sales"
billing+invoice-456@your-agents.example → BillingAgent instance "invoice-456"
Each +sub segment selects a distinct DO instance inside the same agent class.
Each local-part (without +) selects a distinct agent class + default instance.
Agentic Inbox — reference-app stack¶
┌─────────────── Agentic Inbox (github.com/cloudflare/agentic-inbox) ─────────┐
│ │
│ Email Routing (inbound) ──► Worker handler │
│ │ │
│ Workers AI (classify) │
│ │ │
│ Agents SDK / Durable Objects │
│ │ │
│ ┌──────────────────────────────┼───────────────────────────────┐ │
│ ▼ ▼ ▼ │
│ R2 (attachments) Embedded MCP server Email Sending │
│ (external agents draft drafts) (outbound reply) │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Deploy-to-Cloudflare button for one-click setup.
Systems, concepts, and patterns extracted¶
Systems (new)¶
- systems/cloudflare-email-service — Cloudflare's bidirectional email primitive: Email Routing (free, inbound) + Email Sending (public beta, outbound) with native Workers binding, REST API + TS/Python/Go SDKs, Wrangler CLI, and a dedicated MCP server; auto-configured SPF/DKIM/DMARC on domain attach.
- systems/agentic-inbox — Cloudflare's open-source reference email-client-plus-agent application; stitches Email Routing + Email Sending + Workers AI + R2 + Agents SDK; built-in MCP server for external agents to draft for review.
Systems (extended)¶
- systems/cloudflare-agents-sdk — email-native additions:
onEmailhook,sendEmail({ binding, inReplyTo, … }),routeAgentEmail+createAddressBasedEmailResolver+ sub-addressing; email + state + async reply composed around a per-instance DO. - systems/cloudflare-workers — new
EMAILbinding (alongsideai,durable_objects,ai_search_namespaces);email(message, env)handler on the default export. - systems/cloudflare-durable-objects — email-tier realisation of "one DO per caller-identified unit"; per-address DO; state is the inbox memory substrate; HMAC-signed reply headers make reply-to-instance routing safe.
- systems/workers-ai — classification role inside the Agentic Inbox stack (inbound email → Workers AI classifier).
- systems/cloudflare-r2 — attachment-store role inside Agentic Inbox.
- systems/model-context-protocol — new Email MCP server on the Cloudflare MCP surface; plus Agentic Inbox's own built-in MCP server for draft-for-review workflows.
- systems/wrangler-cli — new
wrangler email sendsubcommand for agents running on bash-capable sandboxes.
Concepts (new)¶
- concepts/email-as-agent-interface — framing thesis: email is a bidirectional agent interface (not just a notification sink) because (a) ubiquity, (b) tolerates async-reply latency, (c) threading + attachments + identity are already first-class, (d) no custom SDK per channel.
- concepts/address-based-agent-routing — encode the target agent class + instance in the email address itself (local-part → class;
+sub→ instance / namespace). The DO-ID selector is the address parser. Email-tier analog of URL-path-based agent routing. - concepts/asynchronous-reply-email — a reply that arrives seconds, minutes, or hours after the inbound message, with no open session in between. The feature of the inbox substrate that makes it an agent channel rather than a chatbot channel.
Concepts (extended)¶
- concepts/agent-memory — fourth substrate: the email thread itself (with DO-persisted state keyed by address) is a memory primitive; sits alongside DO-SQLite conversation trees, per-tenant AI Search indexes, and per-session Artifacts repos.
- concepts/one-to-one-agent-instance — email-address-as-DO-ID is another channel's realisation of the same shape AI Search (namespaces), Artifacts (per-repo DO), and Agents SDK (per-session DO) already use.
Patterns (new)¶
- patterns/signed-reply-routing-header — HMAC-SHA256-sign the reply-routing headers (
inReplyTo, Message-ID envelope) when an agent sends email; on inbound, verify signature to determine destination agent instance; reject unsigned / tampered replies. Prevents attackers forging headers to route replies to arbitrary instances. - patterns/sub-addressed-agent-instance — use RFC-5233 plus-sub-addressing (
local+sub@domain) so the address-based resolver can route to a specific per-conversation / per-ticket / per-namespace agent instance inside the same agent class, without provisioning separate mailboxes. - patterns/inbound-classify-persist-reply-pipeline — canonical agent-email shape: receive (Email Routing) → parse (PostalMime) → classify (Workers AI or LLM) → persist (DO state, Queue message, or background task) → reply or escalate (Email Sending, optionally after long async work) — all inside a single
Agentclass.
Patterns (extended)¶
- patterns/default-on-security-upgrade — SPF/DKIM/DMARC auto-configured on domain attach is another Cloudflare shape of "hard crypto/auth config absorbed into the platform, default-on" — sibling to Universal SSL, post-quantum rollout, Zero Trust defaults.
Operational numbers & limits¶
Public-beta launch post — few hard numbers disclosed:
- Email Sending: graduates from private beta to public beta on 2026-04-16.
- Email Routing: free, "been free and available for years."
- Pricing for Email Sending: not detailed in this post; the 2025 Birthday Week announcement is cited as "the full deep dive on Email Sending."
- Supported SDK languages: TypeScript, Python, Go.
- MCP context-window footprint: explicitly called out as a pain point; Wrangler CLI path is the "near-zero context overhead" alternative where agents have bash access.
- Agentic Inbox: released 2026-04-16 as an open-source GitHub repo with a Deploy-to-Cloudflare button.
Qualitative claims:
- "Your emails are authenticated and delivered, not flagged as spam" (SPF / DKIM / DMARC managed on Cloudflare's side).
- "Emails are delivered with low latency anywhere in the world" (global network assertion — no p50 / p99 numbers).
- "Each agent gets its own identity from a single domain" via address-based resolver + sub-addressing.
Caveats¶
- Public-beta product. No SLA, no availability guarantees, no published deliverability metrics.
- No per-channel deliverability numbers. "Your emails are authenticated and delivered, not flagged as spam" is asserted, not measured. No inbox-placement-rate / spam-folder-rate data published.
- Pricing for Email Sending not re-stated. Post defers to the earlier Birthday Week post for the pricing deep-dive — this announcement surfaces only the public-beta graduation + the agent-toolkit additions.
- HMAC-signing scheme not specified. Post names HMAC-SHA256 as the algorithm but does not publish the canonical signed-string template, key-derivation, rotation, or how verification handles replay / clock skew.
- No production numbers from the private-beta cohort. The post names categories (customer support, invoice processing, account verification, multi-agent workflows) but publishes no volume, latency, error-rate, or escalation-rate data from private-beta customers.
- Agent-harness context-window savings via Wrangler CLI are argued, not measured. "Tool definitions can consume tens of thousands of tokens before your agent even starts processing a single message" is cited from the earlier Code Mode post — no before/after token counts for the Email MCP server + Wrangler CLI split specifically.
- Agentic Inbox is a reference, not a production-scale case study. No user count, no message volume, no inbox-state-size numbers. Positioned as a starter template to fork.
- Human-in-the-loop reviewing mechanism is described at architecture level only. "External agents can draft emails for your review before sending" — no detail on review-queue semantics, expiry, revoke, multi-reviewer.
- No cross-provider comparison. No positioning vs SendGrid, Postmark, Mailgun, Amazon SES, Resend, or on the inbound side vs Mailgun Routes, Postmark Inbound, SES rules.
- Email + multi-region / GDPR posture not discussed. Where email is stored, processed, replied from — not surfaced in this post.
routeAgentEmailauth-boundary surface not detailed. The resolver routes inbound mail to a DO instance by address — but how it handles spoofedFrom:addresses, SPF-failed-but-well-formed, DKIM-broken, reply-chain hijacks beyond the HMAC reply-routing hint is not published here.
Source¶
- Original: https://blog.cloudflare.com/email-for-agents/
- Raw markdown:
raw/cloudflare/2026-04-16-cloudflare-email-service-now-in-public-beta-ready-for-your-a-405a564e.md
Related¶
- sources/2026-04-15-cloudflare-project-think-building-the-next-generation-of-ai-agents — the successor to the Agents SDK; email is another surface Project Think's primitives (durable fibers, sub-agents, Persistent Sessions) will eventually orchestrate over.
- sources/2026-04-15-cloudflare-introducing-agent-lee — elicitation gate for approving agent writes on the dashboard tier; Agentic Inbox's "draft for review" MCP is the email-tier analog.
- sources/2026-04-16-cloudflare-ai-search-the-search-primitive-for-your-agents — same-week Agents-Week launch; email is the I/O surface, AI Search is the retrieval surface, Durable Objects is the state surface.
- sources/2026-04-16-cloudflare-artifacts-versioned-storage-that-speaks-git — same-week Agents-Week launch; Git-repo-per-session is the filesystem-memory substrate, email-thread-with-DO-state is the conversation-memory substrate.
- sources/2026-04-20-cloudflare-internal-ai-engineering-stack — internal dogfood of the customer-facing primitives; email-agent tooling is the newest primitive added to that stack.
- systems/cloudflare-email-service / systems/agentic-inbox — entities introduced by this post.
- concepts/email-as-agent-interface / concepts/address-based-agent-routing / concepts/asynchronous-reply-email — concepts introduced.
- patterns/signed-reply-routing-header / patterns/sub-addressed-agent-instance / patterns/inbound-classify-persist-reply-pipeline — patterns introduced.