Use Magentic's decorator pattern to make LLM-powered email composition feel like regular Python functions, backed by MultiMail's delivery infrastructure and oversight.
Magentic is a Python library that makes LLM calls look like regular function calls using decorators. Seamlessly integrating LLM capabilities into existing Python code with minimal boilerplate, it turns prompts into typed functions. MultiMail provides the email delivery infrastructure that sends what Magentic composes.
By combining Magentic with MultiMail, you can create email-composing functions that feel native to your Python codebase. Decorate a function with @prompt to describe the email task, and Magentic handles the LLM call. Then send the result through MultiMail's API with human oversight via gated_send mode.
Integration requires no special SDK — define Magentic-decorated functions for email composition and classification, then call the MultiMail REST API for delivery. The decorator pattern keeps your email logic clean and maintainable.
Magentic's decorator pattern makes email composition functions look and feel like regular Python code. Call compose_reply(email) and get a typed response. MultiMail sends it. No framework complexity in between.
Return Pydantic models from Magentic functions for structured email data. Validate recipients, subjects, and body content at the type level, then send validated data to MultiMail.
A Magentic email function is a decorator and a type hint. Compare that to agent frameworks that require tool registries, executors, and configuration objects. Less code means fewer bugs.
Chain Magentic functions together: classify_email() | compose_reply() | send_via_multimail(). Each step is a simple function, making the pipeline easy to test, debug, and modify.
Magentic supports async functions natively. Combined with async HTTP calls to MultiMail's API, you can process multiple emails concurrently without blocking.
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 Magentic and requests for calling the MultiMail API.
Create @prompt-decorated functions for email composition, classification, and summarization. Return Pydantic models for structured output.
Chain Magentic functions with MultiMail API calls: fetch inbox, classify emails, compose replies, and send through MultiMail.
Approve or reject 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.