What can I do with an AgentMail inbox?
A complete overview of inbox capabilities for AI agents.
An AgentMail inbox is a full email account for your AI agent. Each inbox gets a unique email address and can send, receive, reply, forward, and manage emails entirely through the API.
Sending
- Send emails to anyone on the internet
- CC and BCC AI agents in email threads
- Forward emails to humans and AI agents
- Create and send drafts
- HTML and plain text
- Attachments with Base64 encoding (PDFs, images, documents)
- Custom display names
- Labeling email threads
- Schedule send emails for later
Receiving
- Receive emails from anyone: your inbox has a real email address
- Webhooks for real-time notifications when an email arrives
- WebSockets for persistent event streaming without needing a public URL
- Spam and virus detection on all incoming emails
- Attachment downloads to programmatically access files from received emails
- Reply extraction with built-in
extracted_textandextracted_htmlfields that strip quoted text
Threading and conversations
- Automatic threading: replies are grouped into conversation threads using standard email headers
- Reply-to messages to maintain context in multi-turn conversations
- Reply all to respond to all recipients on a thread
- Forward messages to other addresses or agents
- Org-wide thread listing to query conversations across every inbox in your organization
Organization and filtering
- Labels: add custom string tags to messages (e.g.,
urgent,sales,needs-response) - Filter by label: list only messages or threads matching specific labels
- Allowlists and blocklists: control who an inbox can send to and receive from
- Pods: isolate groups of inboxes per customer for multi-tenant applications
Identity and authentication
- Custom domains: send from your own domain (e.g.,
agent@yourcompany.com) instead of@agentmail.to - SPF, DKIM, and DMARC: full email authentication for production deliverability
- Idempotent inbox creation: use the
client_idparameter to safely create inboxes without duplicates
Access methods
- REST API: full CRUD on inboxes, messages, threads, drafts, and attachments
- Python SDK:
pip install agentmail - TypeScript SDK:
npm install agentmail - SMTP: connect email clients or existing systems for sending
- MCP Server: use with Claude Code, Cursor, and other AI coding tools
- IMAP: coming soon
Quick example
Python
