Set up Agent Registry

To register and discover your AI agents and Model Context Protocol (MCP) servers in Agent Registry, you must enable the Agent Registry API in your Google Cloud project. Agent Registry operates at the project level, letting you discover and manage agents deployed within the specific project where the API is enabled.

This document explains how to set up Agent Registry and enable the required API.

Before you begin

To set up Agent Registry, use an existing project or create a new one.

Required roles

To get the permissions that you need to set up Agent Registry, ask your administrator to grant you the following IAM roles on your Google Cloud project:

For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Set up your gcloud CLI environment

If you plan to use the Google Cloud CLI for Agent Registry, follow these steps:

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

    At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

  2. Install the alpha component:

    gcloud components install alpha
    
  3. Make sure that the most recent version of Google Cloud CLI is installed:

    gcloud components update
    

Enable the Agent Registry API

Console

Roles required to enable APIs

To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

Enable the API

gcloud

Enable the Agent Registry API in your project:

gcloud services enable agentregistry.googleapis.com \
    --project=PROJECT_ID

Replace PROJECT_ID with the ID of your project.

After enabling the Agent Registry API, you can begin registering and discovering agents in this project.

Grant permissions

To view and manage services in Agent Registry, you must grant users the appropriate Identity and Access Management permissions.

Grant your users one or more of the following Agent Registry roles:

  • Agent Registry API Viewer (roles/agentregistry.viewer): View agents, tools, and their attributes.
  • Agent Registry API Editor (roles/agentregistry.editor): Edit access to Agent Registry resources.
  • Agent Registry API Admin (roles/agentregistry.admin): Perform all actions, including manually registering agents and updating metadata.

To learn how to grant IAM roles on a project, see Manage access to projects, folders, and organizations.

Change your Agent Registry project

If you want to change the project where you use Agent Registry and remove dependencies from the old project, disable the Agent Registry API in that project. You can then enable the Agent Registry API in another project. Your data isn't migrated, and you must recreate your resources in this new project.

Disable the Agent Registry API

If you no longer need Agent Registry, disable the Agent Registry API on the project:

Console

  1. In the Google Cloud console, go to the Agent Registry API management page:

    Go to Agent Registry API

  2. From the project picker, select the Google Cloud project where you set up Agent Registry.

  3. Click Disable API.

  4. In the confirmation dialog, click Disable.

gcloud

gcloud services disable agentregistry.googleapis.com \
  --project=PROJECT_ID

Replace PROJECT_ID with the ID of the project.

What's next