Example agents that use Microsoft AutoGen with MultiMail for AI-powered email workflows.
A single AutoGen AssistantAgent that monitors an inbox and auto-responds to customer emails. It reads each email, tags it by category and priority, and drafts a professional reply.
What it demonstrates:
- AutoGen tool calling with the MultiMail Python SDK
RoundRobinGroupChatwith a single agent- Tagging emails for tracking
- Automated reply generation
A two-agent team using SelectorGroupChat:
- inbox_reader — fetches and presents email content
- triage_agent — classifies emails by category, priority, and sentiment
What it demonstrates:
- Multi-agent coordination with
SelectorGroupChat - Separation of I/O (reading emails) from logic (classification)
- Contact management (auto-adding new senders)
- Structured output (summary table)
- Install dependencies:
pip install -r requirements.txt- Configure environment:
cp .env.example .envEdit .env with your keys:
OPENAI_API_KEY— your OpenAI API key (platform.openai.com)MULTIMAIL_API_KEY— your MultiMail API key (multimail.dev)MULTIMAIL_MAILBOX_ID— your mailbox ID (find it in the MultiMail dashboard)
- Run an example:
python examples/customer_support_agent.py
python examples/email_triage_agent.pyAutoGen agents use tool calling to interact with MultiMail. Each tool is a plain Python function that calls the MultiMail SDK. AutoGen handles the LLM conversation loop, tool dispatch, and multi-agent coordination.
User Task
|
v
AutoGen Agent (GPT-4o)
|-- decides which tool to call
v
Tool Function (e.g., check_inbox)
|-- calls MultiMail Python SDK
v
MultiMail API (https://api.multimail.dev)
|-- returns email data
v
AutoGen Agent
|-- processes result, calls next tool or responds
MultiMail handles regulatory compliance at the infrastructure layer — no SDK-side code changes needed:
- EU AI Act Article 50: Every AI-sent email includes a cryptographically signed
ai_generateddisclosure in theX-MultiMail-Identityheader - US State Laws: Maine, New York, California, Illinois — AI disclosure built into email delivery
- CAN-SPAM: Unsubscribe headers and physical address footers on all outbound email
- Formally Verified: Lean 4 proofs of identity header tamper evidence
These examples are current for MultiMail v0.5.4.
See multimail.dev/use-cases/eu-ai-act-email-compliance for details.
MultiMail supports graduated trust levels for agent email access:
| Mode | Behavior |
|---|---|
gated_all |
Agent drafts, human approves everything |
gated_send |
Agent reads freely, human approves outbound (default) |
monitored |
Agent sends freely, human can review |
autonomous |
Full agent control |
Start with gated_send and increase autonomy as you build trust.