Private Email Agents with LM Studio

Run LLMs locally in LM Studio's desktop app and connect them to MultiMail for email capabilities — keeping your data private with human oversight as a safety net.


LM Studio is a desktop application for running LLMs locally with a user-friendly interface, model discovery, and an OpenAI-compatible local server. MultiMail provides the email infrastructure layer that turns LM Studio's local models into functional email agents with full send, receive, and management capabilities.

For users running local models for privacy-sensitive email tasks, MultiMail's oversight provides a critical safety net. The default gated_send mode ensures every email drafted by a local model requires human approval before delivery, so you get the privacy benefits of local inference with the safety of human review.

Connect LM Studio to MultiMail through its OpenAI-compatible local server endpoint. Use the OpenAI Python SDK pointed at LM Studio's server to call MultiMail's REST API with tool calling, making integration straightforward.

Built for LM Studio developers

Privacy-First Email Agents

LM Studio keeps your model inference completely local. Combined with MultiMail, only the final email content leaves your machine. Your prompts, reasoning, and email analysis all stay private.

Safety Net for Local Models

Local models may produce inconsistent outputs. MultiMail's gated_send mode ensures every email is human-reviewed before delivery, catching quality issues that local models are more prone to.

Easy Model Discovery

LM Studio's model browser lets you discover and download models with function calling support. Try different models for email tasks without any command-line setup.

OpenAI-Compatible Server

LM Studio's local server exposes an OpenAI-compatible API. Use the same email agent code you would write for OpenAI's cloud API — just point it at localhost.

Graduated Trust via Oversight Modes

Start with gated_all (human approves every action) when testing new local models, then move to gated_send once you are confident in the model's email quality.


Try it with your agent

No code, no dashboard. Paste this to your AI agent — it connects MultiMail, creates an inbox, and builds the flow for you.

1. Get MultiMail ready: read https://multimail.dev/llms.txt and follow only the current MultiMail MCP setup guidance there. Connect the MultiMail MCP server, create a free inbox for this project, and set up a verified sending domain or verified sender before attempting to send anything. 2. Wire it into LM Studio: in the LM Studio desktop app, use the Program tab in the right sidebar, choose Install, then Edit mcp.json. Add the MultiMail MCP server configuration from llms.txt, save it, and confirm the MultiMail tools are available to the local model in this chat. 3. Enable only the email capabilities I need: inbox checking, drafting replies, composing new messages, sending, and scheduling. Treat inbox reads as allowed, but treat every send or schedule action as requiring my explicit approval. 4. Send a test email: use the verified sender and the new MultiMail inbox to compose a short test message to an address I provide, show me the recipient, subject, body, and sender, then wait for approval before sending. 5. Run with human oversight: set MultiMail oversight mode to gated_send for this agent. Continue using gated_send so I review and approve every outgoing email before it is sent; do not switch to monitored or autonomous unless I explicitly ask.

Step by step

1

Create a MultiMail Account and API Key

Sign up at multimail.dev, create a mailbox, and generate an API key from your dashboard. Your key will start with mm_live_.

2

Install LM Studio and Load a Model

Download LM Studio from lmstudio.ai. Use the built-in model browser to download a model with function calling support, such as Llama 3.3 70B.

3

Start the Local Server

In LM Studio, start the local server (default: localhost:1234). Enable the OpenAI-compatible API endpoint.

4

Install Python Dependencies and Build the Agent

Install the OpenAI SDK and requests library. Point the client at LM Studio's local server and build the agent loop.

5

Approve Pending Emails

Review and approve pending emails in the MultiMail dashboard. This step is especially important with local models that may produce lower-quality outputs.


Common questions

Which LM Studio models support tool calling?
Models with function calling support include Llama 3.3, Mistral, and Qwen 2.5 variants. LM Studio's model browser indicates which models support tool calling. Larger models (70B+) generally produce better email content but require more GPU memory.
Does my email data stay private with LM Studio?
Your prompts and model reasoning run entirely on your local machine. Only the final email content (to, subject, body) is sent to MultiMail's API for delivery. Inbox reads go through MultiMail's API, but the model's analysis stays local.
Why use gated_send mode with local models?
Local models have weaker instruction following than cloud models. They may generate inappropriate tone, incorrect facts, or malformed content. gated_send mode ensures a human reviews every outgoing email, catching these quality issues before they reach recipients.
Can I switch between LM Studio and a cloud provider?
Yes. Since LM Studio uses the OpenAI-compatible API format, your email agent code works with both. Change the base_url from localhost:1234 to api.openai.com (or any compatible provider) and your MultiMail integration stays the same.
Is there rate limiting on the MultiMail API?
Rate limits depend on your plan tier. The Starter (free) plan allows 200 emails per month, while paid plans range from 5,000 to 150,000. Combined with LM Studio's zero inference cost, the free tier is a great starting point.

Explore more

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a hosted MCP server. Formally verified in Lean 4.