Agent Gateway for Cloud Run overview

Agent Gateway extends Gemini Enterprise Agent Platform governance to AI agents that you build and deploy on Cloud Run. By routing outbound requests from your Cloud Run services through a self-managed Agent Gateway backed by Secure Web Proxy, you can enforce unified access policies, inspect prompts and tool payloads for content safety, and capture logs and traces without changing your agent application code.

For complete step-by-step setup instructions, see Govern agents with Agent Gateway in the Cloud Run documentation.

Benefits

Using Agent Gateway with Cloud Run provides the following capabilities for your agent workloads:

  • Enforce least-privilege access rules on outbound calls to Model Context Protocol (MCP) servers, tools, and external endpoints based on each service's cryptographic Agent Identity.
  • Attach Model Armor templates through Service Extensions extension bindings to scan prompts and responses for prompt injection, jailbreaks, and sensitive data leakage.
  • Route outbound container traffic with Cloud Run ambient networking and Direct VPC egress without building custom proxy logic into your agent framework.
  • Host your gateway in the same Google Cloud project as your Cloud Run service, or share a central gateway across multiple service projects using Shared VPC.
  • Monitor policy decisions, MCP tool invocations, and request latency in Cloud Logging and Cloud Trace.

Key components

A self-managed Agent Gateway deployment for Cloud Run combines the following components:

How it works

When you deploy a Cloud Run service with --ambient-networking, --vpc-egress=all, --functional-type=agent, and --identity-type=agent-identity, Cloud Run provisions an ambient Envoy sidecar and assigns an Agent Identity principal to the service.

You create a Network Services API EgressRouting policy that directs outbound traffic from your Cloud Run service to a Secure Web Proxy instance associated with your self-managed Agent Gateway resource. The ambient sidecar sends outbound connections over Direct VPC egress through an mTLS CONNECT tunnel that carries your agent's identity to Secure Web Proxy.

Secure Web Proxy terminates outbound TLS sessions using a certificate authority from Certificate Authority Service or your private PKI, evaluates ALLOW authorization policies for MCP methods and model endpoints, and calls IAP and Model Armor through extension bindings before forwarding approved requests to their destination.

Supported regions

You can use Agent Gateway on Cloud Run in the following regions:

  • europe-west1
  • us-central1

What's next