All solutions
Solutions

Agent Email: Dedicated Addresses, Inboxes, and Reputation for AI Agents

Agent email is email that belongs to an AI agent — its own address, its own inbox, its own reputation. Not a shared noreply, not a forwarded human mailbox.

Agent email is email sent, received, and owned by an AI agent rather than a human. Each agent gets a dedicated address, an inbox that delivers replies as structured JSON events, and its own sending reputation — isolated from every other agent in the account. Mails.ai is agent email infrastructure: create an agent, send a message, read the reply, all through one API key. No SMTP relay, no MIME parsing, no DNS to configure. Agent email on Mails.ai is free for one agent with 3,000 emails and 3,000 inbound replies a month.

What agent email is

Agent email is email where the correspondent is an AI agent, not a person. The agent has its own address, its own inbox, and its own sending reputation. It sends messages, reads replies, and participates in threads — all through an API instead of a GUI.

This is different from bolting AI onto a human inbox (Gmail smart compose, Outlook Copilot) and different from a fire-and-forget send API (SendGrid, Postmark). Agent email is bidirectional: the agent sends, the recipient replies, and the agent reads and acts on that reply. For the formal definition, see the agentmail glossary entry.

How to send agent email with Mails.ai

You create an agent and it gets an email address. From that point the agent can send agent email, receive replies, and read them as structured JSON events:

import { createClient } from "@mailsai/sdk";
const mails = createClient({ apiKey: process.env.MAILS_API_KEY });

// Create an agent — it gets its own email address immediately
const agent = await mails.agents.create({ name: "support" });
// agent.address → support.yourworkspace@send.mails.ai

// Send agent email — SPF/DKIM/DMARC handled automatically
await mails.messages.send({
  from: "support",
  to: "customer@example.com",
  subject: "Your refund #812 is confirmed",
  body_text: "We processed your refund. Reply here with questions.",
});

// Read the agent's inbox — replies arrive as structured events
const events = await mails.events.list({
  event_type: "message.received",
  agent: "support",
  limit: 10,
});
for (const e of events.data) {
  console.log(e.data.extracted_text); // clean body text
  console.log(e.thread_id);          // stable thread ID
  console.log(e.injection_score);    // 0.0–1.0 safety score
}

Agent email vs. transactional email

Transactional email is one-directional: your app sends a password reset or a receipt, and the conversation ends. Agent email is bidirectional: the agent sends, the recipient replies, and the agent reads and acts on that reply. This changes the requirements:

  • Per-agent identity: each agent sends agent email from its own authenticated address, not a shared noreply@
  • Inbound parsing: replies arrive as structured data (sender, subject, body text, thread ID, attachments), not raw MIME
  • Thread reconstruction: the agent reads a conversation as a thread, not disconnected messages
  • Prompt-injection scanning: every inbound message is scored before the agent sees it
  • Per-agent reputation: bounce and complaint rates are tracked per agent, so one misbehaving agent does not drag down the rest

For the architecture comparison, see the transactional vs. agent email architecture post. For the firewall that keeps agent email safe, see the agent email firewall post.

Agent email with Python

The Python SDK provides the same agent email capabilities. Create an agent, send agent email, and read the inbox:

from mailsai import Client

client = Client()  # reads MAILS_API_KEY from env

# Send agent email
client.send_message(
    from_agent="support",
    to="customer@example.com",
    subject="Your order has shipped",
    body_text="Tracking: 1Z999AA10123456784. Reply with any questions.",
)

# Read the agent's inbox — replies to agent email arrive as events
events = client.list_events(event_type="message.received", limit=10)
for e in events["data"]:
    score = e.get("injection_score")
    if score is None or score >= 0.5:
        flag_for_review(e)  # hold for human review
        continue
    handle_reply(e["data"]["extracted_text"], e["thread_id"])

Agent email with MCP

If your agent runs inside an MCP-capable client — Claude Code, Cursor, Cline, Windsurf, or Continue — it can use agent email through the MCP server without writing any SDK code. The MCP server exposes send, receive, and thread operations as tools the agent calls directly, turning any MCP client into an agent email client.

Agent email on a custom domain

By default, agent email is sent from an address on the shared sending domain — for example, support.yourworkspace@send.mails.ai. When your agents need to carry your brand, connect a custom domain and every agent sends agent email as support@yourdomain.com, with SPF, DKIM, and DMARC provisioned automatically.

What every agent email plan includes

  • Dedicated agent address: each agent gets its own address with DNS authentication provisioned automatically
  • Agent inbox: inbound agent email parsed into structured JSON events with extracted text, thread IDs, and attachments
  • Prompt-injection scanning: every inbound message scored before delivery to the agent
  • Per-agent reputation: bounce and complaint rates tracked independently so one agent cannot damage another’s deliverability
  • Cold-email firewall: unsolicited outreach blocked at the API before transmission, protecting shared email infrastructure

Pricing

Agent email on Mails.ai starts free. The Free tier covers one agent, 3,000 outbound emails, and 3,000 inbound replies a month — no credit card. Pro is $20/month for five agents. Scale is $99/month for unlimited agents and a dedicated IP on request. Every plan includes DNS authentication, injection scanning, and per-agent reputation. For the full AI email agent setup, the management layer across multiple agents, and per-agent routing, see AI email management. See pricing for the full breakdown.

Frequently asked questions

What is agent email?
Agent email is email where the sender or receiver is an AI agent, not a person. The agent owns the address, reads incoming messages in its own inbox, and builds its own sending reputation. It is a distinct category from transactional email (one-directional, template-based) and from human email (personal inbox, manual). Agent email is bidirectional: the agent sends, the recipient replies, and the agent reads and acts on that reply through an API.
How is agent email different from a regular email API?
A regular email API sends messages on behalf of your application — password resets, receipts, notifications — and stops there. Agent email adds the inbound half: replies arrive as structured events with sender, subject, body text, thread ID, and a prompt-injection score. Each agent has its own address and its own reputation, so one agent’s mistakes don’t affect the others. You get both directions under one API key.
Does each agent get its own email address?
Yes. When you create an agent on Mails.ai, it gets a unique address on the shared domain — for example, support.yourworkspace@in.mails.ai for receiving and support.yourworkspace@send.mails.ai for sending. With a custom domain, the agent sends as support@yourdomain.com. SPF, DKIM, and DMARC are provisioned automatically.
Can my agent read replies to its email?
Yes. Every reply to agent email arrives as a structured event: sender, subject, extracted body text with quoted history stripped, thread ID, attachments, and a prompt-injection score. Your agent reads events through the REST API, TypeScript SDK, Python SDK, or MCP server — no IMAP polling, no MIME parsing.
Is agent email free?
The Free tier covers one agent with 3,000 outbound emails and 3,000 inbound replies per month — no credit card required. Pro is $20/month for five agents with 50,000 emails and 50,000 inbound replies. Scale is $99/month for unlimited agents, 250,000 emails, and 500,000 inbound replies.
How does agent email handle prompt injection?
Every inbound message within the plan’s limits is scanned for prompt-injection patterns across six categories before the event reaches your agent. The numeric injection_score (0.0–1.0) arrives on the event so your code branches on a number — hold anything at 0.5 or above for human review — rather than asking the LLM to notice it’s being attacked.

Explore the product

Give your first agent an inbox

Free covers 3,000 emails and 3,000 inbound replies a month, with no card. Upgrade when your agents get busy.

Get your API key