Back to paths

Agent Gateway and Agent Registry

Once many agents call many tools, you need one place to control and see that traffic, and one catalogue of what is allowed to exist. Learn what Agent Gateway enforces and records, what Agent Registry's identifiers are for, and how both combine with agent identity.

advanced~25 min#agentic-ai#agents#security#governance
Chapter 6Secure and governLesson 4 of 5Show

Prerequisites: Agent Identity and least-privilege access


One agent is easy; fifty are not

With one agent, you can read its code to see which tools it calls. With fifty agents, built by different teams, calling MCP servers, internal endpoints and each other, nobody can. Two questions become hard to answer: what is allowed to exist, and what is actually happening.

The last lesson answered who is calling: each agent has its own identity and narrow roles. This lesson adds the other two pieces of runtime governance.

Follow one invoice agent's two calls through the gateway. Before the second call, to pdf-tools-online, predict what happens to it, then step on to check.

Simulation: gateway-registry-flow

Agent Registry: what exists

assigns distinct identifiers and identities to registered agents, MCP servers, endpoints and skills, so that you can discover capabilities, enforce access policies and route runtime traffic. It is the catalogue the rest of governance refers to. A team looking for an existing invoice agent searches the registry before building a new one.

Each entry has two kinds of identifier, for two jobs:

  • A registry URN, such as urn:agent:… or urn:mcp:…, which identifies the entry across the registry.
  • A resource name, such as projects/…/locations/…/agents/…, for governance. Policy bindings and gateway route rules use resource names. The registry's documentation is explicit: registry URNs cannot be used in IAM policy bindings, authorisation headers or gateway route rules.

If you register only what you approve, the registry becomes your list of approved targets.

Agents running on Google Cloud get a managed workload identity in SPIFFE format: the agent identity from the last lesson.

Agent Gateway: what may happen now

is where policy on agent traffic is enforced and observed. It sits on agent traffic, including calls to MCP servers, and centralises access policies, mTLS (mutual TLS, where both sides present certificates) and MCP security. For each call it can:

  1. Know the caller. The gateway has two modes. In Agent-to-Anywhere (egress) mode, for traffic out of the agent, the caller is the agent's identity, and IAP checks IAM Unified Access Policies that say which destinations that identity may reach. In Client-to-Agent (ingress) mode, for traffic into the agent from a client, the gateway authenticates the user's credentials; Unified Access Policies don't apply there. Agent Runtime supports both modes. Gemini Enterprise supports only Agent-to-Anywhere, so the gateway governs what its agents call, not who reaches them. On Cloud Run, Agent Gateway is in Limited Preview.
  2. Apply access policy: is this target approved in the registry, and may this agent call it? Policies name targets by their resource names.
  3. Screen content, with Model Armor templates configured on the gateway. They can screen traffic into the agent and traffic out of it, to MCP servers, models and other agents, within limits the next lesson covers.
  4. Record what happened, so the traffic can be monitored.

Because it is on the path, the gateway gives you one place to enforce rules and one place to see every call, instead of trusting each team to build both into each agent.

Putting the three together

PieceQuestionIn the invoice example
Agent identityWho is calling?The invoice agent's own principal
Agent RegistryWhat exists, and is it approved?finance-mcp is registered; pdf-tools-online is not
Agent GatewayMay this call happen now, and what happened?The call to finance-mcp passes and is logged; the call to pdf-tools-online is refused and logged

Design governance in that order. Give every agent its own identity. Register every agent, MCP server and endpoint you approve. Then route agent traffic through the gateway with policies that name the caller's identity and the target's resource name. If all of the agent's outbound traffic goes through the gateway, and its policy allows only the targets you registered, a call to an unreviewed server fails and the attempt is logged. Traffic that goes around the gateway is not covered, so routing is part of the design.

An auditor asks: 'Is this MCP server in our catalogue of approved servers?' Which piece answers that?

Recap

  • Identity answers who is calling, the registry what exists, and the gateway whether a call may happen now, and what happened.
  • Agent Registry catalogues agents, MCP servers, endpoints and skills. Policies and route rules use resource names, never URNs.
  • Agent Gateway enforces access policies on agent traffic that passes through it, can screen it with Model Armor, and records it, in one place.

Sources

Show 4 sourcesHide sources
SourcePublisherWhat it supports
Agent Registry identity and identifiers (opens in a new tab)docs.cloud.google.comGoogle Cloudlast updated 2026-11-10, retrieved 2026-11-17: assigns identifiers and identities to registered agents, MCP servers, endpoints and skills "so that you can discover capabilities, enforce access policies, and route runtime traffic"; registry URNs urn:agent: and urn:mcp:, which "can't be used in IAM policy bindings, authorization headers, or Agent Gateway route rules"; resource names for policies; a managed workload identity in SPIFFE format for agents on Google Cloud
Agent Gateway overview (opens in a new tab)docs.cloud.google.comGoogle Cloudretrieved 2026-11-17: "Centralize access policies, mTLS, and Model Context Protocol (MCP) security"; configuring Model Armor on a gateway; monitoring gateway traffic; inbound callers authenticated through Identity-Aware Proxy for Cloud Run, "available soon through an early preview", and IAP access policies for Agent Runtime and Gemini Enterprise
Agent Gateway for Runtime and Gemini Enterprise (opens in a new tab)(retrieved 2026-12-02: Agent Runtime supports Client-to-Agent (ingress) and Agent-to-Anywhere (egress) modes; "For Gemini Enterprise, Client-to-Agent mode is not supported"; in egress mode IAP evaluates IAM Unified Access Policies for the iap.googleapis.com egressViaIAP permission; Unified Access Policies are not applicable for Client-to-Agent mode). The overview also states that Agent Gateway is available, in Limited Preview, for agents on Cloud Run and on Kubernetes clusters outside Google Clouddocs.cloud.google.comGoogle Cloudrechecked 2026-12-02
Model Armor integration with Agent Gateway (opens in a new tab)docs.cloud.google.comGoogle Cloudlast updated 2026-11-10, retrieved 2026-11-17: protects "the incoming requests from the client to the agent" and "the outgoing requests from the agent to the external system", with their responses; egress covers MCP servers, external LLMs and other agents

Suggested videos

Show 3 videosHide videos

Review

Flashcards1 / 4

Which question does each of agent identity, Agent Gateway and Agent Registry answer?

Check yourself

Quick exam1 / 5 · 0 correct

All agent traffic goes through Agent Gateway. A developer points an agent at an MCP server they found online, which no one has reviewed. Where is the call stopped at run time?

Go deeper

Your notes on this lesson