Google Cloud Blueprint: Built for trust and control: Powering the next wave of AI agents: How Does It Work in Production?
TL;DR: Traditional REST APIs rely on human-paced OAuth tokens, which fail to secure autonomous AI agents operating at machine speed. To solve this, Google Cloud has shipped Workspace MCP servers, the Workspace CLI, and Google Cloud Agent Gateway, enforcing protocol-native policy checks, dedicated Agent Identities, and human-in-the-loop confirmations to secure the next wave of enterprise AI.
What Google Cloud Shipped & The Enterprise Problem It Solves
For over two decades, Google has protected 4 billion users and 13 million organizations in Workspace, alongside critical enterprise and government systems on Google Cloud. Workspace APIs currently handle more than 2.8 trillion calls a month. Public Google Drive API traffic alone is more than two-and-a-half times the volume of 2022, with more than 18 billion reads originating from API callers each day.
Architecturally, traditional REST APIs were designed for human-paced applications. In these models, a valid OAuth token implies explicit user intent. A person clicks a button, the application requests a token, and the API executes the read or write operation. As AI agents shift from reading information to acting autonomously across email, documents, datasets, and cloud infrastructure, this paradigm breaks down. A valid token is insufficient when an agent loops, reasons, and executes thousands of operations per minute. Policy checks, data boundaries, and human confirmation must live in the request path to prevent prompt injection or runaway execution loops.
To address this, Google Cloud has shipped a unified security model and interfaces for agentic workloads. These components provide builders with modern interfaces while giving organizations the visibility and control required to adopt AI agents.
The core releases include Workspace MCP servers, which are now generally available. These are dedicated remote servers for Gmail, Google Drive, Docs, Sheets, Slides, Calendar, Chat, and Tasks. They provide a standard interface with built-in permission checks, Data Loss Prevention (DLP) evaluations, and native human-in-the-loop confirmations for sensitive actions. They reject non-agent OAuth clients and integrate with Model Armor, Google Cloud's prompt-injection screening service.
Google also released the Workspace CLI for local agents, terminal workflows, and automation. It provides structured JSON outputs and scoped OAuth sign-in across Workspace services. On the infrastructure side, Google Cloud Agent Gateway operates as a protocol-native gateway for LLM, Model Context Protocol (MCP), and Agent-to-Agent (A2A) traffic. It verifies identities against the new Agent Registry, enforces IAM policies, applies outbound rules, and screens requests with Model Armor.
Under the new Workspace AI Tools Addendum, technical enforcement begins on February 1, 2027. AI agents must use Workspace MCP servers or the Workspace CLI rather than existing REST APIs. This transition ensures that every call is checked against organizational permissions, DLP rules, and classification labels.
Real-World Field Use Cases: Where This Moves the Needle
When we inspect production topologies, the shift from REST to agent-native interfaces solves specific operational bottlenecks. The following implementations demonstrate how these primitives apply to production environments.
1. High-Throughput Enterprise Workloads: The Agentic SOC
The Everyday Problem: Security operations centers have too many false positives, and traditional automation scripts lack the reasoning capabilities to investigate complex alerts across multiple data silos.
How It Works in Practice: Organizations deploy a multi-agent system using Google Kubernetes Engine (GKE) Autopilot and Gemini 4 Argon. The system routes requests through Agent Gateway to orchestrate a Triage and Investigation agent. This agent queries Mandiant threat intelligence and internal logs to investigate alerts.
The Tangible Impact: This architecture isolates tail-latency and quota boundaries under burst traffic. Security teams can prioritize high-priority threats instead of false positives, as detailed in the AI for Security blueprint.
2. Zero-Trust Governance & IAM: Financial Data Isolation
The Everyday Problem: Traditional service accounts grant broad access to cloud resources, creating vulnerabilities if an agent is compromised via prompt injection.
How It Works in Practice: Financial institutions register dedicated Agent Identities in Agent Registry. These identities have no shared or long-lived keys. When an agent attempts to read a sensitive Cloud Storage bucket or access a Drive document, Agent Gateway enforces IAM policies and routes custom checks through Service Extensions to Identity-Aware Proxy. Model Armor screens the prompt before execution.
The Tangible Impact: This enforces least-privilege boundaries. Sensitive financial records remain inside designated perimeters protected by VPC Service Controls and Principal Access Boundaries.
3. Production FinOps & Unit Economics: Runaway Loop Prevention
The Everyday Problem: Autonomous agents can enter infinite reasoning loops, consuming token budgets and driving up cloud costs.
How It Works in Practice: Administrators apply usage quotas to the Agent Identity in Agent Registry. Billing for Workspace agents begins on April 1, 2027. By routing all A2A and LLM traffic through Agent Gateway, organizations track exact token consumption per agent rather than per user.
The Tangible Impact: Engineering teams can optimize cost-per-request and commit utilization, ensuring that experimental agents do not exhaust production budgets.
Reference Architecture on Google Cloud
The following architecture demonstrates a secure, single-agent AI system using the Agent Development Kit (ADK) and Cloud Run, aligned with the Enterprise foundations blueprint. It illustrates the request path from a user prompt to a Workspace action, highlighting the interception points where Agent Gateway and Model Armor enforce policy.
flowchart LR
User["User / Trigger"] -->|HTTPS Request| CR["Cloud Run (ADK Agent)"]
subgraph GoogleCloudSecurityPerimeter["Google Cloud Security Perimeter"]
CR -->|A2A / LLM Protocol| AG["Agent Gateway"]
AG -->|Identity Check| AR[("Agent Registry")]
AG -->|Prompt Screening| MA["Model Armor"]
AG -->|IAM & Quota| IAM["Cloud IAM & Quotas"]
MA -->|Clean Prompt| LLM["Gemini 4 Argon"]
LLM -->|Tool Call| AG
end
subgraph WorkspaceBoundary["Workspace Boundary"]
AG -->|MCP Protocol| WMCP["Workspace MCP Server"]
WMCP -->|DLP & HITL Check| WAPI["Gmail / Drive APIs"]
end
classDef gcp fill:#e8f0fe,stroke:#4285f4,stroke-width:2px,color:#1a73e8;
classDef external fill:#f1f3f4,stroke:#9aa0a6,stroke-width:2px,color:#202124;
class CR,AG,AR,MA,IAM,LLM,WMCP gcp;
class User,WAPI external;
In this topology, the Cloud Run service hosts the agent logic. When the agent attempts to invoke an LLM or access a Workspace tool, the request does not go directly to the Vertex AI endpoint or the Drive REST API. Instead, it routes through Agent Gateway.
Agent Gateway extracts the Agent Identity and verifies it against Agent Registry. It then checks Cloud IAM for permission to invoke the requested model or tool. Before the payload reaches Gemini 4 Argon, Model Armor scans the input for prompt injection and jailbreak attempts. If the agent decides to draft an email based on the prompt, it issues a tool call back through Agent Gateway to the Workspace MCP Server. The MCP server evaluates Workspace DLP rules and, if the action is high-impact, triggers a human-in-the-loop confirmation before executing the change via the Gmail API.
Step-by-Step Implementation
Deploying this architecture requires provisioning the Agent Identity, configuring the gateway, and writing the agent logic using current 2026 SDKs.
First, register the Agent Identity using the Google Cloud CLI. This creates a dedicated identity bounded by organization, folder, and project quotas, distinct from traditional service accounts.
# Register a new Agent Identity in Agent Registry
gcloud alpha iam agent-identities create triage-agent-prod \
--project="secops-prod-9921" \
--display-name="SOC Triage Agent" \
--description="Autonomous agent for investigating security alerts"
# Bind the Agent Identity to a least-privilege IAM role
gcloud projects add-iam-policy-binding secops-prod-9921 \
--member="agentIdentity:triage-agent-prod@secops-prod-9921.iam.gserviceaccount.com" \
--role="roles/aiplatform.user"
Next, implement the agent logic using the Agent Development Kit (ADK) in Python. This script configures the agent to route its requests through Agent Gateway and utilize Gemini 4 Argon for frontier reasoning.
import os
from google.cloud import aiplatform
from google.adk import Agent, GatewayConfig, MCPTool
# Initialize Vertex AI with the specific project and location
aiplatform.init(project="secops-prod-9921", location="us-central1")
# Configure Agent Gateway routing and Model Armor screening
gateway_config = GatewayConfig(
agent_identity="triage-agent-prod@secops-prod-9921.iam.gserviceaccount.com",
enable_model_armor=True,
model_armor_profile="strict-prompt-injection-block",
enforce_default_deny_outbound=True
)
# Connect to the Workspace MCP Server for Drive access
drive_mcp_tool = MCPTool(
server_url="mcp://workspace.googleapis.com/drive/v1",
scopes=["https://www.googleapis.com/auth/drive.readonly"]
)
# Instantiate the agent using Gemini 4 Argon
soc_agent = Agent(
name="Triage Investigator",
model="gemini-4-argon",
gateway_config=gateway_config,
tools=[drive_mcp_tool],
system_instruction=(
"You are an autonomous SOC investigator. Analyze the provided alert, "
"retrieve relevant context from the incident response Drive folder, "
"and summarize the findings. Do not execute destructive actions."
)
)
# Execute a multi-step reasoning loop
response = soc_agent.run("Investigate alert ID 88291: Unusual outbound traffic from billing-db.")
print(response.text)
For local testing and terminal workflows, engineers use the Antigravity CLI (agy), which replaced the legacy Gemini CLI for unpaid tier and Google One users on June 18, 2026. Antigravity is optimized for Gemini 4 Argon and integrates directly with the Workspace CLI for local OAuth scoping.
# Authenticate the Workspace CLI with scoped access
workspace-cli auth login --scopes="drive.readonly,gmail.send"
# Execute a local reasoning task using Antigravity and Gemini 4 Argon
agy --model gemini-4-argon \
--agent-identity="local-dev-agent" \
--prompt="Analyze the latest threat report in my Drive and draft a summary email to the security team."
Production Readiness: FinOps, Quotas & Security Guardrails
Moving agentic workloads into production requires financial and security governance. Continuous autonomous execution alters cloud unit economics. A traditional application scales based on user requests. An agentic application scales based on the depth of its reasoning loops and the complexity of the tools it invokes.
To quantify this shift, we evaluate the Total Cost of Ownership (TCO) between two architectural patterns: a single-agent triage system running on Cloud Run using Gemini 3.8 Flash, and a multi-agent SOC system running on GKE Autopilot using Gemini 4 Argon (Pro-tier pricing).
π Production FinOps & TCO Simulation
Based on the latest Google SKU information
Production Workload Assumptions (us-central1 / asia-southeast1):
- Option A processes 500,000 automated triage events per month using Cloud Run and Flash-tier models.
- Option B processes 500,000 complex multi-step investigations using GKE Autopilot and Pro-tier models.
- Average input tokens per event: 2,000. Average output tokens per event: 500.
- Cloud Run execution time: 2 seconds per event, 1 vCPU, 1 GiB RAM.
- GKE Autopilot runs 5 replicas continuously (730 hours/month), each 2 vCPU, 4 GiB RAM.
| Architecture Option |
Google SKU Unit Price & Monthly Formula |
Estimated Monthly Cost |
| Single-Agent Triage (Cloud Run + Flash) |
Cloud Run vCPU (500k events * 2s): $2.4e-05/vCPU-second Γ 1,000,000 = $24.00
Cloud Run Memory (1 GiB * 2s * 500k): $2.5e-06/GiB-second Γ 1,000,000 = $2.50
Flash Input Tokens (1,000M): $0.15/1M input tokens Γ 1 = $0.15
Flash Output Tokens (250M): $0.6/1M output tokens Γ 0 = $0.15
Audit Log Storage (50 GiB): $0.02/GiB-month Γ 50 = $1.00 |
$27.80 / mo |
| Multi-Agent SOC (GKE Autopilot + Pro) |
GKE vCPU (5 pods * 2 vCPU * 730h): $0.0445/vCPU-hour Γ 7,300 = $324.85
GKE Memory (5 pods * 4 GiB * 730h): $0.00492/GiB-hour Γ 14,600 = $71.83
Pro Input Tokens (1,000M): $1.25/1M input tokens Γ 1 = $1.25
Pro Output Tokens (250M): $10/1M output tokens Γ 0 = $2.50
Audit Log Storage (200 GiB): $0.02/GiB-month Γ 200 = $4.00 |
$404.43 / mo |
| Net FinOps Impact (Monthly Savings) |
Comparing Option A to Option B |
93.1% TCO Reduction ($376.63 / mo) |
Beyond unit economics, production readiness mandates strict data boundaries. As outlined in the Deploying agents safely in your enterprise release, organizations must configure VPC Service Controls and Principal Access Boundaries to keep sensitive data inside designated perimeters. Context-Aware Access ensures that agents only operate from verified devices or trusted network origins.
Data retention policies are also critical. The Workspace AI Tools Addendum sets boundaries for AI tools using Workspace APIs. It prohibits permanent raw storage, model training, extended retention of derived data, or API scraping. Derived and user data are removed within a defined window and purged when a user disconnects the agent.
On Google Cloud, Sensitive Data Protection masks sensitive fields before data leaves the environment. Customer-managed encryption keys (CMEK) or external encryption keys provide a cryptographic kill switch, allowing security teams to cut off access to Cloud agent memory stores if Security Command Center or Wiz detects anomalous behavior. Revoking a Cloud Agent Identity or OAuth grant stops access at the protocol layer, ensuring that autonomous systems remain under human control.