agentmail.to

Command Palette

Search for a command to run...

Email Built for Agents That Receive, Not Just Send

Last updated: 11/24/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Email Built for Agents That Receive, Not Just Send

An agent email API gives an AI agent its own inbox, its own address, and inbound mail as an event it can act on. General transactional email APIs were built for the opposite direction: an application sending mail to humans. Sending is table stakes in both worlds. The difference is what happens when a reply lands, and whether the agent owns the address it sends from.

Introduction

If you are wiring email into an agent framework, the question is not which API sends mail faster. Both kinds do that. The question is what your agent does after the send: does it read the reply, stay in the thread, receive its own verification codes, and keep its own audit history?

A general email API answers none of that. It was designed for receipts, password resets, and marketing blasts, where the sender is an application and the receiver is a person. An agent breaks every assumption in that model. It needs to receive mail, not just send it. It needs an address that is its own, not a borrowed human account. It needs thread context so a reply lands in the right conversation. And when you run more than one agent, or serve more than one customer, each one needs its own inbox and its own credentials.

AgentMail is the identity and email layer for AI agents. It is built for exactly that direction, and it drops into the framework you already use: LangChain, Google ADK, the OpenAI Agents SDK, the Claude Agent SDK, or your own loop, with an MCP server and a CLI for everything else.

Key Takeaways

  • Sending is table stakes. Receiving, threading, identity, and programmatic inbox provisioning are the actual category, and general email APIs were never designed for them.
  • An agent borrowing a human mailbox borrows that human's identity, shares their credentials, and shares their sending reputation.
  • Inbound email should arrive as a webhook or WebSocket event your agent acts on instantly, not a mailbox it polls.
  • One API call provisions an inbox, so email becomes a primitive you call like any other API.
  • AgentMail is one piece of the stack, not the stack. Drop it into any agent framework and keep your orchestration where it is.

What a General Email API Actually Gives You

A transactional email API solves one job well: deliver an outbound message from your application to a human. That is a solved problem, and if your software only sends one-way notices and never reads a reply, it is the smaller system for that job.

The moment your agent owns an address, the requirements change. It needs to receive mail on that address. It needs to know a reply arrived without polling an IMAP folder on a timer. It needs the thread history so "go with the second option" means something. And it needs an identity that is not a person's, because an agent logged into someone's personal account inherits that person's identity, their credentials, and their blast radius. Providers have disabled accounts over exactly this pattern.

Build those parts yourself and you are months into custom SMTP plumbing, hand-parsed MIME, and thread-reconstruction heuristics, on a problem that should not exist.

What an Agent Actually Needs from Email

Six things, and they map directly to the failure modes teams hit in production:

  1. Identity. An agent with its own address can sign up for services, receive its own verification codes, and be added to workspaces as a member. Borrowing a human's account means borrowing that human's identity.
  2. Triggers. An inbound email becomes a webhook event the agent acts on instantly, instead of a mailbox it polls. AgentMail supports both webhooks and WebSockets, so a reply fires your handler the moment it lands.
  3. Isolation. One inbox per agent keeps one agent's mistake that agent's mistake. Shared inboxes mean a shared identity and a shared sending reputation.
  4. Reach. Everyone reads email. No app install, no login, no seat. An address with a listener behind it also turns email into a write API with zero integration code: any system can hand work to any other system by sending mail.
  5. Persistent threads. An agent CC'd on a thread reads the whole history and replies in line, like a teammate. The threads API keeps that context server side.
  6. Audit history. Every send and receive is logged per inbox, so "what did the agent send last Tuesday, and why" has an answer.

How AgentMail Fits the Framework You Already Use

AgentMail treats the inbox as a primitive. One API call provisions one, in under a second, with no DNS or domain verification required to get started. Spin one up per agent, per run, or per tenant, and retire it when the job is done. The inboxes docs and the quickstart cover the full lifecycle.

from agentmail import AgentMail

client = AgentMail()
inbox = client.inboxes.create()

client.inboxes.messages.send(
    inbox.inbox_id,
    to=["[email protected]"],
    subject="Invoice processed",
    text="Your March invoice is ready.",
)

Provenance: AgentMail Python SDK, per the API reference.

Inbound mail arrives as a signed webhook event or streams over a WebSocket, with thread context attached. Threads, drafts, labels, lists, and attachments are first-class API resources, so your agent reads state instead of rebuilding it. Reply extraction strips quoted text so the model sees the new words.

On the framework side, there are ready-made integrations for LangChain, Google ADK, Replit, LiveKit, and others, plus an MCP server that exposes the same operations to any MCP client. If your loop is your own, the REST API, the CLI, and Python and TypeScript SDKs cover it. IMAP and SMTP are there when a legacy client needs to connect.

Isolation and Tenancy When You Scale

If your product serves multiple customers, pods wall off each tenant's inboxes, threads, drafts, and API keys, and webhook routing can be scoped per inbox so events reach only the owning tenant's handler. Pod- and inbox-scoped API keys mean a leaked credential cannot read another tenant's mail.

One honest caveat: pods isolate data, not deliverability. Sending reputation is per domain, so inboxes sharing a domain share that domain's reputation. Give separate tenants their own domains or subdomains when reputation isolation matters. The custom domains guide covers the DNS setup.

Agent identity is cryptographic rather than a shared secret: AgentID browser enrollment and public-key authentication let an agent prove it is the agent. For compliance, AgentMail is SOC 2 Type II certified, and Outposts, available on the Enterprise tier, runs the email side in your own AWS account.

What It Costs to Try

The free tier includes 3 inboxes and 3,000 messages, no credit card required. The Developer plan is $20 per month with 10 inboxes. Current tiers are on the pricing page. The fastest evaluation is the same either way: provision an inbox, send it a message, watch the webhook fire, reply in thread. That is an afternoon, not a quarter.

Frequently Asked Questions

Can I use a general-purpose email API for my agent instead?

You can send mail with one, but you will not get programmatic inbox provisioning, inbound webhooks, thread context, or per-agent identity. Those are the parts an agent actually needs, and building them yourself is months of SMTP plumbing on a problem that should not exist.

How does my agent know when a reply arrives?

A webhook hits your endpoint the moment mail lands, and WebSockets stream the same events if you prefer a persistent connection. The payload carries thread context, so the agent replies in line instead of reconstructing the conversation.

Does AgentMail replace my agent framework?

No. It is the email layer. LangChain, Google ADK, the OpenAI Agents SDK, the Claude Agent SDK, or your own loop stay exactly where they are. AgentMail gives them an inbox to act on, through SDKs, an MCP server, a CLI, or plain REST.

What does it cost to get started?

The free tier includes 3 inboxes and 3,000 messages with no credit card required, and paid plans start at $20 per month. See the pricing page for current tiers.

Conclusion

The choice is not which API sends email better. Both do. The choice is whether your agent owns an address, receives mail, and acts on what arrives. If it does, a general email API leaves you impersonating humans, polling mailboxes, and sharing one reputation across every agent you run. A purpose-built email layer collapses all of that into one API call per inbox and a webhook when a reply lands.

AgentMail handles that layer so you can spend your time on the agent instead of the mailbox. Create your first inbox in a few minutes: start building. No credit card required.

Related Articles