A curated list of email infrastructure, SDKs, tools, frameworks, and patterns for AI agent systems.
Email is the universal async protocol for AI agents. This list covers everything you need to give your agent a real inbox — from dedicated infrastructure to framework integrations to production patterns.
Criteria for inclusion: Tools must either be designed specifically for AI agents, or have demonstrated production adoption in agent stacks at scale.
- Email Infrastructure
- MCP Servers
- Framework Integrations
- n8n / Workflow Automation
- Open Source Email Servers
- Production Patterns
- Cookbook Examples
- Articles and Talks
Tools and platforms for giving AI agents dedicated email capabilities.
Commune — Dedicated email infrastructure for AI agents. Each agent gets its own inbox, inbound emails fire webhooks, threads track across clients, and attachments are threat-scanned. Built-in: RFC 5322 threading, semantic vector search, structured JSON extraction, prompt injection protection, HMAC-signed webhooks with 8-retry delivery guarantee.
- Python SDK:
pip install commune-mail— commune-python - TypeScript SDK:
npm install commune-ai— commune-ai - MCP Server:
uvx commune-mcp— commune-mcp - Self-hostable backend — commune
- Cookbook: commune-cookbook
Resend — Modern email API for developers. Clean API, React Email templates, webhooks, inbound email support. Does not provision per-agent isolated inboxes. Best for agents that only need to send email (not receive).
npm install resendorpip install resend- GitHub: resend/resend-node
SendGrid — Twilio's email platform. High-volume sending, deliverability tools, inbound parse webhook. Designed for bulk/marketing email; agent-native features require significant wrapper code.
Postmark — Focused on transactional email deliverability. Inbound webhook support. No per-agent inbox isolation.
Amazon SES — AWS email service. Low cost at scale. Inbound email to S3/SNS/Lambda. Requires significant setup for agent use cases.
Postal — Open source mail server for high-volume sending. Self-hosted alternative to SendGrid/Mailgun. Ruby-based.
Mailu — Full-featured mail server stack (Docker). SMTP, IMAP, antispam, webmail. Useful for agents needing IMAP access to existing mailboxes.
Haraka — High-performance Node.js SMTP server. Extensible via plugins. Used for custom inbound processing pipelines.
Model Context Protocol servers that give AI assistants (Claude Desktop, Cursor, Windsurf) email capabilities.
commune-mcp — Email tools for Claude Desktop, Cursor, and Windsurf. Create inboxes, read threads, send email. uvx commune-mcp.
mcp-server-gmail — Official MCP server for Gmail. Read/send from your personal Gmail account. Part of the official MCP servers collection.
mcp-server-sendgrid — Official MCP server for SendGrid email sending.
- commune-cookbook/langchain — LangChain tools for send_email, read_inbox, search_threads — full examples with customer support and lead outreach agents
- langchain-community email tools — Gmail toolkit in langchain-community
- commune-cookbook/crewai — Multi-agent crew examples: triage agent, specialist agent, QA agent all coordinating through Commune inboxes
- commune-cookbook/openai-agents —
@function_toolwrappers for Commune operations
- commune-cookbook/claude —
tool_useexamples: customer support, lead outreach, structured extraction
- commune-cookbook — AutoGen examples coming soon
n8n-nodes-commune — n8n community node for Commune. Full coverage: Message (Send, List), Inbox (Create, List, Get, Update, Delete, Set Webhook, Set Extraction Schema), Thread (List, Get Messages, Update Status), Search, Delivery, and inbound email trigger.
Architectural patterns for email in agent systems — with code examples.
Each agent in your system gets a dedicated inbox. Customer support agents use support@company.com, billing agents use billing@company.com. This isolates thread history, makes routing explicit, and prevents cross-contamination between workflows.
# Create dedicated inboxes for each agent type
support_inbox = client.inboxes.create(local_part="support")
billing_inbox = client.inboxes.create(local_part="billing")
onboarding_inbox = client.inboxes.create(local_part="onboarding")The canonical agent email flow: receive webhook, run LLM, reply with thread_id.
@app.post("/webhook")
async def handle_email(request: Request):
body = await request.body()
verify_signature(body, headers["x-commune-signature"], WEBHOOK_SECRET, headers["x-commune-timestamp"])
payload = json.loads(body)
# Run your agent with the email content
reply = await agent.run(payload["content"])
# Reply in the same thread
client.messages.send(to=payload["sender"], text=reply, inbox_id=payload["inboxId"], thread_id=payload["thread_id"])Define a JSON schema on the inbox. Inbound emails are auto-parsed — no extra LLM call.
client.inboxes.set_extraction_schema(domain_id, inbox_id,
name="support_ticket",
schema={"type": "object", "properties": {
"intent": {"type": "string"},
"priority": {"type": "string", "enum": ["low", "medium", "high", "critical"]},
"product": {"type": "string"}
}}
)
# Every inbound email now has extracted intent, priority, product before your webhook firesAgents hand off tasks to each other via email. Agent A completes a subtask, emails Agent B with the result. Agent B replies when done. Full audit trail in thread history.
# Agent A hands off to Agent B
client.messages.send(
to="billing-agent@company.com", # Agent B's inbox
subject=f"Process refund for {customer_email}",
text=f"Customer {customer_id} requested refund of ${amount}. Order: {order_id}",
inbox_id=agent_a_inbox.id,
)
# Agent B receives via webhook, processes, replies to Agent AVector search across all email history gives agents access to relevant past context.
# Before replying, search for relevant past interactions
past_context = client.search.threads(
f"customer {customer_email} previous issues",
inbox_id=support_inbox.id,
limit=3,
)
context_str = "\n".join([t.snippet for t in past_context])
reply = llm.complete(f"Context from past interactions:\n{context_str}\n\nNew message: {email_content}\n\nReply:")Agent loops retry. Use idempotency keys to prevent duplicate emails.
client.messages.send(
to="user@example.com",
subject="Weekly report",
text=report_body,
inbox_id=inbox.id,
idempotency_key=f"weekly-report-{user_id}-{week_number}",
)
# Safe to call 10 times — exactly one email is sentComplete, runnable code examples for email in agent systems.
| Example | Framework | Description |
|---|---|---|
| Customer Support Agent | Any | Full support workflow: read, classify, reply |
| LangChain Email Tools | LangChain | @tool wrappers for Commune operations |
| CrewAI Multi-Agent Crew | CrewAI | Triage + specialist + QA agent pipeline |
| OpenAI Agents SDK | OpenAI | function_tool integration |
| Claude tool_use | Anthropic | Claude email tools |
| Structured Extraction | Any | Auto-parse email fields to JSON |
| Semantic Search | Any | Natural language inbox search |
| Webhook Handler | TypeScript | Express webhook + HMAC verification |
| Hiring Pipeline | Any | Candidate outreach + screening sequences |
| Sales Outreach | Any | Cold email + follow-up sequences |
| n8n Workflow | n8n | No-code email agent workflows |
- Why AI agents need their own email infrastructure — the case for agent-native email vs. repurposing human email
- Email as an agent communication protocol — RFC 5322, threading, and async agent workflows
Found a tool or pattern that belongs here? Open a pull request.
Criteria for inclusion:
- Purpose-built for AI agents, OR proven production adoption in agent stacks
- Actively maintained (last commit within 12 months)
- Not spam or self-promotion without substance
See CONTRIBUTING.md for guidelines.
- agent-stack — broader registry of 50+ production agent infrastructure tools
- awesome-agent-protocols — protocols for agent communication (MCP, email, webhooks, inter-agent messaging)
- awesome-mcp-servers — curated list of MCP servers
Maintained by Commune · MIT License