We raised $6M in Seed FundingRead more
+
+
+
+
+
+
+
+
Blog/Engineering

AgentMail vs Amazon SES for AI Agents [2026 Comparison]

BPBinoy Perera

Two email APIs evaluated for AI agent infrastructure: supported architecture, code for the full send-and-receive loop, and where each one is the right fit.

Guide
Engineering
agentmail
amazon ses
email api
ai agents
+2

TL;DR

Amazon SES is general-purpose outbound email. It launched in January 2011 and is built around per-email pricing at $0.10 per 1,000 messages. Receiving exists, but as a routing primitive that hands raw MIME to S3 buckets or Lambda functions, not as an inbox.

AgentMail is built for AI agents. SES is a send pipeline: you hand it an envelope, it delivers the envelope. An inbox is everything after that: threads that group related messages, messages that carry attachments, labels that organize threads, and the storage and routing underneath it all. The unit in AgentMail is the inbox itself: a real address with persistent storage, threading, scoped API keys, webhooks, and an MCP server. Provisioning is one API call.

For an agent that sends, receives, threads, and responds, the question is what the platform handles versus what the team builds and maintains.

When SES is the right call

Pick SES if any of the following describes the use case:

  • Send-only workloads. Password resets, transactional notifications, marketing broadcasts. No inbound, no threading, no replies to parse.
  • The team is fluent in AWS. SES doesn't require an all-AWS stack, but the receive pipeline leans on Lambda, S3, and DynamoDB, so it fits best when those are already part of daily work.
  • Volume is in the millions of messages per month. SES per-email pricing is the lowest among mainstream providers.
  • An inbox abstraction is not part of the requirement. Receiving as raw MIME in S3 is acceptable.

When AgentMail is the right call

Pick AgentMail if any of the following describes the use case:

  • The agent needs two-way email: send, receive, parse, thread, respond.
  • Each agent or tenant needs a scoped identity (own address, own API key, isolated data).
  • The team prefers a managed inbox layer over building one on top of S3, Lambda, and a database.
  • The agent uses MCP or webhook-driven workflows.
  • The team wants full inbox functionality, threads, labels, and attachments through a clean REST API, rather than assembling it across the AWS SDK.
  • The agent is built on a coding platform like OpenClaw or Hermes.
  • Receiving needs to work in any AWS region.

What each one is built for

Amazon SES launched in January 2011 as a high-volume sending service from inside AWS. The receive flow was added through receipt rules that route incoming mail to one of three downstream actions: an S3 bucket, an SNS topic, or a Lambda function. There is no inbox object in SES. Each incoming message lands as raw MIME, and the customer is responsible for parsing, storage, and threading.

AgentMail is built around the inbox as the primitive. Each inbox has its own address, a persistent message store, automatic threading, webhooks, and WebSockets. Inboxes can be grouped into Pods that isolate one tenant from another.

The agent loop

An AI agent that uses email for work runs through a consistent set of operations end-to-end. Mapping each step to what each provider handles natively:

Step in the agent loopAmazon SESAgentMail
Send outbound messageNativeNative
Receive inbound messageNative (raw MIME to S3, SNS, or Lambda)Native (webhook, WebSocket)
Parse content and attachmentsNot included — requires a MIME parser plus custom logic for attachment extractionBuilt in
Thread reply against conversationCustomer-built (Message-ID parsing, DB)Built in
Store conversation historyCustomer-built (S3 + database)Built in
Respond in-threadNative send, customer-built threadingNative threaded reply API
Stable identity per agentIAM + verified domain (no inbox primitive)Inbox is the identity

SES handles two of those seven steps. The rest sit on the customer's side.

What an AgentMail subscription buys

  • Engineering time you don't spend. Building a working receive pipeline on SES (receipt rules, Lambda parser, DynamoDB schema for threading, retry and replay logic, webhook fan-out) is a project that has to happen before the agent runs, plus ongoing maintenance. AgentMail collapses that work into one API call to provision the inbox and a webhook URL to receive events.
  • Time to first inbox. Provisioning an AgentMail inbox is one API call. Provisioning the SES equivalent (verified sending domain, S3 bucket, receipt rule, Lambda, database, IAM policies) is configuration across several AWS services that has to be set up before the first message can be received and processed.
  • Architectural fit. The inbox-as-primitive matches what an agent needs: a stable identity with its own address, history, and scoped credentials. SES doesn't have an inbox primitive. Building one on top of SES is doable but is building.
  • Multi-tenant scale-out. AgentMail's Inbox Pods isolate tenant data by default and let API keys scope to a specific pod. The SES equivalent is per-tenant S3 buckets or prefixes, per-tenant database scoping, per-tenant IAM policies, and offboarding cleanup across all of the above.
  • What's bundled. MCP server for agent integrations, signed webhooks, suppression list, dedicated IPs (Startup and above), SOC 2 Type II reporting (Startup and above). On SES, each of these is either build-it-yourself, buy-from-a-separate-service, or inherit-from-the-AWS-account.

Code: the full agent loop

The send call looks similar on both. The receive flow does not.

AgentMail

from agentmail import AgentMail
from agentmail.inboxes.types import CreateInboxRequest

client = AgentMail(api_key="your_api_key")

# Provision an inbox
inbox = client.inboxes.create(
    request=CreateInboxRequest(username="sales-agent")
)

