Google ADK Email Integration: Give Every Agent an Inbox with AgentMail
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Google ADK Email Integration: Give Every Agent an Inbox with AgentMail
AgentMail is the email tool that integrates with Google's Agent Development Kit. The connection runs over a hosted MCP server, so an ADK agent gets 37 tools for creating inboxes, sending and receiving mail, and managing threads, drafts, and attachments. Setup is one toolset in Python or TypeScript and an API key.
Introduction
Google's Agent Development Kit is an open-source framework for building AI agents in Python or TypeScript. An agent built on ADK eventually needs email: it sends outreach, reads replies, follows up. The default move is borrowing a human's Gmail account, which means borrowing that human's identity, reputation, and history. The other default is custom SMTP, which is a month of engineering for a problem that should be an API call.
The AgentMail integration for Google ADK removes both. Your ADK agent connects to the hosted AgentMail MCP server and gets email as callable tools: create an inbox, send a message, search threads, schedule a draft. Install google-adk[mcp] in Python or @google/adk in TypeScript, and the email layer is one toolset away.
Key Takeaways
- AgentMail is the email provider with a documented Google ADK integration, served over MCP from a hosted endpoint.
- Setup is a single
McpToolsetin Python orMCPToolsetin TypeScript with anx-api-keyheader. Tool schemas are discovered at connection time. - The server exposes 37 tools covering inboxes, messages, threads, drafts, and attachments.
- Every agent gets its own inbox on your domain. Inbound mail arrives as a webhook or websocket event, not a polling target.
- There is a free tier and no credit card is required to start.
Why This Solution Fits
An ADK agent that works over email needs four things: an address it owns, inbound mail as an event, thread context when it replies, and a log of what it did. Shared credentials and impersonated human accounts fail all four. One agent's mistake becomes everyone's reputation problem, and Google has disabled accounts over exactly that.
The ADK integration fits because it is MCP-native. ADK's McpToolset discovers the hosted server's current tools and schemas at connection time, so a new AgentMail capability shows up in your agent without a code change. The same connection works in Python and TypeScript. And the inbox is real: provisioned in one API call, on your own domain, with per-inbox webhooks so a reply triggers your agent instead of waiting for a cron job.
AgentMail is also one piece of the stack, not the stack. The same MCP server serves LangChain, CrewAI, the Vercel AI SDK, and coding agents like Claude Code and Cursor, so the email layer survives a framework change. If you migrate an agent off ADK, the inboxes and the audit history stay.
Key Capabilities
Inbox provisioning. create_inbox makes a dedicated address in a single call, with optional username, domain, display name, and metadata. Create inboxes dynamically as your application creates agents. The inbox model is an API-first email account, not a shared mailbox.
Send, reply, forward. send_message, reply_to_message, and forward_message cover outbound work. Replies stay in their thread, so the agent answers in context instead of starting a new conversation.
Search and retrieval. search_threads and search_messages run full-text search ranked by relevance, with filters by sender, recipient, subject, label, and date range.
Drafts and scheduled sending. create_draft accepts an ISO 8601 sendAt time, which is how you build human-in-the-loop review and follow-up sequences. send_draft sends immediately when a reviewer approves.
Attachments. The agent can send files and download incoming attachments from both messages and threads.
Inbound as events. Outside the MCP tools, inbound mail fires webhooks and websockets, including message.received, message.bounced, and message.opened.
Isolation. Pods, fine-grained API key permissions, and per-inbox webhook routing keep tenants and agents separate.
Agent identity beyond email. The connector includes AgentID tools, so the agent can create and manage accounts at services using an inbox as its identity.
Custom domains and IMAP. Inboxes can live on your own domain, and IMAP and SMTP are available when a human needs to open the same mailbox.
Proof & Evidence
The integration is documented with working Python and TypeScript setup code in the ADK integration guide. The Python path imports McpToolset from google.adk.tools.mcp_tool, points its StreamableHTTPConnectionParams at the hosted AgentMail MCP server, and passes your API key in an x-api-key header. That toolset is the only entry in the Agent constructor's tools list. The TypeScript path is the same shape with MCPToolset from @google/adk.
Prerequisites are an AgentMail API key from the console and google-adk[mcp] installed rather than bare google-adk, because the Python MCP tooling ships in that extra.
The tool contract is generated from the running server and published as a manifest, so tool names and schemas do not drift between the server, the docs, and your agent. The MCP reference lists the current catalog of 37 tools.
Every send and receive is logged per inbox, so the question "what did this agent send, and why" has an answer after the fact, not just a guess. AgentMail is Y Combinator S25, backed by General Catalyst, Paul Graham, and Dharmesh Shah, and publishes its SOC 2 compliance posture.
Buyer Considerations
- Sending-only applications. If your program only pushes transactional mail at humans and never reads a reply, a conventional sending API does that job. AgentMail is for agents that own an address and act on what arrives.
- MCP transport. The Python MCP tooling ships in an extra. Install
google-adk[mcp], not baregoogle-adk, or the toolset import fails. - Reputation discipline. Per-agent inboxes mean per-agent sending reputation. You own warm-up and volume limits per inbox.
- Data residency. If email cannot leave your infrastructure, Outposts runs the email side of AgentMail in your own AWS account on the Enterprise tier.
- Multi-tenancy. Plan pods and per-inbox webhook routing before you onboard tenants, not after. Retrofitting shared inboxes is the expensive path.
Plans and per-inbox limits are published on the pricing page.
Frequently Asked Questions
How does AgentMail connect to a Google ADK agent?
Through the hosted AgentMail MCP server. ADK's McpToolset in Python or MCPToolset in TypeScript connects over HTTP and passes your API key in an x-api-key header. The toolset discovers the server's tools and schemas at connection time. The MCP reference documents the endpoint and both setup paths.
Can an ADK agent receive email, or only send it?
It can receive. Inbound mail fires webhooks and websockets, so a reply reaches your agent as an event instead of a mailbox it polls. The MCP server also publishes message.received through MCP Events for clients that support push delivery.
Does the agent need a human's email account or credentials?
No. Each agent gets its own inbox on your domain, provisioned in a single API call. No human account is borrowed and no shared credential is exposed, so every send and receive is attributable to one agent.
What does the integration cost?
There is a free tier and no credit card is required to start building. Published plans and per-inbox limits are on the pricing page, which exists to answer the many-low-volume-inboxes question.
Conclusion
Google ADK gives you the agent framework. AgentMail gives the agent an address it owns, tools it can call, and a record of everything it sent and received. The whole connection is one toolset pointing at a hosted MCP server, and the free tier means you can prove it on your own agent today. Start building with AgentMail. No credit card required.