
Google Cloud AI
Building a Custom Google Workspace Agent with ADK, MCP, and RAG
A permission-first architecture for a custom Google ADK agent grounded in Workspace content and connected to Gmail, Drive, Calendar, Docs, Sheets, and Chat tools.
At a glance
Google Cloud AI · 8 min read
Published August 14, 2026
What you’ll take away
- A practical framing for the problem
- Evaluation and delivery considerations
- A clear next step for your team
On this page
Define one Workspace job
A custom Workspace agent should begin with one repeatable job: prepare an account brief, assemble a project update, find supporting documents, draft a follow-up, or coordinate a meeting. This keeps tool permissions, retrieval scope, and evaluation criteria understandable.
Avoid granting broad Gmail, Drive, Calendar, and Chat access simply because the connectors exist. Map each user task to the minimum read and write operations required, then design an approval step for actions such as sending messages, sharing files, or scheduling events.
Use ADK for orchestration, not as a substitute for design
Google's Agent Development Kit provides the agent structure and deployment path, while tools connect the agent to Workspace or other systems. The application still needs clear instructions, state boundaries, tool descriptions, retries, error handling, and a policy for what the model may decide independently.
- Keep tools narrow and describe when each tool should and should not be used.
- Validate every tool input outside the model and return structured errors the agent can handle.
- Separate read tools from write tools so confirmation and auditing are easier to enforce.
- Use deterministic code for business rules and reserve the model for language and ambiguous reasoning.
Design RAG around permissions and freshness
A Workspace knowledge layer may combine Drive and Docs content with structured records from Sheets or external systems. Retrieval should preserve document ownership, sharing permissions, source links, and freshness metadata so the agent cannot surface content the current user could not access directly.
Use hybrid retrieval when exact names, identifiers, and phrases matter alongside semantic similarity. Return compact passages with provenance instead of dumping full documents into the model context, and evaluate whether the retrieved evidence was sufficient before scoring the final answer.
Workspace MCP is useful—and currently a preview
Google Workspace provides remote MCP servers for products including Gmail, Drive, Calendar, Docs, Sheets, Slides, and Chat. Google's documentation currently identifies this capability as part of the Workspace Developer Preview Program.
That makes MCP valuable for prototyping and planned integrations, but production architecture should confirm tenant eligibility, available operations, regional and security requirements, and the preview support model. Direct Workspace APIs remain an alternative when a required capability or production commitment is not available through MCP.
Test the complete workflow
Evaluate retrieval, tool selection, tool arguments, task completion, and user-visible output separately. Test missing permissions, duplicate filenames, stale documents, ambiguous people or calendar references, rate limits, and partial tool failures.
- Verify that every answer links back to the correct source when evidence is required.
- Require confirmation before external communication or changes to shared resources.
- Trace tool calls and latency without retaining unnecessary message or document content.
- Sample real user sessions after launch and convert confirmed failures into regression tests.
The practical takeaway
The durable architecture is permission-first: ADK orchestrates, Workspace tools perform narrow operations, the RAG layer returns authorized evidence, deterministic code protects business rules, and evaluation verifies the end-to-end job. That structure remains useful whether the tool connection uses preview MCP servers or established Workspace APIs.
Official references
Need help applying this?
Turn the idea into a governed first workflow.
We can help scope the data, integrations, evaluation plan, and operating ownership behind the implementation.