Mailgent for Ollama
Give a locally-run model a real inbox and identity. Use Mailgent's tools with Ollama's tool-calling models so your private agent can email and act in the world.
Running models locally with Ollama keeps inference private, but a local model still needs a way to act in the world. Mailgent provides that: a real inbox and identity reached over a simple API.
Use Ollama's tool-calling support to let the model invoke Mailgent actions, with calls routed through the agent's scoped key.
Tool calls from a local model
Pass Mailgent tool definitions to a tool-capable Ollama model. When the model emits a tool call, your harness executes it against the Mailgent API and returns the result.
Inference stays local; only the chosen actions hit the network through Mailgent.
import ollama, requests
res = ollama.chat(model="llama3.1", messages=msgs, tools=[{
"type": "function",
"function": { "name": "mail_send", "parameters": {
"type": "object", "properties": {
"to": {"type": "string"}, "subject": {"type": "string"},
"text": {"type": "string"} } } }
}])Private model, real actions
This pairing suits teams that want a self-hosted model but still need their agent to send email, manage secrets, and operate under a verifiable identity.
FAQ
Does my data go to the model provider?
Inference runs locally in Ollama. Only the Mailgent actions the model triggers leave your machine, through Mailgent's API.
Which models support tools?
Use an Ollama model with tool-calling support; pass the Mailgent tool definitions to it.
Give your agent an inbox.
A real email address, a vault, 2FA, and an identity in one API call.