To interact with Agent Registry programmatically, you can use
Google Cloud client libraries or the Agent Development Kit (ADK).
The Google Cloud [client libraries](https://docs.cloud.google.com/agent-registry/reference/libraries.md.txt#client-libraries) let you manage
Agent Registry resources using standard Google Cloud APIs, while the
[ADK](https://docs.cloud.google.com/agent-registry/reference/libraries.md.txt#adk) helps you build, evaluate, and deploy orchestrator
agents.

## Client libraries

Google Cloud client libraries are the recommended way to call the
Agent Registry API programmatically. Client libraries use the latest features of
Agent Registry, provide an idiomatic experience for your supported programming
language, and automatically handle authentication, retry logic, and pagination.

The Agent Registry API is supported in the following languages:

- [C#](https://docs.cloud.google.com/dotnet/docs/reference.md.txt)
- [Go](https://docs.cloud.google.com/go/docs/reference.md.txt)
- [Java](https://docs.cloud.google.com/java/docs/reference.md.txt)
- [Node.js](https://docs.cloud.google.com/nodejs/docs/reference.md.txt)
- [PHP](https://docs.cloud.google.com/php/docs/reference.md.txt)
- [Python](https://docs.cloud.google.com/python/docs/reference.md.txt)
- [Ruby](https://docs.cloud.google.com/ruby/docs/reference.md.txt)
- [Rust](https://docs.rs/google-cloud-agentregistry-v1/latest)

Google Cloud client libraries fully support
[VPC Service Controls](https://docs.cloud.google.com/vpc-service-controls/docs/overview.md.txt), providing secure data
perimeters for your API interactions.

## ADK

The ADK is an open-source Python framework for building,
evaluating, and deploying AI agents.

The ADK provides abstractions for Agent Registry, automatically
resolves connection details, and handles authentication to produce
ADK components that are ready to use. By using the
ADK, your orchestrator agents can dynamically resolve endpoints,
discover [A2A skills](https://docs.cloud.google.com/agent-registry/skills-architecture.md.txt#standalone-vs-a2a),
and retrieve MCP tools managed within Agent Registry.

### Install the ADK

Install or upgrade to the latest version of the ADK with the
A2A, Agent Identity, and MCP dependencies:

### pip

```bash
pip install --upgrade "google-adk[a2a,agent-identity,mcp]"
```

### uv

```bash
uv add "google-adk[a2a,agent-identity,mcp]"
```

You must upgrade to at least `google-adk>=1.29.0`.

### Python API reference

Review the Python API reference documentation for the ADK:

- [ADK Python API reference](https://google.github.io/adk-docs/api-reference/python/)
- [The GitHub `/google/adk-python` repository](https://github.com/google/adk-python)

### Use the ADK with Agent Registry

You can use the `AgentRegistry` client provided in the ADK to
perform lookups and manage your resources from your Python code.

Set up the following environment variables:

```bash
export GOOGLE_CLOUD_PROJECT=PROJECT_ID
export GOOGLE_CLOUD_LOCATION=LOCATION
```

Replace the following:

- `PROJECT_ID`: the project ID of your [governance project](https://docs.cloud.google.com/agent-registry/overview.md.txt#governance-project) for single-project setups. If you configured a [management boundary](https://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txt), specify the ID of your [management project](https://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txt#management-project) for boundary-wide usage, or specify a member project ID for single-project operations.
- `LOCATION`: the registry region or location, such as `us-central1`.

The following example demonstrates how to initialize the client, discover
agents, and dynamically instantiate an MCP toolset directly from the registry:

```python
import os
from google.adk.integrations.agent_registry.agent_registry import AgentRegistry

# Initialize the client targeting your governance project and location
project_id = os.environ.get("GOOGLE_CLOUD_PROJECT")
location = os.environ.get("GOOGLE_CLOUD_LOCATION", "global")

registry = AgentRegistry(
    project_id=project_id,
    location=location
)

# Discover agents by a required A2A skill, for example, translation
translator_agents = registry.list_agents(
    filter_str='skills.tags:"translation"'
)

# Connect to a remote A2A agent using its resource name in short or full format
# Short formats automatically imply the client's configured project and location
# Short format: "agents/AGENT_ID"
# Full format: f"projects/{project_id}/locations/{location}/agents/AGENT_ID"
agent_name = "agents/AGENT_ID"
summarizer_agent = registry.get_remote_a2a_agent(
    agent_name=agent_name
)

# Retrieve an MCP toolset using its resource name in short or full format
# Short formats automatically imply the client's configured project and location
# Short format: "mcpServers/SERVER_ID"
# Full format: f"projects/{project_id}/locations/{location}/mcpServers/SERVER_ID"
mcp_server_name = "mcpServers/SERVER_ID"
bq_toolset = registry.get_mcp_toolset(
    mcp_server_name=mcp_server_name
)
```

Replace the following:

- `AGENT_ID`: your agent ID, for example, `agentregistry-1234-abcd`.
- `SERVER_ID`: the MCP server ID, for example, `agentregistry-5678-efgh`.

For detailed task-based instructions on how to use the ADK to
build dynamic agent workflows, see
[Integrate Agent Registry with ADK](https://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txt).