# Send the first email
client.inboxes.messages.send(
    inbox_id=inbox.inbox_id,
    to=["lead@example.com"],
    subject="Quick question",
    text="Hi Alex, saw your post about email infrastructure..."
)

# Webhook handler for inbound replies
def on_inbound_email(payload):
    message_id = payload["message"]["message_id"]

    client.inboxes.messages.reply(
        inbox_id=inbox.inbox_id,
        message_id=message_id,
        text="Thanks for getting back. To answer your question..."
    )

Amazon SES

The send is similar in size. The receive code below assumes the surrounding AWS configuration is already in place: verified sending domain, S3 bucket, SES receipt rule, Lambda function, DynamoDB tables, IAM policies.

import boto3, email

ses = boto3.client('ses', region_name='us-east-1')
s3 = boto3.client('s3')

# Send
ses.send_email(
    Source='sales-agent@yourdomain.com',
    Destination={'ToAddresses': ['lead@example.com']},
    Message={
        'Subject': {'Data': 'Quick question'},
        'Body': {'Text': {'Data': 'Hi Alex...'}}
    }
)

# Lambda triggered when an inbound email lands in S3
def lambda_handler(event, context):
    bucket = event['Records'][0]['s3']['bucket']['name']
    key = event['Records'][0]['s3']['object']['key']

    raw = s3.get_object(Bucket=bucket, Key=key)['Body'].read()
    msg = email.message_from_bytes(raw)

    # Parse threading headers manually
    message_id = msg.get('Message-ID')
    in_reply_to = msg.get('In-Reply-To')
    references = msg.get('References', '')

    # Look up thread state in DynamoDB
    # ...query, conversation reconstruction...

    # Build reply with proper threading headers
    # ...attach In-Reply-To and References...
    # ...send via ses.send_raw_email()...

    # Persist new message
    # ...DynamoDB write...

    # Search requires a separate index pipeline if needed
    # ...OpenSearch or Pinecone, kept in sync...

The SES code above is incomplete because the surrounding AWS configuration is not part of the API call. That configuration is the project AgentMail collapses into the inbox creation step.

Identity and multi-tenancy

For a multi-tenant agent product, the structural difference matters more than per-email cost.

On SES, the unit of identity is the AWS account and the verified sending domain. Multi-tenant isolation requires per-tenant S3 buckets or prefixes, per-tenant database schemas or row-level scoping, per-tenant IAM policies, and offboarding cleanup across all of the above.

On AgentMail, each inbox is the unit of identity. Inboxes group into Pods, which isolate tenant data by default. API keys can be scoped to a specific pod, so a credential leak in one tenant's environment cannot reach another's mail.

Migrating from SES to AgentMail

Send side: close to a drop-in replacement. boto3.client('ses').send_email becomes client.inboxes.messages.send with similar arguments.

Receive side: the larger change, and the larger savings. The S3 bucket, Lambda parser, database threading logic, and any search indexing pipeline get retired in favor of a webhook endpoint that handles AgentMail's inbound events.

Custom domains: AgentMail DNS records can run in parallel with SES records during the transition. Both providers operate concurrently while the migration completes.

Frequently asked questions

Can a custom domain be used with AgentMail? Yes, on the Developer plan and above. DNS records (SPF, DKIM, DMARC) are added the same way as for SES.

How does AgentMail handle attachments? Attachments are stored alongside messages and parsed automatically for text content where possible.

What about deliverability? Optimized shared IPs are included on all paid plans. Dedicated IPs are available on Startup and above. SPF, DKIM, and DMARC are configured per custom domain. A suppression list is maintained automatically.

How does AgentMail handle multi-tenant isolation? Inbox Pods. A pod groups inboxes for a single tenant and isolates their data. API keys can be scoped to a specific pod.

What frameworks does AgentMail work with? The Python and TypeScript SDKs work in any agent framework. AgentMail also ships an MCP server, which lets MCP-compatible agents (Claude, Cursor, OpenClaw, Hermes, others) use it as a tool.

Is AgentMail SOC 2 compliant? Yes, SOC 2 Type II. Full SOC 2 report available on Startup and above, or by request.

Can SES and AgentMail run in parallel during a migration? Yes. DNS supports both providers concurrently. New agents can move to AgentMail while existing SES workflows continue to operate.

Does AgentMail offer inbound filtering and prompt-injection protection? Yes. Allowlists and blocklists can be configured per inbox to filter senders before they reach the agent. Combined with per-inbox API keys, this limits the blast radius of an injected message.

Is AgentMail cheaper than Amazon SES? On a per-email basis, SES is usually lower cost. AgentMail's value is engineering time saved, faster time to first inbox, and the bundled inbox layer — storage, threading, identity, and multi-tenant isolation — that SES leaves to the customer to build.

Where is SES email receiving available? SES email receiving is supported in a subset of AWS regions, not all of them. Sending is available in more regions than receiving.

Choosing between them

Amazon SES is the right call for send-only workloads, AWS-native teams, and high-volume outbound. AgentMail is the right call for AI agents that send and receive, multi-tenant agent products, and teams that prefer a managed inbox layer over building one.

The Free plan provisions real inboxes with full sending and receiving. No credit card required.

AgentMail gives your agents real inboxes. Create inboxes via API. Send and receive Emails with 0 complexity. Free to start.

Ready to build? Start integrating AgentMail into your AI agents today.

© 2026 AgentMail, Inc. All rights reserved.

Privacy PolicyTerms of ServiceSOC 2Subprocessors