
google adk email integration: giving your agent a real inbox
How to integrate email with Google ADK agents. Compare Gmail MCP, Composio, and agent-native options, with code examples and a production checklist.
Google's Agent Development Kit shipped its integrations ecosystem in early 2026, and email was one of the first categories to fill up. Gmail MCP adapters, Composio toolkits, ApplicationIntegrationToolset, Mailgun connectors. Lots of options. The problem is that most of them give your agent access to your inbox, not its own. That distinction matters more than it sounds.
I spent a week wiring email into ADK agents using four different approaches. Here's what I learned, what broke, and what actually worked in production.
What is Google ADK?#
Google's Agent Development Kit is an open-source Python framework for building AI agents. You define an LlmAgent with a system prompt, attach tools, and the framework handles orchestration, memory, and multi-agent coordination. It supports Gemini, GPT-4, Claude, and other models through a unified interface.
The interesting part for email is ADK's tool system. Tools can be Python functions, OpenAPI specs, or MCP servers. That last one is what makes email integration straightforward: if an email service exposes an MCP server, your ADK agent can use it with a few lines of configuration.
How to integrate email with Google ADK#
Here's the high-level process, regardless of which email provider you pick:
- Install the ADK SDK (
pip install google-adk) - Choose an email toolset: Gmail MCP, Composio, ApplicationIntegrationToolset, or an agent-native provider
- Configure authentication (OAuth for Gmail, API keys for everything else)
- Register the toolset with your
LlmAgent - Define email actions in your agent's system prompt (send, read, reply)
- Test locally with
adk webbefore deploying - Add monitoring, retry logic, and rate-limit handling for production
Each toolset has tradeoffs. Let me walk through the main options.
Option 1: Gmail via MCP (Composio)#
Composio wraps Gmail's API behind an MCP server. The setup looks like this:
from google.adk.agents import LlmAgent
from google.adk.tools.mcp_tool import MCPToolset, StdioServerParameters
gmail_tools = MCPToolset(
connection_params=StdioServerParameters(
command="npx",
args=["-y", "@composio/mcp@latest", "start",
"--tools", "GMAIL_SEND_EMAIL,GMAIL_FETCH_EMAILS"],
env={"COMPOSIO_API_KEY": "your-key-here"},
)
)
agent = LlmAgent(
model="gemini-2.5-pro",
name="email_agent",
tools=[gmail_tools],
instruction="You can send and read emails using Gmail.",
)
This works. Your agent can read your Gmail, send from your address, and search threads. The catch: it's your Gmail. Every email the agent sends comes from your personal or workspace account. Every email it reads is your actual mail.
For a personal assistant agent, that might be fine. For an autonomous agent that handles customer communication, signs up for services, or operates independently? You probably don't want it sharing your inbox.
There's also the OAuth dance. Someone has to complete the consent screen, and that someone is a human. If you're building agents that provision themselves, this is a blocker.
Option 2: ApplicationIntegrationToolset (Google Cloud)#
Google's own offering uses Application Integration, a Cloud service that connects to Gmail, Outlook, and other apps. The setup requires a Google Cloud project, a service account, and an integration workflow.
from google.adk.tools.application_integration_tool import ApplicationIntegrationToolset
email_tool = ApplicationIntegrationToolset(
project="my-gcp-project",
location="us-central1",
connection="gmail-connection",
actions=["send_email", "list_messages"],
)
This approach is more production-ready than the Composio MCP route. You get audit logs, IAM controls, and enterprise support. But you're still sending from a delegated human mailbox, and the setup involves Cloud console configuration that an agent can't do on its own.
Option 3: agent-native email#
The first two options share a fundamental assumption: the agent borrows a human's email. Agent-native email flips that. The agent gets its own address, its own inbox, its own sending reputation.
With LobsterMail, the ADK integration uses our MCP server:
from google.adk.tools.mcp_tool import MCPToolset, StdioServerParameters
lobster_tools = MCPToolset(
connection_params=StdioServerParameters(
command="npx",
args=["-y", "@anthropic-ai/mcp-lobstermail@latest"],
)
)
agent = LlmAgent(
model="gemini-2.5-pro",
name="outreach_agent",
tools=[lobster_tools],
instruction="Create your own email inbox and use it to send messages.",
)
No OAuth. No human in the loop. The agent provisions an address like outreach-agent@lobstermail.ai and starts sending. Each agent gets its own identity, its own inbox, and built-in protection against prompt injection in incoming emails.
The tradeoff is that your agent isn't sending from you@yourcompany.com. For agents that need to represent you personally, Gmail integration makes more sense. For agents that operate as their own entity, agent-native email removes the dependency on human accounts entirely.
Comparing the three approaches#
| Factor | Gmail MCP (Composio) | ApplicationIntegrationToolset | Agent-native (LobsterMail) |
|---|---|---|---|
| Setup complexity | Medium (OAuth + MCP) | High (GCP project + IAM) | Low (zero config) |
| Human required? | Yes (OAuth consent) | Yes (Cloud console) | No |
| Agent gets own address? | No | No | Yes |
| Sending identity | Your Gmail | Delegated mailbox | Agent's own address |
| Rate limits | Gmail API quotas | Gmail API quotas | Plan-based limits |
| Injection protection | None | None | Built-in scoring |
| Cost | Free (Gmail) + Composio plan | GCP pricing | Free tier available |
Production checklist for ADK email agents#
Before shipping an ADK agent that sends email, check these:
Rate limits. Gmail's API allows 100 messages per second per user, but daily sending limits are lower (2,000 for Workspace, 500 for free Gmail). Your agent needs backoff logic, or it will hit 429 errors and lose messages silently.
Bounce handling. What happens when your agent sends to a bad address? Gmail surfaces bounces as inbox messages. Agent-native providers return bounce data through the API. Either way, your agent needs logic to detect and stop sending to dead addresses.
Unsubscribe compliance. If your agent sends anything resembling marketing email, CAN-SPAM and GDPR require a working unsubscribe mechanism. This isn't optional, and "my agent did it" is not a legal defense.
Thread management. Email conversations have thread IDs. If your agent replies to a message, it needs to set the correct In-Reply-To and References headers, or the reply will start a new thread in the recipient's inbox. Most MCP wrappers handle this. Verify yours does.
Logging. Every email your agent sends should be logged somewhere you can audit. Autonomous agents that send email without an audit trail are a liability.
When to use which approach#
Use Gmail MCP when your agent is a personal assistant that reads and drafts emails on behalf of a specific human. The human is in the loop, the agent uses their account, and the setup is a one-time OAuth flow.
Use ApplicationIntegrationToolset when you're in a Google Cloud environment with existing IAM policies and need enterprise-grade access controls. The setup cost is high, but the governance is real.
Use agent-native email when your agent needs its own identity, provisions itself without human intervention, or operates at scale across multiple instances. If you're building something where each agent (or each customer's agent) needs a distinct email address, sharing a single Gmail doesn't scale.
If you want to try the agent-native approach, . Your agent handles the setup itself.
Frequently asked questions
What is Google ADK and how does email integration work with it?
Google ADK (Agent Development Kit) is an open-source Python framework for building AI agents. Email integration works through ADK's tool system, where you register an email provider (Gmail MCP, Composio, or an agent-native service) as a toolset that your LlmAgent can call.
What is the simplest way to send an email from a Google ADK agent?
The fewest lines of code is an MCP-based integration. You configure an MCPToolset with the email provider's MCP server, attach it to your agent, and instruct the agent to send. With agent-native providers, there's no OAuth or credentials to configure first.
What is MCP and why does Google ADK use it for email?
MCP (Model Context Protocol) is a standard for connecting AI agents to external tools. ADK supports MCP natively, which means any email service that exposes an MCP server can plug into an ADK agent without custom code. It's the fastest integration path.
Can I give my ADK agent its own dedicated email inbox instead of using my Gmail?
Yes. Agent-native email providers like LobsterMail let each agent provision its own address (e.g., my-agent@lobstermail.ai) without borrowing a human's account. This is useful for agents that operate independently or when you need separate identities per agent.
How do I handle Gmail OAuth authentication inside a Google ADK agent?
You need to create OAuth 2.0 credentials in Google Cloud Console, complete the consent screen as a human, and pass the refresh token to your MCP tool or ApplicationIntegrationToolset. The human-in-the-loop step can't be automated, which limits fully autonomous setups.
What is the difference between Composio, AgentMail, and ApplicationIntegrationToolset for ADK email?
Composio wraps Gmail behind an MCP server for quick setup. ApplicationIntegrationToolset is Google's native Cloud connector with IAM and audit logs. AgentMail and LobsterMail are agent-native providers where the agent gets its own inbox instead of accessing a human's account.
Does Google ADK support sending emails via Outlook or only Gmail?
ADK supports any email service that provides a compatible tool interface. ApplicationIntegrationToolset connects to Outlook via Google Cloud connectors. You can also use MCP servers for Outlook, or use an agent-native email provider that's platform-independent.
What happens when an ADK email agent hits Gmail API rate limits?
Gmail returns 429 Too Many Requests errors. Your agent needs retry logic with exponential backoff. Without it, messages get dropped silently. Daily sending limits are 500 for free Gmail and 2,000 for Google Workspace accounts.
How can I track whether emails sent by my ADK agent were delivered or replied to?
Gmail doesn't provide delivery confirmation natively. You'd need to check for bounces in the inbox. Agent-native providers typically expose delivery status and reply tracking through their API, which gives your agent programmatic access to message state.
Can multiple ADK agents share a single email inbox?
Technically yes, but it creates problems. Agents may read each other's messages, reply to the wrong threads, or conflict on sending limits. Giving each agent its own inbox avoids these issues and makes audit trails cleaner.
How do I test an ADK email agent locally before deploying?
Run adk web to start ADK's local dev UI. You can interact with your agent, trigger email actions, and inspect tool calls. For email specifically, send to a test address you control and verify delivery, formatting, and thread behavior.
How do I ensure emails sent by an autonomous ADK agent comply with spam regulations?
Include a working unsubscribe link in any bulk or marketing email. Honor opt-out requests within 10 business days (CAN-SPAM) or immediately (GDPR). Log all sends with timestamps. Your agent needs to check suppression lists before every send.
Is LobsterMail free to use with Google ADK?
Yes. The free tier includes 1,000 emails per month with no credit card required. The Builder plan at $9/month adds up to 10 inboxes and 5,000 emails per month, which covers most agent workloads.
What Google Cloud services can I combine with ADK email agents?
Pub/Sub for real-time event triggers, BigQuery for analytics on email performance, Cloud Functions for serverless deployment, and Firestore for conversation state. ADK's tool system lets you wire these together alongside your email toolset.


