Extend OpenAI's official agent framework with MultiMail's email infrastructure — complete with guardrails, handoffs, and human oversight for every message.
The OpenAI Agents SDK is OpenAI's official framework for building agentic applications. It features a minimal, opinionated API with built-in support for handoffs between agents, guardrails for input/output validation, and tracing for observability. MultiMail provides the email infrastructure layer that these agents need to interact with the real world through email.
By integrating MultiMail with the OpenAI Agents SDK, your agents can send emails, check inboxes, manage contacts, and handle threads — all while benefiting from both OpenAI's guardrails and MultiMail's email-specific oversight. The SDK's guardrails validate agent outputs structurally, while MultiMail's gated_send mode adds human judgment before delivery.
Connect your agents to MultiMail by defining function tools that call the REST API. The SDK's tool-calling pattern makes it straightforward to register MultiMail operations as agent capabilities.
The SDK's guardrails validate agent outputs but cannot catch email-specific risks like wrong recipients or inappropriate tone. MultiMail's oversight modes add a human review layer specifically for email, complementing OpenAI's structural validation.
Use the SDK's handoff feature to route between specialized email agents. A triage agent can hand off to a customer support agent or an escalation agent, each with their own email handling logic and MultiMail mailbox.
The SDK's tracing system records every tool call, including MultiMail email operations. Combined with MultiMail's audit log, you get end-to-end observability from agent reasoning through email delivery.
The OpenAI Agents SDK is designed for simplicity. Registering MultiMail tools requires just a few function definitions with type hints — the SDK handles tool schema generation, invocation, and response parsing automatically.
Start agents in gated_send mode where every email requires human approval. Progress to monitored or autonomous as the agent proves reliable. MultiMail's five oversight levels let you calibrate trust precisely.
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. Your key will start with mm_live_.
Install the OpenAI Agents SDK and requests for calling the MultiMail API.
Create functions decorated with @function_tool that wrap MultiMail API endpoints. Define at minimum send_email and check_inbox.
Build an Agent with your email tools, a system prompt explaining the email context, and optionally input guardrails for content validation.
Execute the agent with Runner.run(). Review and approve pending emails in the MultiMail dashboard when using gated_send mode.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.