Summarize this article
Table of contents
Get insights delivered straight into your inbox every week!

AgentMail API: Here’s Everything You Need To Know

If you’re looking into the AgentMail API, you’re probably trying to figure out whether it can power email for AI agents in a reliable way. 

As a founder, you want to know how inboxes are created, how messages are sent and received, what’s automated, and how much engineering work you actually need to do.

In this breakdown, we explain how the AgentMail API works, what features it provides out of the box, how it compares to traditional email systems, and what types of agent use cases it supports. 

By the end, you’ll know whether the AgentMail API fits your product roadmap before you commit engineering time.

Key Takeaways

  • AgentMail is an email provider built only for AI agents that need to send, receive, and reply to emails through code.

  • With AgentMail, you create agent inboxes using a username and domain via the API

  • AgentMail is not designed for traditional cold email outreach or human-managed inbox workflows.

  • Mailforge is a best alternative for running cold email outreach with people managing campaigns.

  • Mailforge focuses on fast setup, automated DNS, and deliverability, making it easier to scale cold email.
Use Mailforge to get cold email ready fast, without dealing with technical setup.

What Is AgentMail?

AgentMail is an email provider that lets AI agents send, receive, and reply to emails using an API.

Agentmail home page 
This image shows the Agentmail homepage 

Each agent gets its own inbox.. Once it is set up, the agent can read emails, send replies, and continue email conversations without opening a normal email app.

AgentMail also handles the basic email setup needed to send messages. It supports SPF, DKIM, and DMARC, so email identities work without extra steps.

AgentMail API Overview

AgentMail API lets AI agents create inboxes and work with emails. 

Agentmail API sending message example
This image shows the Agentmail API sending message example

You start by creating an inbox using a username and a domain.

Once the inbox is ready, it can send emails, receive messages, and reply to existing emails.

Each action is done by calling the API with details like the inbox ID and message ID.

The flow is simple. An inbox is created first.

That inbox is then used to send emails or reply within the same conversation.

Messages stay grouped in threads, so agents can continue the discussion.

AgentMail can be used with different SDKs and tools:

  • JavaScript
  • Python
  • cURL
  • LangChain
  • OpenAI SDK

All parts of AgentMail work through the API.

There is no inbox to open in a browser.

Inboxes, messages, and replies are all managed through code.

Core Email Capabilities

Here is what you can do with AgentMail API: 

Create inboxes for agents

Creating an inbox in AgentMail through API
This image shows the Creating an inbox in AgentMail through API

You can create inboxes for agents using the API. Each inbox belongs to one agent and is used for all email activity.

Send emails

sending email in AgentMail through API
This image shows the sending email in AgentMail through API

Agents can send emails from their inbox.

Sending is done through the API using the inbox details.

Receive emails

Receive email in agentmail
This image shows the Receive email in agentmail

When someone sends an email to an agent inbox, it is received through the API.

Agents can read these incoming emails using code.

Reply to emails

Replying email in AgentMail
This image shows the Replying email in AgentMail

Agents can reply to emails using the same inbox.

Replies stay linked to the original email.

Email conversations (threading)

Threading in Agentmail
This image shows the Threading in Agentmail

AgentMail keeps emails grouped as conversations. This helps agents continue the same email discussion without starting over.

Store email data

AgentMail stores email data without a fixed time limit.

Inboxes, messages, and conversations remain available through the API.

These are the main email actions AgentMail API supports.

Deliverability and Email Identity Setup

Here is how AgentMail handles email delivery and agent email identities.

Email delivery setup

AgentMail provides global, fault-tolerant email delivery.

This means email sending and receiving are handled at a global level and are designed to keep working even during issues.

AgentMail also includes built-in support for:

  • SPF

  • DKIM

  • DMARC

These are applied automatically to agent inboxes.

You do not need to set them up separately for each inbox.

Email delivery is part of the API flow.

Once an inbox is created, sending and receiving emails works through the API without extra setup.

Agent email identities

Each agent gets its own email identity.

This identity is used whenever the agent sends or receives an email.

AgentMail does not use MFA or OAuth flows for these identities.

Agents work with email directly through the API.

This means email identities are fully managed through code, not through a human inbox or login screen.

Custom domains for agents

AgentMail allows you to use custom domains for agent inboxes.

This lets you:

  • Create agent email addresses using your own domain

  • Manage domains as part of the API setup

Domains and inboxes are created and used programmatically, without a separate email interface.

Overall, AgentMail combines delivery and identity into the API, so agents can send and receive emails without manual configuration.

Developer Experience and Integrations

This section focuses on how developers access AgentMail API and how it fits into existing tools.

API design and access

AgentMail API is designed to be simple to use.

Agentmail API authentication
This image shows the Agentmail API authentication

Access to the API is done using API key authentication.

Once the API key is added, developers can start making requests to create inboxes and work with emails.

AgentMail also supports:

  • Webhooks, to receive updates when email events happen

  • WebSockets, to work with email data in real time

These options allow AgentMail to stay connected with agent systems as emails are sent and received.

SDKs and framework support

AgentMail provides multiple ways to work with the API, depending on the setup you are using.

It supports:

  • Node.js SDK

  • Python SDK

  • cURL, for direct API requests

AgentMail also works with agent and AI frameworks, including:

  • LangChain

  • LlamaIndex

  • CrewAI

  • OpenAI SDK

