Email infrastructure for Google ADK agents

Give your ADK agents a supervised email channel — send, read, and approve messages through MultiMail's REST API with graduated oversight that fits ADK's tool-calling model.


Google ADK structures agents as tool-calling systems: each capability is a typed Python function the agent can invoke during a session. Email is a natural fit — your agent can check an inbox, read a thread, draft a reply, or send a new message as first-class tool calls, not raw SMTP calls embedded in the prompt.

MultiMail is designed for exactly this pattern. Its REST API exposes each email operation as a discrete endpoint — send (POST /v1/mailboxes/{mailbox_id}/send), list inbox, read one email, reply in thread, and approve or reject pending mail (POST /v1/oversight/decide) — that maps cleanly to an ADK tool definition. Each call carries your API key, and each mailbox has an oversight mode that governs how much the agent can do without human approval.

The combination is particularly useful for long-running ADK workflows that end in outbound communication. Rather than giving the agent direct SMTP access, you route email through MultiMail and choose an oversight mode: gated_send holds every outbound message for human approval before delivery, while monitored lets the agent act freely and notifies a human on every send.

Built for Google ADK (Agent Development Kit) developers

Tool-shaped API

Every MultiMail operation maps to one ADK tool definition. Sending (POST /v1/mailboxes/{mailbox_id}/send), listing the inbox, reading an email, and approving pending mail (POST /v1/oversight/decide) are individual REST endpoints, not a general-purpose SMTP wrapper. ADK's type-annotated function tools translate directly — no adapter layer needed.

Oversight modes that fit ADK's async session model

ADK sessions can span many steps before producing outbound communication. MultiMail's gated_send mode holds the final send for approval without blocking the session — the agent keeps working while a human reviews the draft in a separate flow.

Per-agent email identity

Each ADK agent can be assigned its own MultiMail mailbox ([email protected], [email protected]). Recipients see a distinct sender address per agent, and you can apply different oversight modes to each mailbox independently.

Approval webhooks for human-in-the-loop

When a message is held for approval in gated_send mode, MultiMail fires a webhook. Wire this to an ADK evaluation step or a human callback without polling list_pending on a timer.

Test key separation for evaluation runs

ADK evaluation workflows use MultiMail test keys (mm_test_...) that record sends without delivering them. Switch to mm_live_... for production. Tool function signatures are identical in both modes — just swap the environment variable.


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.

You are adding MultiMail email capability to my Google ADK agent. Follow these steps exactly. 1. Get MultiMail ready: read https://multimail.dev/llms.txt, connect the MultiMail MCP server, create a free inbox for this agent, and set up a verified sender so the agent can send mail from an approved identity. 2. Wire it into Google ADK using ADK’s tool mechanism: create ADK tools for the MultiMail actions the agent needs, then pass those tools to the ADK Agent in its tools list. The tools should call the connected MultiMail MCP server rather than inventing any custom endpoint. 3. Give the ADK agent three supervised email abilities: check the inbox for new messages, draft a reply for a selected message, and send or schedule an approved message through MultiMail. 4. Send a test email from the verified sender to the free inbox, have the ADK agent check the inbox, draft a short reply, and prepare the response for review. 5. Run the email workflow in MultiMail gated_send mode so every outbound message requires developer approval before it sends. Do not switch to monitored or autonomous until the test flow works and I explicitly ask for that change.

Step by step

1

Install Google ADK and create a MultiMail account

Install the ADK package with pip and sign up at multimail.dev to get your API key and provision a mailbox. Use a test key (mm_test_...) during development.

2

Wrap MultiMail endpoints as typed tool functions

Define Python functions with type annotations and docstrings for each MultiMail operation your agent needs. ADK builds the tool schema from the signatures automatically — no additional registration is required.

3

Create the ADK agent with MultiMail tools

Pass the tool functions to the Agent constructor. Choose an oversight mode in the MultiMail dashboard for your mailbox — gated_send holds every outbound message for human review before delivery.

4

Run the agent session

Use ADK's Runner and InMemorySessionService to execute the agent. Test keys ensure no real emails are sent during development. Swap to mm_live_... when ready for production.


Common questions

How does MultiMail's oversight work with ADK's async session model?
ADK sessions are async — the agent continues processing while waiting for external results. When gated_send mode holds a message, the send returns immediately with a 202 and status pending_scan (the response message notes it is held for approval) and does not block the session. MultiMail delivers the message only after a human calls POST /v1/oversight/decide with the email_id and an action of approve (via webhook or direct API call). The agent can proceed to other work within the same session without waiting for the approval.
Can I give each ADK agent its own email identity?
Yes. Create a separate MultiMail mailbox for each agent — for example, [email protected] and [email protected]. Each mailbox has its own API key and oversight mode. Recipients see a distinct sender address per agent, and you can apply different oversight settings to each mailbox independently.
Does MultiMail work with ADK's evaluation framework?
Yes. Pass a test API key (mm_test_...) when running evaluation workflows. Test-mode calls to send_email record the request and return a valid response without delivering the email to the recipient. Switch to an mm_live_... key for production. The tool function signatures are identical in both modes — no code changes are needed.
How do I handle inbound email in an ADK session?
MultiMail fires a webhook when inbound email arrives. Use this webhook to trigger a new ADK session or inject a message into an existing one. Alternatively, list the inbox (GET /v1/mailboxes/{mailbox_id}/emails) at the start of each session to fetch unread messages, then read one email (GET /v1/mailboxes/{mailbox_id}/emails/{email_id}) to retrieve the full body. The email id returned in the inbox listing is stable and can be passed directly to the reply route (POST /v1/mailboxes/{mailbox_id}/reply/{email_id}) to respond in the same thread.
Can I use MultiMail in a multi-agent ADK setup?
Yes. In a multi-agent ADK architecture, each sub-agent can receive a different subset of MultiMail tools. For example, a triage agent might only have check_inbox and set_tags, while a response agent has reply_email and send_email. Each agent's mailbox can have a different oversight mode, so higher-trust agents can operate in monitored mode while lower-trust agents use gated_send.
What oversight mode should I start with for a new ADK agent?
Start with gated_send. It lets the agent operate autonomously for reads and drafts while requiring human approval for every outbound send. Once you've reviewed the agent's send behavior over a representative sample of sessions and are confident in its judgment, you can move to monitored (agent sends freely, human receives notifications) or autonomous (fully unattended). This graduated approach matches ADK's evaluation-driven development model.

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.