In Agent Registry,
[bindings](https://docs.cloud.google.com/agent-registry/component-lifecycle-and-discovery.md.txt#bindings) let your
orchestrator agents connect to downstream agents, MCP servers, and endpoints
without hardcoding connection or authentication details in your code. You can
create, view, update, and delete bindings in Agent Registry to manage
resource connections and delegated permissions.

## Before you begin

1. [Set up Agent Registry](https://docs.cloud.google.com/agent-registry/setup.md.txt).
2. For a single-project setup, get
   [the project ID](https://support.google.com/googleapi/answer/7014113)
   of the [governance project](https://docs.cloud.google.com/agent-registry/overview.md.txt#governance-project)
   where Agent Registry is enabled. If you configured a
   [management boundary](https://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txt) for multiple
   projects, use the ID of your management project for boundary-wide discovery
   and registration, or specify a member project ID for single-project
   operations.

3. Register the source and target components. For more information, see
   [Registration models](https://docs.cloud.google.com/agent-registry/component-lifecycle-and-discovery.md.txt#registration-models).

4. If you want to configure bindings for delegated permissions, create an auth
   provider with
   [Agent Identity auth manager](https://docs.cloud.google.com/iam/docs/agent-identity-overview.md.txt#agent-auth-manager).
   For more information, see
   [Authenticate to tools and resources](https://docs.cloud.google.com/agent-registry/authenticate-toolsets.md.txt).

5. To use the Google Cloud CLI commands in this document,
   [set up your gcloud CLI environment](https://docs.cloud.google.com/agent-registry/setup.md.txt#set-up-cli).

### Required roles

<br />


To get the permissions that
you need to manage bindings in Agent Registry,

ask your administrator to grant you the
following IAM roles on the [governance project](https://docs.cloud.google.com/agent-registry/overview.md.txt#governance-project)
where Agent Registry is enabled:

- Create, update, and delete bindings: [Agent Registry API Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/agentregistry.md.txt#agentregistry.admin) (`roles/agentregistry.admin`)
- View bindings: [Agent Registry API Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/agentregistry.md.txt#agentregistry.viewer) (`roles/agentregistry.viewer`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## Binding scenarios

You can use bindings to connect resources and delegate permissions. For example,
you can use bindings in the following scenarios:

- **Resource connections**: link a source agent to a target resource, such as another agent, an MCP server, or an endpoint. This scenario lets you map out multi-agent workflows where a primary orchestrator delegates tasks to specialized subagents or tools.
- **Delegated permissions** : associate an agent with an [auth provider](https://docs.cloud.google.com/agent-registry/component-lifecycle-and-discovery.md.txt#auth-providers) to let your agent connect to external targets or custom tools using its own credentials or on behalf of an individual user. This binding is required if your agent needs to authenticate to remote MCP servers or tools using OAuth tokens or API keys. With bindings, you don't have to manually define auth providers in your code. For detailed instructions, see [Create an auth provider binding](https://docs.cloud.google.com/agent-registry/manage-bindings.md.txt#auth-provider) in this document.

You can create and manage bindings in a supported regional location, a
supported multi-region, or the `global` location. For more
information about supported locations, see
[Agent Registry locations](https://docs.cloud.google.com/agent-registry/locations.md.txt).

## Create a binding

Create a binding to connect a source agent to a target resource:

### gcloud

Run the
[`gcloud agent-registry bindings create`](https://docs.cloud.google.com/sdk/gcloud/reference/agent-registry/bindings/create.md.txt)
command:

```bash
gcloud agent-registry bindings create BINDING_NAME \
    --project=PROJECT_ID \
    --location=REGION \
    --display-name="DISPLAY_NAME" \
    --source-identifier="SOURCE_ID" \
    --target-identifier="TARGET_ID"
```

Replace the following:

- `BINDING_NAME`: the name you want to give to the binding, for example, `my-custom-binding`.
- `PROJECT_ID`: the project ID.
- `REGION`: the registry region.
- `DISPLAY_NAME`: the human-readable name that you want to give to your binding, for example, `My Custom Binding`.
- `SOURCE_ID`: the [agent identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#agent-identifiers) of the source agent in Uniform Resource Name (URN) format.
- `TARGET_ID`: the [registry identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#registry-identifiers) of the target resource in URN format, such as an [agent identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#agent-identifiers), [MCP server identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#mcp-server-identifiers), or [endpoint identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#endpoint-identifiers).

### Terraform

To create a binding between a source agent and a target resource, configure a
`google_agent_registry_binding` resource. A binding requires the `target`
block:

```terraform
resource "google_agent_registry_binding" "agent_binding" {
  location     = "REGION"
  binding_id   = "BINDING_NAME"
  display_name = "DISPLAY_NAME"
  description  = "Connects a source agent to a target resource."

  source {
    identifier = "SOURCE_ID"
  }

  target {
    identifier = "TARGET_ID"
  }
}
```

Replace the following:

- `REGION`: the registry region.
- `BINDING_NAME`: the unique name you want to give to the binding.
- `DISPLAY_NAME`: the human-readable name of the binding.
- `SOURCE_ID`: the [agent identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#agent-identifiers) of the source agent in URN format.
- `TARGET_ID`: the [registry identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#registry-identifiers) of the target resource in URN format.

### Create an auth provider binding

You can associate an agent with an auth provider for delegated permissions.
Before you create this binding, you must first create the auth provider with the
[auth manager](https://docs.cloud.google.com/iam/docs/agent-identity-overview.md.txt#agent-auth-manager).
For more information, see
[Authenticate to tools and resources](https://docs.cloud.google.com/agent-registry/authenticate-toolsets.md.txt).

When specifying the `--auth-provider-binding` resource name, you must use your
project ID:

### gcloud

Run the
[`gcloud agent-registry bindings create`](https://docs.cloud.google.com/sdk/gcloud/reference/agent-registry/bindings/create.md.txt)
command with the `--auth-provider-binding` flag:

```bash
gcloud agent-registry bindings create BINDING_NAME \
    --project=PROJECT_ID \
    --location=REGION \
    --display-name="DISPLAY_NAME" \
    --source-identifier="SOURCE_ID" \
    --target-identifier="TARGET_ID" \
    --auth-provider-binding="projects/PROJECT_ID/locations/REGION/authProviders/AUTH_PROVIDER_ID"
```

Replace the following:

- `BINDING_NAME`: the unique name you want to give to the binding.
- `PROJECT_ID`: the project ID.
- `REGION`: the registry region.
- `DISPLAY_NAME`: the human-readable name of the binding.
- `SOURCE_ID`: the [agent identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#agent-identifiers) of the source agent in URN format.
- `TARGET_ID`: the [registry identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#registry-identifiers) of the target resource in URN format.
- `AUTH_PROVIDER_ID`: the ID of your auth provider.

### Terraform

To configure an auth provider binding in Terraform, specify the
`auth_provider_binding` block with the resource name of your auth provider,
along with its scopes and continue URI:

```terraform
resource "google_agent_registry_binding" "auth_binding" {
  location     = "REGION"
  binding_id   = "BINDING_NAME"
  display_name = "DISPLAY_NAME"

  source {
    identifier = "SOURCE_ID"
  }

  target {
    identifier = "TARGET_ID"
  }

  auth_provider_binding {
    auth_provider = "projects/PROJECT_ID/locations/REGION/authProviders/AUTH_PROVIDER_ID"
    scopes        = [SCOPES]
    continue_uri  = "CONTINUE_URI"
  }
}
```

Replace the following:

- `REGION`: the registry region.
- `BINDING_NAME`: the unique name you want to give to the binding.
- `DISPLAY_NAME`: the human-readable name of the binding.
- `SOURCE_ID`: the [agent identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#agent-identifiers) of the source agent in URN format.
- `TARGET_ID`: the [registry identifier](https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt#registry-identifiers) of the target resource in URN format.
- `PROJECT_ID`: the project ID.
- `AUTH_PROVIDER_ID`: the ID of the auth provider.
- `SCOPES`: a comma-separated list of OAuth 2.0 scopes, for example, `"https://www.googleapis.com/auth/cloud-platform"`.
- `CONTINUE_URI`: the continue URI of the auth provider, for example, `https://example.com/continue`.

For examples of how to use these bindings in your agent code, see
[Resolve bindings in your Agent Development Kit (ADK) code](https://docs.cloud.google.com/agent-registry/authenticate-toolsets.md.txt#bindings-in-code).

## List bindings

List all bindings in a specific location by running the
[`gcloud agent-registry bindings list`](https://docs.cloud.google.com/sdk/gcloud/reference/agent-registry/bindings/list.md.txt)
command:

```bash
gcloud agent-registry bindings list \
    --project=PROJECT_ID \
    --location=REGION
```

Replace the following:

- `PROJECT_ID`: the project ID.
- `REGION`: the registry region.

## View binding details

Retrieve the details of a single binding by running the
[`gcloud agent-registry bindings describe`](https://docs.cloud.google.com/sdk/gcloud/reference/agent-registry/bindings/describe.md.txt)
command:

```bash
gcloud agent-registry bindings describe BINDING_NAME \
    --project=PROJECT_ID \
    --location=REGION
```

Replace the following:

- `BINDING_NAME`: the name of the binding.
- `PROJECT_ID`: the project ID.
- `REGION`: the registry region.

## Update a binding

Update the parameters of an existing binding, such as its display name or
description:

### gcloud

Run the
[`gcloud agent-registry bindings update`](https://docs.cloud.google.com/sdk/gcloud/reference/agent-registry/bindings/update.md.txt)
command:

```bash
gcloud agent-registry bindings update BINDING_NAME \
    --project=PROJECT_ID \
    --location=REGION \
    --display-name="NEW_DISPLAY_NAME"
```

Replace the following:

- `BINDING_NAME`: the name of the binding you want to update.
- `PROJECT_ID`: the project ID.
- `REGION`: the registry region.
- `NEW_DISPLAY_NAME`: the new human-readable name for the binding.

### Terraform

To update a binding's display name or description using Terraform, modify
the existing `google_agent_registry_binding` resource in your configuration
and run `terraform apply`.

## Delete a binding

To remove a connection between resources, delete the binding:

### gcloud

Run the
[`gcloud agent-registry bindings delete`](https://docs.cloud.google.com/sdk/gcloud/reference/agent-registry/bindings/delete.md.txt)
command:

```bash
gcloud agent-registry bindings delete BINDING_NAME \
    --project=PROJECT_ID \
    --location=REGION
```

Replace the following:

- `BINDING_NAME`: the name of the binding you want to delete.
- `PROJECT_ID`: the project ID.
- `REGION`: the registry region.

### Terraform

Remove the `google_agent_registry_binding` resource representing the binding
from your Terraform configuration, and then run `terraform apply`.

## What's next

- Learn how to [authenticate to tools and resources](https://docs.cloud.google.com/agent-registry/authenticate-toolsets.md.txt) using auth provider bindings.
- Learn how to [resolve endpoints and build orchestrators](https://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txt) using ADK.