This makes it easier to plug email into agent workflows without changing the existing tool stack.

What You Can Build With AgentMail API

AgentMail API can be used when agents need to handle cold emails on their own.

Sales development agents for cold email

AgentMail shows sales development agents as a clear use case.

These agents use email to reach out to leads and follow up with them.

With the API:

  • Each sales agent can have its own inbox

  • Emails are sent directly from that inbox

  • Replies come back to the same conversation

  • Agents can continue the email thread without manual work

This makes it possible for agents to handle cold email conversations from start to follow-up using code.

Customer-facing cold email workflows

Customer support agents can also be used in cold email-style flows.

Agents receive emails, read the message, and send replies through the same thread.

This works well when email conversations need to stay organized and handled automatically.

Multiple agents running cold outreach

AgentMail supports setups where many agents are active at the same time.

Each agent can have:

  • Its own inbox

  • Its own email identity

Agents can send emails in parallel and manage their own conversations through the API.

Scale and Usage Model

This section explains how AgentMail scales as usage grows.

Scaling inboxes

As you add more agents, you can create more inboxes through the API.

Each inbox belongs to a single agent and works independently.

Inbox creation follows the same API flow, even as the number of inboxes increases.

Scaling email activity

When email volume grows, agents continue to send, receive, and reply using the same API calls.

There is no separate setup needed when email activity increases. The workflow stays the same.

Running multiple agents

AgentMail supports setups where many agents run at the same time.

Each agent has:

  • Its own inbox

  • Its own email identity

  • Its own email conversations

All agents operate through the same API structure.

AgentMail Pricing

AgentMail offers simple pricing plans that grow as your number of agent inboxes increases.

Free – $0/month

Includes 3 inboxes, up to 3,000 emails per month, and 3 GB storage.

Developer – $20/month

Includes 10 inboxes, up to 10,000 emails per month, 10 GB storage, and 10 custom domains + email support.

Startup – $200/month

Includes 150 inboxes, up to 150,000 emails per month, 150 GB storage, 150 custom domains, dedicated IPs, SOC 2 report, and Slack channel support.

Enterprise – Custom pricing

Includes everything in Startup plus custom email volume pricing, white-label platform, your own cloud deployment, and OIDC/SAML SSO.

How AgentMail Compares to Traditional Email APIs

When you compare AgentMail with traditional email APIs, the key difference is who the email system is meant to work for.

AgentMail is built around AI agents using email through code.

Traditional email APIs are usually built either for people using inboxes or for applications sending emails.

This changes how inboxes are created, how emails are handled, and what email is actually used for.

This table explains that clearly.

AgentMail API vs Gmail-Style Email APIs

AgentMail API vs Gmail-style Email APIs
What you’re comparing AgentMail API Gmail-style Email APIs
Who should handle email Email is handled by your agents Email is handled by you or your team
How inboxes come in You create inboxes using the API for each agent Inboxes already exist for user accounts
Reading emails Emails are read inside your agent logic Emails are read inside the inbox UI
Sending emails Emails are sent by agents using API calls Emails are sent manually from the inbox
Getting replies Replies flow back into the agent workflow Replies show up in your inbox
Sending replies Replies are sent by the agent and stay in the thread Replies are typed and sent manually
Following conversations Threads are handled programmatically Threads are viewed and managed by people
Email identity Each agent has its own email address Each user account has its own address
Accessing email There’s no inbox to open You must log in to access email
Authentication Access is done with an API key OAuth and user login are required
Custom domains You can use custom domains for agent inboxes You can link custom domains to user accounts
Best fit when You want email to run on its own through agents You want people to read and manage email

Limitations and Considerations of AgentMail

This is where AgentMail can feel limiting:

AgentMail vs Mailforge: Choosing the Right Email Infrastructure

Mailforge is a cold email infrastructure platform built to help teams send cold emails at scale with good deliverability.

It focuses on the infrastructure layer of cold email. This includes:

  • Creating many domains and mailboxes

  • Automated setup of SPF, DKIM, and DMARC

  • Shared IP infrastructure made for cold outreach

  • Quick setup, usually within minutes

  • Working with Salesforge and other sending software

Mailforge is for human-led cold email workflows, where sales teams or agencies manage outreach, replies, and follow-ups.

Agentmail vs Mailforge comparison table: 

Limitations
Pros Cons
  • No inbox or dashboard for checking emails — everything must be handled through code
  • Cannot be used without developers; setup requires API keys, domains, and coding
  • Supports only a few programming languages (Python and Node.js)
  • Limited control and visibility over how emails are sent
  • Custom domains require manual DNS setup (SPF, DKIM, DMARC)
  • Not ready for strict enterprise checks (SOC 2 Type I only, no Type II yet)

Conclusion

AgentMail is designed for systems where email is handled by AI agents.

It works well when inboxes, messages, and replies are part of an automated agent flow.

At the same time, AgentMail follows an API-only approach.

There is no inbox to open, no visual dashboard, and no built-in reporting.

This means it fits better in developer-led setups where email does not need human handling.

For cold email use cases, where people manage outreach, domains, and mailboxes, the requirements are different.

In those setups, infrastructure tools like Mailforge which supports human-managed cold email workflows with infrastructure built for deliverability. 

Use Mailforge! Get cold email infrastructure ready in minutes, with domains, mailboxes, and deliverability handled for you.