Combine HuggingFace's smolagents framework with MultiMail's email infrastructure for simple, effective email agents — with human oversight at the API level.
smolagents is HuggingFace's lightweight agent framework that supports both code-based and tool-calling agents. It emphasizes simplicity and works with any LLM available on the HuggingFace Hub, making it easy to build agents that interact with external services. MultiMail provides the email infrastructure that smolagents need to send, receive, and manage email.
By integrating MultiMail with smolagents, your agents can compose and send emails, check inboxes, and manage contacts through simple tool definitions. smolagents' code execution mode can write arbitrary email-sending code, but MultiMail's API-level oversight ensures that even code-generated send calls go through approval when configured in gated_send mode.
Connect smolagents to MultiMail by defining Tool subclasses that call the REST API. Both ToolCallingAgent and CodeAgent can use these tools to perform email operations within their respective execution patterns.
smolagents uses a clean Tool base class pattern. Define MultiMail tools by subclassing Tool with a name, description, inputs, and a forward method that calls the API. No complex abstractions required.
smolagents' CodeAgent can write and execute arbitrary Python code, including HTTP requests. MultiMail's oversight operates at the API level, so even dynamically generated code that calls the send endpoint goes through approval in gated_send mode.
smolagents works with any LLM on HuggingFace Hub or via API. Pair your preferred model with MultiMail tools to build email agents without being locked into a specific LLM provider.
Both smolagents and MultiMail's REST API are designed for simplicity. No complex SDK installations or heavy dependencies — just define tools, create an agent, and start processing email.
Start with gated_send where every email your smolagent drafts requires human approval. As you build confidence in the agent's output quality, graduate to monitored or autonomous modes for less friction.
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 smolagents and requests for calling the MultiMail API.
Create Tool subclasses for send_email, check_inbox, and reply_email that wrap MultiMail API endpoints.
Choose ToolCallingAgent or CodeAgent based on your needs, and pass your MultiMail tools along with a system prompt explaining the email context.
Execute the agent with agent.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.