Use Instructor's Pydantic-powered structured outputs to extract email data from natural language, then send through MultiMail with configurable human oversight.
Instructor is a library for getting structured outputs from LLMs using Pydantic models. It patches LLM client libraries to return validated, typed objects instead of raw text, with automatic retry on validation failure. MultiMail provides the email delivery infrastructure that turns Instructor's structured email data into actual sent messages.
The combination is powerful: Instructor extracts structured email fields (recipients, subject, body, urgency) from natural language requests, validates them with Pydantic, and MultiMail handles the delivery with human oversight. This ensures emails are both well-structured and appropriately reviewed before sending.
Integrate Instructor with MultiMail by defining Pydantic models for email data, extracting structured content with Instructor, and calling the MultiMail REST API to send. No special SDK required — just Pydantic models and HTTP requests.
Instructor ensures the LLM produces valid email data — proper email addresses, non-empty subjects, appropriate body length — through Pydantic validation with automatic retries on failure.
Users describe what they want to send in natural language. Instructor extracts the structured email fields, validates them, and MultiMail delivers the result. The entire pipeline is type-safe and validated.
If the LLM produces an invalid email structure (missing fields, bad format), Instructor automatically retries with the validation error as feedback. This self-healing loop produces reliable email data without manual intervention.
Instructor ensures emails are well-structured, but cannot judge appropriateness. MultiMail's gated_send mode adds human review after extraction, catching issues that structural validation misses.
Instructor patches multiple LLM providers (OpenAI, Anthropic, Cohere, Mistral). Use any supported provider for email extraction while MultiMail handles delivery consistently across all of them.
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 Instructor, an LLM client library, and requests for calling the MultiMail API.
Create Pydantic models for email data with field validators for content quality checks.
Use Instructor to extract structured email data from natural language, then send through MultiMail's REST API.
If using gated_send mode (the default), approve or reject pending emails in the MultiMail dashboard before delivery.
Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.