As an administrator of Gemini Enterprise, you can add an A2A agent from
Agent Registry to a Gemini Enterprise app.

You can apply access control policies to
traffic through Agent Gateway. These policies let you enforce egress
governance to control traffic to agents.

## About A2A agents and Agent Registry

[Agent2Agent (A2A) Protocol](https://a2a-protocol.org/) is an open communication
protocol and a universal language for agents. The protocol enables agents from
different builders and platforms to discover each other, collaborate, and
securely delegate tasks.

[Agent Registry](https://docs.cloud.google.com/agent-registry/overview.md.txt) is a centralized,
queryable catalog that acts as the single source of truth for discovering,
tracking, and managing A2A agents, endpoints, and MCP servers.

The A2A agents in the registry can be custom agents built by you and your
colleagues and deployed on various runtimes such as
Agent Runtime on Gemini Enterprise Agent Platform, Cloud Run or
Google Kubernetes Engine (GKE). These agents can also be agents built in our Google
products, such as Google Workspace.

You can associate the agents in Agent Registry with your
Gemini Enterprise apps to make them available to the app's end users.

### Supported A2A agent connectivity

A2A agent connectivity is supported through Agent Gateway across
the following routing and security configurations:

- **Public network routing** : Traffic is routed over the public internet to
  externally reachable A2A endpoints, through an Agent Gateway
  that's deployed with or without a connectivity template
  (`AgentConnectivityTemplate`).

- **Private network routing** : Traffic is routed over internal VPC networks to
  private A2A endpoints, through an Agent Gateway that's
  deployed with a connectivity template (`AgentConnectivityTemplate`), a
  Private Service Connect interface (PSC-I), and Cloud DNS peering.

- **Certificate authority (CA) requirement** : In both public and private
  deployment scenarios, the target A2A agent endpoint must use TLS/HTTPS backed
  by a publicly or privately trusted certificate authority (CA). Endpoints that
  use a private CA or a self-signed certificate require a Certificate Manager
  `TrustConfig` resource that's configured in the connectivity template
  (`AgentConnectivityTemplate`).

## About Agent Gateway

Agent Gateway is
the managed regional networking component of
Agent Platform that acts as the traffic
controller and runtime policy enforcement point for A2A agents, MCP servers, and
endpoints. It secures and governs connectivity: between clients and A2A agents;
A2A agents and backend tools; or A2A agents and other agents.

Before you can associate A2A agents with your Gemini Enterprise apps, you
need to have set up an Agent Gateway through which agent traffic
can be routed. See [Before you begin](https://docs.cloud.google.com/gemini/enterprise/docs/import-govern-agent-registry.md.txt#prerequisites) below.

## Regional constraints for the registry, gateway, and app

To ensure compliance with data residency requirements, both
Agent Registry and Agent Gateway resources are
project-and-region-specific.

A Agent Gateway must be configured to associate with a
Agent Registry that is in a region compatible with the
Gemini Enterprise app's operational region. This prevents violations of
data residency conventions. For example, a Gemini Enterprise app created in
the US region must use an Agent Gateway configured with a
US-regional Agent Registry, not a global one.

For Gemini Enterprise apps, the regional alignment is strictly
enforced through a specific binding process:

- The Gemini Enterprise app must bind only to an
  Agent Gateway located within one of the allowed regions for
  that app.

- The selected Agent Gateway must be associated with an
  Agent Registry.
  This Agent Registry must also be located in the same specific
  region as the Agent Gateway and the app.

- This means the three components (app, gateway, and registry) must be
  regionally aligned. The table below provides the specific region mappings:

| Gemini Enterprise app location | Agent Gateway location | Agent Registry location |
|---|---|---|
| `global` | `us-central1` | `us-central1` |
| `us` | `us-central1` | `us-central1` |
| `eu` | `europe-west1` | `europe-west1` |

## Limitations

The following limitations apply when you import agents from
Agent Registry:

- You can only discover and import agents from Agent Registry if
  the registry is associated with the Agent Gateway set up for your
  Gemini Enterprise app.

- You can apply governance policies only to agents residing within the single
  registry associated with the Agent Gateway.

- Direct communication between Gemini Enterprise agents, or between a
  Gemini Enterprise agent and a Gemini Enterprise data
  connector (including MCP-based connectors such as the custom MCP server)
  doesn't trigger Agent Gateway policy enforcement.

## Before you begin

Before you begin, make sure you've completed the following prerequisites:

- You have the [Gemini Enterprise
  Admin](https://docs.cloud.google.com/gemini/enterprise/docs/access-control#discoveryengine.agentspaceAdmin)
  role.

- You've set up a gateway to route agent traffic through
  Agent Gateway. For more information, see [Route
  Gemini Enterprise traffic through
  Agent Gateway](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/gateways/agent-gateway-ge-deploy).

- The A2A agent that you want to import must be registered in
  Agent Registry with a valid [Agent Card](https://a2a-protocol.org/v0.3.0/specification/#agent-card). The Agent Card must
  follow the [A2A 0.3.0 specification](https://a2a-protocol.org/v0.3.0/specification/)
  and explicitly set the `protocolVersion` field to `0.3.0`.

## Import agents from Agent Registry to a Gemini Enterprise app

Importing an A2A agent from Agent Registry into your
Gemini Enterprise app lets you make the agent available to the app's end
users.

> [!IMPORTANT]
> **Important:** When you configure, and allow your End Users to access, an agent imported from Agent Registry, their query string --- which may be rewritten based on prior conversation context --- and tool parameters may be sent to the agent (and to any tools or MCP servers the agent invokes), and those systems may be able to link this data with their identity. Data in such systems is subject to the agent provider's Terms of Service and Privacy Policy.

### Console

To import an agent from Agent Registry to a
Gemini Enterprise app, do the following:

1. In the Google Cloud console, go to the **Gemini Enterprise** page.

   [Gemini Enterprise](https://console.cloud.google.com/gemini-enterprise/)
2. Click the name of the app that you want to associate an A2A agent with.

3. Click **Agents**.

4. Click **+ Add agent**.

5. In the **Choose an agent type** pane, find **Agents from
   Agent Registry** ,
   and click **Add**.

6. Search for the agent that you want to add, or find it in the list of agents
   from the Agent Registry that's associated with your
   Agent Gateway. On the agent card, click **Add agent**.

7. Review the agent details, and click **Next**.

8. Do one of the following:

   - If the agent is publicly available or if
     permission for a runtime already exists, click **Skip \& Finish**.

   - Otherwise, review or enter the **Provider credentials** and
     **Additional details** , and click **Finish**.

     | Field | Description |
     |---|---|
     | **Client ID** | The unique identifier of the OAuth application that you registered with your identity provider to represent Gemini Enterprise. |
     | **Client secret** | The confidential key associated with the OAuth application that you registered with your identity provider to represent Gemini Enterprise. |
     | **Authorization URL** | The URL that users use to authorize Gemini Enterprise to access the agent. For example, `https://accounts.google.com/o/oauth2/v2/auth?client_id=123...abc.apps.googleusercontent&redirect_uri=https%3A%2F%2Fvertexaisearch.cloud.google.com%2Foauth-redirect&oauth-redirect&include_granted_scopes=true&response_type=code&access_type=offline&prompt=consent`. > [!NOTE] > **Note:** Make sure that your OAuth app has this redirect URI: `https://vertexaisearch.cloud.google.com/oauth-redirect` |
     | **Token URL** | The endpoint used to exchange the authorization code for an access token. For example, if the agent is hosted by Google, the token URL is `https://oauth2.googleapis.com/token`. |
     | **Scopes** | The permissions that define what actions Gemini Enterprise can perform on behalf of a user, or what data it can access. Gemini Enterprise requests these scopes during user authorization. For example, `https://www.googleapis.com/auth/cloud-platform`. <br /> When you specify scopes, consider the following: - Provide a space-separated list of scopes. For example: `read write`. - Ensure the scopes are sufficient to let the user sign in and use the agent. |
     | **PKCE verification enabled** | Select this if Proof Key for Code Exchange is required by the agent. |
     | **Use HTTP Basic authentication** | Select this to send the client ID and client secret in the HTTP `Authorization` header using Basic authentication instead of in the token request body. Some OAuth providers require this method. |

     <br />

   > [!NOTE]
   > **Note:** If your A2A agent also uses [Agent Identity auth manager](https://docs.cloud.google.com/iam/docs/auth-with-3lo-v2.md.txt) for 3-legged OAuth (3LO) to access downstream MCP servers or third-party APIs on behalf of the end user, see [Configure 3-legged OAuth with Agent Identity auth manager](https://docs.cloud.google.com/gemini/enterprise/docs/register-and-manage-an-a2a-agent.md.txt#configure-auth-manager).

9. To make the agent available to the app's end users, do the following:

   1. Navigate to the **User permissions** tab for the agent: **Apps** \>
      <var translate="no">APP_NAME</var> \> **Agents** \> <var translate="no">AGENT_NAME</var> \>
      **User permissions**.

   2. Click **Add user**.

   3. In the **Add user permissions roles to agent** dialog, assign the
      **Agent User** role to a user, a group, or all users.

## Set up and apply egress governance policies

Using Agent Gateway, you can assess and apply semantic and
IAM control
[policies](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/policies/overview.md.txt) to egress
agent traffic. You can create granular egress policies to manage agent-to-agent
access for your A2A agents.

You define allow and deny rules restricting an agent's access to specific
entries within Agent Registry.

To create and apply egress governance rules to agents, do one of the following:

- [Create IAM agent
  policies](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/policies/assign-identity-iam)

- [Configure semantic governance
  policies](https://docs.cloud.google.com/gemini-enterprise-agent-platform/govern/policies/configure-semantic-governance)

## What's next

- [Test the agent](https://docs.cloud.google.com/gemini/enterprise/docs/agents-overview.md.txt#manage_agents)