Give Swarm agents email capabilities that persist across handoffs — with MultiMail's oversight ensuring every send is gated regardless of which agent triggers it.
OpenAI Swarm is an experimental framework for lightweight multi-agent orchestration using function-based routing and agent handoffs. When email tasks pass through a handoff chain — from a triage agent to a support agent to a follow-up agent — MultiMail ensures oversight is enforced at every step.
Swarm's handoff pattern means an email action might be initiated by one agent and completed by another. MultiMail's API-level oversight catches every send call regardless of which agent in the chain makes it, preventing oversight gaps during agent transitions.
Integration is natural: define email functions that call the MultiMail REST API, then pass them as tools to your Swarm agents. The functions follow Swarm's convention of returning strings for the next agent to process.
Swarm agents hand off tasks to each other. MultiMail's API-level oversight ensures that email sends are gated regardless of which agent in the chain initiates the action — no oversight gaps during transitions.
Swarm's context_variables carry state across handoffs. Store mailbox IDs, thread IDs, and email context in context_variables so agents downstream in the chain have the information they need for email actions.
Swarm uses plain Python functions as tools, matching exactly how you define MultiMail API wrappers. No adapters or special integrations needed — just define functions and pass them to agents.
Different Swarm agents can use different mailboxes. A sales agent sends from the sales mailbox while a support agent uses the support mailbox, each with appropriate oversight settings.
No code, no dashboard. Paste this to your AI agent — it connects MultiMail, creates an inbox, and builds the flow for you.
Sign up at multimail.dev, create a mailbox, and generate an API key from your dashboard. Your key will start with mm_live_.
Install the OpenAI Python package (which includes Swarm) and the HTTP library for API calls.
Create functions that accept context_variables and call MultiMail API endpoints. Follow Swarm's convention of returning strings.
Define Swarm Agent instances with appropriate email functions and handoff transfer functions. Include oversight mode details in each agent's instructions.
Review emails queued by any agent in the Swarm chain via the MultiMail dashboard. Approve or reject before delivery.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.