Email-Enabled Multi-Agent Conversations with AutoGen

Give your AutoGen agents the ability to send, read, and manage email through MultiMail — with configurable human approval before any message leaves the outbox.


AutoGen is Microsoft's framework for building multi-agent conversational systems. Agents communicate through messages and can include human proxies, enabling complex multi-turn conversations between specialized agents. MultiMail extends AutoGen's capabilities by providing a production email infrastructure that agents can use to communicate with the outside world.

By integrating MultiMail with AutoGen, your agent teams can draft and send emails, check inboxes, manage contacts, and handle threads — all coordinated through AutoGen's group chat and nested chat patterns. The default gated_send mode ensures that emails drafted by any agent in the group require human approval before delivery.

Connect AutoGen agents to MultiMail by registering custom functions that call the REST API, or use the @multimail/mcp-server for tool discovery. Both approaches work with AutoGen's AssistantAgent and ConversableAgent patterns.

Built for AutoGen developers

Multi-Agent Email Coordination

AutoGen's group chat lets multiple specialized agents collaborate on email tasks. One agent triages inbound mail, another drafts replies, and a third manages contacts — all coordinated through AutoGen's conversation protocol with MultiMail handling delivery.

Human Proxy Meets Email Oversight

AutoGen's UserProxyAgent already supports human-in-the-loop for chat. MultiMail extends this to email specifically, letting agents draft emails that flow through a dedicated approval queue rather than requiring inline chat approval.

Graduated Trust for Agent Teams

Start your AutoGen agent team in gated_send mode where every email requires approval. As the team proves reliable, graduate to monitored mode where emails send but humans can review, or autonomous mode for fully trusted workflows.

Thread-Aware Multi-Turn Conversations

MultiMail tracks email threads automatically. Your AutoGen agents can retrieve full email conversation history with get_thread, enabling context-aware replies that reference prior messages in the chain.

Audit Trail for Agent Actions

Every email action taken by your AutoGen agents is logged in MultiMail's audit log. This provides accountability for multi-agent systems where it may be unclear which agent initiated a particular email.


Try it with your agent

No code, no dashboard. Paste this to your AI agent — it connects MultiMail, creates an inbox, and builds the flow for you.

1. Get MultiMail ready: read https://multimail.dev/llms.txt, connect the MultiMail MCP server to the environment where this AutoGen agent runs, create a free inbox for the agent, and set up a verified sending domain so the agent can send mail. 2. Wire MultiMail into AutoGen using AutoGen’s tool mechanism: expose the connected MultiMail MCP tools to the agent as callable tools/functions, and instruct the agent to use those tools for all email work instead of inventing email APIs or sending mail directly. 3. Give the agent three explicit capabilities: check the MultiMail inbox for new messages, draft replies or new outbound emails, and send or schedule approved messages through MultiMail. 4. Send a test email: have the agent check its MultiMail inbox, draft a short reply or new message to your test address, and show the subject, recipients, and body before sending. 5. Run with MultiMail oversight mode set to gated_send: the agent may read inboxes and draft messages, but every send or schedule action must pause for developer review and approval before anything leaves the outbox.

Step by step

1

Create a MultiMail Account and API Key

Sign up at multimail.dev, create a mailbox, and generate an API key from your dashboard. Your key will start with mm_live_.

2

Install Dependencies

Install AutoGen and the HTTP library for calling the MultiMail API.

3

Define Email Functions

Create Python functions that wrap MultiMail API endpoints for sending, reading, and replying to emails. These will be registered as tools with your agents.

4

Create and Configure Agents

Set up an AssistantAgent with a system prompt explaining the email context and oversight mode. Register your email functions as callable tools.

5

Run and Approve

Start the conversation with initiate_chat. Review and approve any pending emails in the MultiMail dashboard when using gated_send mode.


Common questions

How does AutoGen's UserProxyAgent interact with MultiMail's oversight?
AutoGen's UserProxyAgent provides inline chat-level approval for agent actions. MultiMail's oversight operates at the email infrastructure level — gated_send queues emails regardless of how many agents are involved in the conversation. This gives you two layers of control: chat-level via UserProxyAgent and email-level via MultiMail.
Can multiple AutoGen agents share the same MultiMail mailbox?
Yes. Multiple agents can call the same mailbox_id in their API requests. MultiMail handles concurrent access and thread tracking. The audit log records which API call initiated each action, so you can trace email activity back to specific agents in your group chat.
Does AutoGen support the MultiMail MCP server?
AutoGen does not have a built-in MCP client adapter, so the recommended approach is to register custom Python functions that call the MultiMail REST API directly. This gives you the same capabilities as the MCP server with AutoGen's native function registration pattern.
How do I handle long-running email workflows with AutoGen?
Use AutoGen's nested chats or sequential chat patterns for multi-step email workflows. For workflows that span human approval delays, you can implement a polling loop that checks MultiMail's pending queue and resumes the conversation once emails are approved.
Can I use AutoGen's code execution with MultiMail?
While AutoGen supports code execution via UserProxyAgent, we recommend using registered functions rather than generated code for email operations. Registered functions enforce the correct API patterns and prevent the agent from bypassing MultiMail's oversight modes through direct HTTP calls.

Explore more

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.