agent-platform-agent-registry

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<!-- disableFinding(LINE_OVER_80) -->
<!-- disableFinding(LINE_OVER_80) -->

Google Cloud Agent Registry

Google Cloud Agent Registry

Interact with Google Cloud Agent Registry using
gcloud agent-registry
(
agents
,
mcp-servers
,
services
,
endpoints
,
bindings
,
skills
,
findings
,
publishers
,
ai-applications
,
operations
),
gcloud beta run
(
--functional-type
and
--identity-type
for automatic registration of Cloud Run services and jobs), Kubernetes manifests and scripts/annotate_gke.py (GKE automatic registration),
gcloud resource-manager
(
boundary-configs
,
capability-configs
,
boundaries
, and
tags bindings
for management boundaries), and Python ADK (
google-adk
).
使用
gcloud agent-registry
(
agents
、
mcp-servers
、
services
、
endpoints
、
bindings
、
skills
、
findings
、
publishers
、
ai-applications
、
operations
)、
gcloud beta run
(
--functional-type
和
--identity-type
,用于自动注册 Cloud Run services 和 jobs)、Kubernetes manifests 和 scripts/annotate_gke.py(GKE 自动注册)、
gcloud resource-manager
(
boundary-configs
、
capability-configs
、
boundaries
,以及用于管理边界的
tags bindings
)以及 Python ADK(
google-adk
)与 Google Cloud Agent Registry 交互。

Usage Attribution

使用归属

MUST READ: Before executing any
gcloud
, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.
必须阅读:在执行任何
gcloud
、REST API 或 MCP 命令之前,你必须阅读并遵循 使用归属 中的说明。

Workflow

工作流

  1. Resolve session context — at the start of each session, silently run:
    bash
    gcloud config get-value project 2>/dev/null
    gcloud config get-value compute/region 2>/dev/null
    Store the results as
    SESSION_PROJECT
    and
    SESSION_LOCATION
    and use them as defaults.
  2. Parse the user's request to identify the target resource and action.
  3. Construct the
    gcloud
    command or Kubernetes manifest using session defaults. See gcloud Command Reference for full flag synopses, command summary tables, and 60+ natural-language-to-command examples.
  4. Documentation Fallback — if a user asks about a feature, flag, schema, or error message not covered in this skill, query the
    developerknowledge
    MCP server or public
    .md.txt
    documentation (see Documentation Fallback).
  5. Approval:
    • Read-only commands (
      list
      ,
      describe
      ,
      search
      ,
      get-iam-policy
      ): Execute immediately without asking for approval.
    • Mutating commands (
      create
      ,
      delete
      ,
      update
      ,
      deploy
      ,
      set-iam-policy
      ,
      add-iam-policy-binding
      ,
      remove-iam-policy-binding
      ): Display the exact command and ask: "Ready to run this command? (yes/no)"
    • Multi-task requests: Always output the commands for every requested task in the same response before asking for approval.
  6. Execute and display the output.
  1. 解析会话上下文——在每个会话开始时,静默运行:
    bash
    gcloud config get-value project 2>/dev/null
    gcloud config get-value compute/region 2>/dev/null
    将结果存储为
    SESSION_PROJECT
    和
    SESSION_LOCATION
    ,并将其用作默认值。
  2. 解析用户请求,确定目标资源和操作。
  3. 使用会话默认值构造
    gcloud
    命令或 Kubernetes manifest
    。有关完整 flag 概览、命令摘要表以及 60 多个自然语言到命令的示例,请参阅 gcloud 命令参考。
  4. 文档回退——如果用户询问此 skill 未涵盖的 feature、flag、schema 或错误消息,请查询
    developerknowledge
    MCP server 或公开的
    .md.txt
    文档(请参阅文档回退)。
  5. 批准:
    • 只读命令(
      list
      、
      describe
      、
      search
      、
      get-iam-policy
      ):立即执行,无需询问批准。
    • 变更命令(
      create
      、
      delete
      、
      update
      、
      deploy
      、
      set-iam-policy
      、
      add-iam-policy-binding
      、
      remove-iam-policy-binding
      ):显示确切命令并询问:"准备好运行此命令吗?(yes/no)"
    • 多任务请求:始终在同一条回复中输出每个所请求任务的命令,然后再询问批准。
  6. 执行并显示输出。

Prerequisites, Auth, Billing, Region & IAM Permissions

前提条件、身份验证、计费、区域与 IAM 权限

  • Cloud SDK: Requires
    gcloud
    560.0.0+ (
    beta
    2026.03.09+ for Cloud Run automatic registration; ensure
    gcloud
    is up to date for GA
    gcloud agent-registry skills
    ). Do not install or update tools or packages on the host without explicit user approval; if
    gcloud
    is missing, share
    https://docs.cloud.google.com/sdk/docs/install-sdk.md.txt
    and fall back to
    .md.txt
    documentation.
  • Billing & Pricing: The target project must be linked to an active Google Cloud Billing account. For Cloud Run, GKE, or Vertex AI pricing, direct users to
    https://cloud.google.com/pricing
    .
  • Region & Location Availability: Configure a default region (
    gcloud config set compute/region us-central1
    ) and verify supported regions at
    https://docs.cloud.google.com/agent-registry/locations.md.txt
    and
    https://cloud.google.com/about/locations
    (note: Skills only support
    global
    ,
    us
    , or
    eu
    ).
  • Authentication: Check active credentials first with
    gcloud auth list
    . Because
    gcloud auth login
    and
    gcloud auth application-default login
    launch interactive browser flows and stop responding in non-interactive shells, never execute them directly — if unauthenticated, ask the user to run
    gcloud auth login
    (for CLI sessions) or
    gcloud auth application-default login
    (for local Python ADK Application Default Credentials) in their own terminal, or configure
    GOOGLE_APPLICATION_CREDENTIALS
    .
bash
undefined
  • Cloud SDK:要求
    gcloud
    560.0.0+(Cloud Run 自动注册要求
    beta
    2026.03.09+;请确保
    gcloud
    为最新版本,以使用 GA
    gcloud agent-registry skills
    )。不要在未获得用户明确批准的情况下在主机上安装或更新工具或软件包;如果缺少
    gcloud
    ,请分享
    https://docs.cloud.google.com/sdk/docs/install-sdk.md.txt
    并回退到
    .md.txt
    文档。
  • 计费与定价:目标项目必须关联有效的 Google Cloud Billing 账户。对于 Cloud Run、GKE 或 Vertex AI 定价,请将用户引导至
    https://cloud.google.com/pricing
    。
  • 区域与位置可用性:配置默认区域(
    gcloud config set compute/region us-central1
    ),并在
    https://docs.cloud.google.com/agent-registry/locations.md.txt
    和
    https://cloud.google.com/about/locations
    验证受支持的区域(注意:Skills 仅支持
    global
    、
    us
    或
    eu
    )。
  • 身份验证:先使用
    gcloud auth list
    检查活动凭据。由于
    gcloud auth login
    和
    gcloud auth application-default login
    会启动交互式浏览器流程并在非交互式 shell 中停止响应,因此绝不直接执行它们——如果尚未认证,请让用户在自己的终端中运行
    gcloud auth login
    (用于 CLI 会话),或为本地 Python ADK Application Default Credentials 运行
    gcloud auth application-default login
    ,也可以配置
    GOOGLE_APPLICATION_CREDENTIALS
    。
bash
undefined

Check active authentication status first (read-only)

Check active authentication status first (read-only)

gcloud auth list
gcloud auth list

If unauthenticated, ask the user to run these interactively in their terminal:

If unauthenticated, ask the user to run these interactively in their terminal:

gcloud auth login

gcloud auth login

gcloud auth application-default login

gcloud auth application-default login

gcloud config set project PROJECT_ID gcloud config set compute/region us-central1 gcloud services enable agentregistry.googleapis.com

| Role | Access Level |
|------|--------------|
| `roles/agentregistry.admin` | Full administrative access across all Agent Registry resources, including bindings, skill scan findings, and resource-level IAM policies (`aiApplications.{getIamPolicy,setIamPolicy}` and `skills.{getIamPolicy,setIamPolicy}`) |
| `roles/agentregistry.editor` | Register and update agents, MCP servers, endpoints, services, skills, skill revisions, and AI Applications (excludes bindings, scan findings, and IAM policy mutations) |
| `roles/agentregistry.viewer` | Read-only access (`get`, `list`, `search`) to agents, MCP servers, endpoints, services, bindings, skills, skill revisions, publishers, and AI Applications |
| `roles/agentregistry.user` | **Agent Registry User** — least-privilege GA role granting read-only viewer access across Agent Registry plus permissions to create, update, and delete standalone skills, skill revisions, and scanning settings without edit access to agents, MCP servers, or endpoints |
| `roles/run.admin` + `roles/apphub.admin` + `roles/iam.serviceAccountUser` | Deploy or update Cloud Run services and jobs with `--functional-type` and `--identity-type` |
| `roles/resourcemanager.editor` | Create and update `BoundaryConfig`, `CapabilityConfig`, and `Boundary` on the parent folder or organization |
| `roles/resourcemanager.viewer` | Read `BoundaryConfig`, `CapabilityConfig`, and `Boundary` resources |
| `roles/resourcemanager.tagUser` | Bind or unbind tag values (`tags bindings create/delete`) on projects |
| `roles/owner` or `roles/editor` | Required on a candidate Bring-Your-Own project to associate it as a Management Project |

---
gcloud config set project PROJECT_ID gcloud config set compute/region us-central1 gcloud services enable agentregistry.googleapis.com

| 角色 | 访问级别 |
|------|--------------|
| `roles/agentregistry.admin` | 对所有 Agent Registry 资源的完整管理权限,包括 bindings、skill scan findings 和资源级 IAM policies(`aiApplications.{getIamPolicy,setIamPolicy}` 与 `skills.{getIamPolicy,setIamPolicy}`) |
| `roles/agentregistry.editor` | 注册和更新 agents、MCP servers、endpoints、services、skills、skill revisions 和 AI Applications(不包括 bindings、scan findings 和 IAM policy 变更) |
| `roles/agentregistry.viewer` | 对 agents、MCP servers、endpoints、services、bindings、skills、skill revisions、publishers 和 AI Applications 的只读访问权限(`get`、`list`、`search`) |
| `roles/agentregistry.user` | **Agent Registry User**——权限最小化的 GA 角色,在提供 Agent Registry 只读 viewer 访问权限的同时,允许创建、更新和删除独立 skills、skill revisions 和扫描设置,但无权编辑 agents、MCP servers 或 endpoints |
| `roles/run.admin` + `roles/apphub.admin` + `roles/iam.serviceAccountUser` | 使用 `--functional-type` 和 `--identity-type` 部署或更新 Cloud Run services 和 jobs |
| `roles/resourcemanager.editor` | 在父文件夹或组织上创建和更新 `BoundaryConfig`、`CapabilityConfig` 和 `Boundary` |
| `roles/resourcemanager.viewer` | 读取 `BoundaryConfig`、`CapabilityConfig` 和 `Boundary` 资源 |
| `roles/resourcemanager.tagUser` | 在项目上绑定或解绑 tag 值(`tags bindings create/delete`) |
| `roles/owner` 或 `roles/editor` | 在候选的自带(Bring-Your-Own)项目上必需,用于将其关联为 Management Project |

---

Resource Types & Registration

资源类型与注册

  • Manual Registration (
    services create
    )
    :
    gcloud agent-registry services create
    creates a writable
    Service
    resource to manually register external or cross-project
    Agent
    ,
    McpServer
    , and
    Endpoint
    resources in Agent Registry, and automatically projects a corresponding read-only
    Agent
    ,
    McpServer
    , or
    Endpoint
    catalog entry (
    agentregistry-{ID}
    , returned in
    registryResource
    on
    services describe
    ) used for runtime discovery and IAP/Agent Gateway policies.
  • 手动注册(
    services create
    )
    :
    gcloud agent-registry services create
    创建一个可写的
    Service
    资源,用于在 Agent Registry 中手动注册外部或跨项目的
    Agent
    、
    McpServer
    和
    Endpoint
    资源,并自动投影对应的只读
    Agent
    、
    McpServer
    或
    Endpoint
    目录条目(
    agentregistry-{ID}
    ,通过
    services describe
    的
    registryResource
    返回),以供运行时发现以及 IAP/Agent Gateway policies 使用。

1. MCP Servers

1. MCP Servers

If the user has not provided the MCP tool spec JSON yet, ask: "Please paste the contents of your MCP server spec JSON file." and preview the command template using
'PASTE_MCP_SPEC_JSON_HERE'
:
bash
undefined
如果用户尚未提供 MCP tool spec JSON,请询问:"请粘贴您的 MCP server spec JSON 文件内容。",并使用
'PASTE_MCP_SPEC_JSON_HERE'
预览命令模板:
bash
undefined

Register an MCP Server (mutating — ask for approval first)

Register an MCP Server (mutating — ask for approval first)

gcloud agent-registry services create my-mcp-service
--location=us-central1
--display-name="My MCP Server"
--description="Connects to an external MCP server"
--mcp-server-spec-type=tool-spec
--mcp-server-spec-content='PASTE_MCP_SPEC_JSON_HERE'
--interfaces='[{"protocolBinding": "jsonrpc", "url": "https://mcp.example.com/v1"}]'
gcloud agent-registry services create my-mcp-service
--location=us-central1
--display-name="My MCP Server"
--description="Connects to an external MCP server"
--mcp-server-spec-type=tool-spec
--mcp-server-spec-content='PASTE_MCP_SPEC_JSON_HERE'
--interfaces='[{"protocolBinding": "jsonrpc", "url": "https://mcp.example.com/v1"}]'

List Regional or Global MCP Servers (read-only — execute immediately)

List Regional or Global MCP Servers (read-only — execute immediately)

gcloud agent-registry mcp-servers list --location=us-central1 gcloud agent-registry mcp-servers list --location=global
undefined
gcloud agent-registry mcp-servers list --location=us-central1 gcloud agent-registry mcp-servers list --location=global
undefined

2. Agents

2. Agents

For A2A agents, if the user has not pasted
agent_card.json
yet, ask: "Please paste the contents of your
agent_card.json
file."
and preview the command template using
'PASTE_AGENT_CARD_JSON_HERE'
:
bash
undefined
对于 A2A agents,如果用户尚未粘贴
agent_card.json
,请询问:"请粘贴您的
agent_card.json
文件内容。"
,并使用
'PASTE_AGENT_CARD_JSON_HERE'
预览命令模板:
bash
undefined

Register a Standard Agent (no-spec)

Register a Standard Agent (no-spec)

gcloud agent-registry services create my-custom-agent
--location=us-central1
--display-name="My Custom Agent"
--description="Custom HTTP JSON agent"
--agent-spec-type=no-spec
--interfaces='[{"protocolBinding": "http-json", "url": "https://agent.example.com/v1"}]'
gcloud agent-registry services create my-custom-agent
--location=us-central1
--display-name="My Custom Agent"
--description="Custom HTTP JSON agent"
--agent-spec-type=no-spec
--interfaces='[{"protocolBinding": "http-json", "url": "https://agent.example.com/v1"}]'

Register an A2A Agent (a2a-agent-card)

Register an A2A Agent (a2a-agent-card)

gcloud agent-registry services create my-a2a-agent
--location=us-central1
--display-name="My A2A Agent"
--description="Sample A2A Agent"
--agent-spec-type=a2a-agent-card
--agent-spec-content='PASTE_AGENT_CARD_JSON_HERE'
gcloud agent-registry services create my-a2a-agent
--location=us-central1
--display-name="My A2A Agent"
--description="Sample A2A Agent"
--agent-spec-type=a2a-agent-card
--agent-spec-content='PASTE_AGENT_CARD_JSON_HERE'

List Regional or Global Agents

List Regional or Global Agents

gcloud agent-registry agents list --location=us-central1 gcloud agent-registry agents list --location=global
undefined
gcloud agent-registry agents list --location=us-central1 gcloud agent-registry agents list --location=global
undefined

3. Endpoints, Services & Quick Add GCP Service (Composite Agent Gateway Registration)

3. Endpoints、Services 与 Quick Add GCP Service(复合 Agent Gateway 注册)

bash
undefined
bash
undefined

Register a single Endpoint, list/describe/update/delete Services, and inspect Operations

Register a single Endpoint, list/describe/update/delete Services, and inspect Operations

gcloud agent-registry services create gemini-models --location=us-central1
--display-name="Vertex AI Model Garden" --description="List of all models in Vertex AI Model Garden"
--endpoint-spec-type=no-spec
--interfaces='[{"protocolBinding": "jsonrpc", "url": "https://us-central1-aiplatform.googleapis.com/v1beta1/publishers/*/models"}]' gcloud agent-registry endpoints list --location=us-central1 gcloud agent-registry services list --location=us-central1 gcloud agent-registry services describe gemini-models --location=us-central1 gcloud agent-registry services update gemini-models --display-name="Model Garden on Vertex AI" --location=us-central1 gcloud agent-registry services delete gemini-models --location=us-central1 gcloud agent-registry operations list --location=us-central1 gcloud agent-registry operations describe OPERATION_ID --location=us-central1
undefined
gcloud agent-registry services create gemini-models --location=us-central1
--display-name="Vertex AI Model Garden" --description="List of all models in Vertex AI Model Garden"
--endpoint-spec-type=no-spec
--interfaces='[{"protocolBinding": "jsonrpc", "url": "https://us-central1-aiplatform.googleapis.com/v1beta1/publishers/*/models"}]' gcloud agent-registry endpoints list --location=us-central1 gcloud agent-registry services list --location=us-central1 gcloud agent-registry services describe gemini-models --location=us-central1 gcloud agent-registry services update gemini-models --display-name="Model Garden on Vertex AI" --location=us-central1 gcloud agent-registry services delete gemini-models --location=us-central1 gcloud agent-registry operations list --location=us-central1 gcloud agent-registry operations describe OPERATION_ID --location=us-central1
undefined

Quick Add GCP Service (All 5 Endpoint URL Variants)

Quick Add GCP Service(全部 5 种 Endpoint URL 变体)

When an agent runs behind a governed Agent Gateway (default-deny egress), Google Cloud SDKs dynamically resolve endpoints across up to 5 hostname variants:
  1. Base:
    https://${SERVICE_ID}.googleapis.com
  2. Base mTLS:
    https://${SERVICE_ID}.mtls.googleapis.com
  3. Locational:
    https://${LOCATION}-${SERVICE_ID}.googleapis.com
    (omit when
    --location=global
    )
  4. Locational mTLS:
    https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com
    (omit when
    --location=global
    )
  5. Regional REP:
    https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com
    (omit when
    --location=global
    )
Register a single composite
Service
containing all applicable variants using scripts/quick-add-gcp-service.sh or
gcloud agent-registry services create
(always previewing and asking for approval first):
  • Service ID Length (
    4–63
    chars)
    : Service IDs must match
    ^[a-z][a-z0-9-]{2,61}[a-z0-9]$
    . For 3-letter APIs (
    iam
    ,
    kms
    ,
    run
    ,
    dns
    ), suffix the
    Service
    ID (e.g.,
    ${SERVICE_ID}-api
    ) while keeping
    ${SERVICE_ID}
    in the endpoint URLs.
  • Global Location Guardrail: When
    --location=global
    , include only
    Base
    and
    Base mTLS
    so invalid regional DNS names are not registered.
  • IAP Egress Policy Target: Bind
    roles/iap.egressor
    for the Agent Identity to the projected
    Endpoint
    catalog ID (
    endpoints/agentregistry-{UUID}
    from
    registryResource
    on
    services describe
    ), not the user-chosen
    Service
    ID.
bash
undefined
当 Agent 运行在受治理的 Agent Gateway(默认拒绝出站流量)之后时,Google Cloud SDK 会动态解析最多 5 种主机名变体的 endpoints:
  1. 基础:
    https://${SERVICE_ID}.googleapis.com
  2. 基础 mTLS:
    https://${SERVICE_ID}.mtls.googleapis.com
  3. 位置型:
    https://${LOCATION}-${SERVICE_ID}.googleapis.com
    (当
    --location=global
    时省略)
  4. 位置型 mTLS:
    https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com
    (当
    --location=global
    时省略)
  5. 区域 REP:
    https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com
    (当
    --location=global
    时省略)
使用 scripts/quick-add-gcp-service.sh 或
gcloud agent-registry services create
注册一个包含所有适用变体的单一复合
Service
(始终先预览并询问批准):
  • Service ID 长度(
    4–63
    个字符)
    :Service IDs 必须匹配
    ^[a-z][a-z0-9-]{2,61}[a-z0-9]$
    。对于 3 字母 API(
    iam
    、
    kms
    、
    run
    、
    dns
    ),请为
    Service
    ID 添加后缀(例如
    ${SERVICE_ID}-api
    ),同时在 endpoint URLs 中保留
    ${SERVICE_ID}
    。
  • Global Location Guardrail:当
    --location=global
    时,仅包含
    Base
    和
    Base mTLS
    ,以免注册无效的区域 DNS 名称。
  • IAP Egress Policy Target:将
    roles/iap.egressor
    绑定到 Agent Identity 对应的投影
    Endpoint
    目录 ID(
    endpoints/agentregistry-{UUID}
    ,通过
    services describe
    的
    registryResource
    获取),而不是用户选择的
    Service
    ID。
bash
undefined

Option A: Bundled Quick Add helper script (handles 3-letter APIs, --location=global, and --dry-run)

Option A: Bundled Quick Add helper script (handles 3-letter APIs, --location=global, and --dry-run)

./scripts/quick-add-gcp-service.sh --service=aiplatform --location=us-central1 --project=PROJECT_ID
./scripts/quick-add-gcp-service.sh --service=aiplatform --location=us-central1 --project=PROJECT_ID

Option B: Single composite gcloud command (all 5 variants for a regional location)

Option B: Single composite gcloud command (all 5 variants for a regional location)

SERVICE_ID="aiplatform" && SERVICE_NAME="aiplatform" && LOCATION="us-central1" && PROJECT_ID="PROJECT_ID" gcloud agent-registry services create "${SERVICE_NAME}" --project="${PROJECT_ID}" --location="${LOCATION}"
--display-name="${SERVICE_ID}" --description="Google Cloud ${SERVICE_ID} API endpoints" --endpoint-spec-type=no-spec
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.mtls.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${LOCATION}-${SERVICE_ID}.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com"
undefined
SERVICE_ID="aiplatform" && SERVICE_NAME="aiplatform" && LOCATION="us-central1" && PROJECT_ID="PROJECT_ID" gcloud agent-registry services create "${SERVICE_NAME}" --project="${PROJECT_ID}" --location="${LOCATION}"
--display-name="${SERVICE_ID}" --description="Google Cloud ${SERVICE_ID} API endpoints" --endpoint-spec-type=no-spec
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.mtls.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${LOCATION}-${SERVICE_ID}.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com"
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com"
undefined

4. GKE Agents & MCP Servers (Automatic Registration)

4. GKE Agents 与 MCP Servers(自动注册)

Configure GKE
Deployment
manifests for automatic discovery in Agent Registry (using
metadata.name
as the display name):
Component Type
metadata.labels
(Deployment)
metadata.annotations
(Deployment)
spec.template.metadata.annotations
(Pod)
GKE Agent
registry.gke.io/functional-type: "AGENT"
(plus
apphub.cloud.google.com/functional-type: "AGENT"
in annotations for compatibility)
a2a-protocol.org/agent-card
: Declares
card.endpoint
(
/.well-known/agent-card.json
),
card.protocol
(
HTTP
),
card.port
(
8080
)
iam.gke.io/spiffe-identity-type: agent-identity
GKE MCP Server
registry.gke.io/functional-type: "MCP_SERVER"
(plus
apphub.cloud.google.com/functional-type: "MCP_SERVER"
in annotations for compatibility)
modelcontextprotocol.info/urls
: In-cluster URL list (
- https://my-mcp-server.default.svc.cluster.local/mcp
)<br>
modelcontextprotocol.info/capabilities
:
card.endpoint
(
"/mcp"
),
card.protocol
(
"HTTP"
)
iam.gke.io/spiffe-identity-type: agent-identity
Use scripts/annotate_gke.py to automatically add
registry.gke.io/functional-type
,
apphub.cloud.google.com/functional-type
, and the Pod template
iam.gke.io/spiffe-identity-type: "agent-identity"
annotation to existing YAML files (target path is required; supports
--dry-run
):
bash
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type AGENT
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type MCP_SERVER
GKE Agent (
Deployment
+
Service
) & MCP Server (
Deployment
) Templates:
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-agent
  labels:
    registry.gke.io/functional-type: "AGENT"
  annotations:
    apphub.cloud.google.com/functional-type: "AGENT"
    a2a-protocol.org/agent-card: |
      card:
        endpoint: /.well-known/agent-card.json
        protocol: HTTP
        port: 8080
spec:
  selector:
    matchLabels:
      app: my-agent
  template:
    metadata:
      labels:
        app: my-agent
      annotations:
        iam.gke.io/spiffe-identity-type: agent-identity
    spec:
      containers:
      - name: server
        image: us-central1-docker.pkg.dev/PROJECT_ID/my-repo/my-agent:1.0.0
        ports:
        - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: my-agent-service
spec:
  type: ClusterIP
  ports:
  - port: 8080
    targetPort: 8080
    protocol: TCP
    name: http
  selector:
    app: my-agent
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-mcp-server
  labels:
    registry.gke.io/functional-type: "MCP_SERVER"
  annotations:
    apphub.cloud.google.com/functional-type: "MCP_SERVER"
    modelcontextprotocol.info/urls: |
      - https://my-mcp-server.default.svc.cluster.local/mcp
    modelcontextprotocol.info/capabilities: |
      card:
        endpoint: "/mcp"
        protocol: "HTTP"
spec:
  selector:
    matchLabels:
      app: my-mcp-server
  template:
    metadata:
      labels:
        app: my-mcp-server
      annotations:
        iam.gke.io/spiffe-identity-type: agent-identity
    spec:
      containers:
      - name: server
        image: us-central1-docker.pkg.dev/PROJECT_ID/my-repo/my-mcp-server:1.0.0
配置 GKE
Deployment
manifests,以在 Agent Registry 中自动发现资源(使用
metadata.name
作为显示名称):
组件类型
metadata.labels
(Deployment)
metadata.annotations
(Deployment)
spec.template.metadata.annotations
(Pod)
GKE Agent
registry.gke.io/functional-type: "AGENT"
(为兼容性,还需在 annotations 中添加
apphub.cloud.google.com/functional-type: "AGENT"
)
a2a-protocol.org/agent-card
:声明
card.endpoint
(
/.well-known/agent-card.json
)、
card.protocol
(
HTTP
)、
card.port
(
8080
)
iam.gke.io/spiffe-identity-type: agent-identity
GKE MCP Server
registry.gke.io/functional-type: "MCP_SERVER"
(为兼容性,还需在 annotations 中添加
apphub.cloud.google.com/functional-type: "MCP_SERVER"
)
modelcontextprotocol.info/urls
:集群内 URL 列表(
- https://my-mcp-server.default.svc.cluster.local/mcp
)<br>
modelcontextprotocol.info/capabilities
:
card.endpoint
(
"/mcp"
)、
card.protocol
(
"HTTP"
)
iam.gke.io/spiffe-identity-type: agent-identity
使用 scripts/annotate_gke.py 自动向现有 YAML 文件添加
registry.gke.io/functional-type
、
apphub.cloud.google.com/functional-type
和 Pod template
iam.gke.io/spiffe-identity-type: "agent-identity"
annotation(必须指定目标路径;支持
--dry-run
):
bash
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type AGENT
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type MCP_SERVER
GKE Agent(
Deployment
+
Service
)与 MCP Server(
Deployment
)模板:
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-agent
  labels:
    registry.gke.io/functional-type: "AGENT"
  annotations:
    apphub.cloud.google.com/functional-type: "AGENT"
    a2a-protocol.org/agent-card: |
      card:
        endpoint: /.well-known/agent-card.json
        protocol: HTTP
        port: 8080
spec:
  selector:
    matchLabels:
      app: my-agent
  template:
    metadata:
      labels:
        app: my-agent
      annotations:
        iam.gke.io/spiffe-identity-type: agent-identity
    spec:
      containers:
      - name: server
        image: us-central1-docker.pkg.dev/PROJECT_ID/my-repo/my-agent:1.0.0
        ports:
        - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: my-agent-service
spec:
  type: ClusterIP
  ports:
  - port: 8080
    targetPort: 8080
    protocol: TCP
    name: http
  selector:
    app: my-agent
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-mcp-server
  labels:
    registry.gke.io/functional-type: "MCP_SERVER"
  annotations:
    apphub.cloud.google.com/functional-type: "MCP_SERVER"
    modelcontextprotocol.info/urls: |
      - https://my-mcp-server.default.svc.cluster.local/mcp
    modelcontextprotocol.info/capabilities: |
      card:
        endpoint: "/mcp"
        protocol: "HTTP"
spec:
  selector:
    matchLabels:
      app: my-mcp-server
  template:
    metadata:
      labels:
        app: my-mcp-server
      annotations:
        iam.gke.io/spiffe-identity-type: agent-identity
    spec:
      containers:
      - name: server
        image: us-central1-docker.pkg.dev/PROJECT_ID/my-repo/my-mcp-server:1.0.0

5. Cloud Run Agents & MCP Servers (Automatic Registration via
--functional-type
)

5. Cloud Run Agents 与 MCP Servers(通过
--functional-type
自动注册)

Register Cloud Run services and jobs automatically using
gcloud beta run
:
[!WARNING] Critical Cloud Run Guardrails:
  1. Immutability: Once
    --functional-type
    or
    --identity-type
    is set on a Cloud Run service or job, it is immutable and cannot be changed or cleared.
  2. --functional-type=agent
    Requires
    --identity-type=agent-identity
    : Always include
    --identity-type=agent-identity
    whenever
    --functional-type=agent
    is used (certificates are provisioned by default; opt out with
    --no-identity-certificate
    ).
  3. Updating Existing Services (
    --no-traffic
    Guardrail)
    : Transitioning an existing service to
    --identity-type=agent-identity
    assigns a new SPIFFE Agent Identity principal (
    principal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/run/projects/PROJECT_NUMBER/locations/REGION/services/SERVICE_NAME
    ) that does not inherit the previous service account's IAM permissions. Recommend
    --no-traffic
    on
    gcloud beta run services update
    to stage IAM bindings before shifting traffic.
  4. Cloud Run Jobs Cannot Be MCP Servers: Only Cloud Run services support
    --functional-type=mcp-server
    ; Cloud Run jobs only support
    --functional-type=agent
    .
bash
undefined
使用
gcloud beta run
自动注册 Cloud Run services 和 jobs:
[!WARNING] Cloud Run 关键防护规则:
  1. 不可变性:一旦在 Cloud Run service 或 job 上设置
    --functional-type
    或
    --identity-type
    ,该值即不可更改且无法清除。
  2. --functional-type=agent
    要求
    --identity-type=agent-identity
    :使用
    --functional-type=agent
    时,始终包含
    --identity-type=agent-identity
    (默认预配证书;可使用
    --no-identity-certificate
    选择退出)。
  3. 更新现有 Services(
    --no-traffic
    防护规则)
    :将现有 service 转换为
    --identity-type=agent-identity
    时,会分配新的 SPIFFE Agent Identity principal(
    principal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/run/projects/PROJECT_NUMBER/locations/REGION/services/SERVICE_NAME
    ),该 principal 不会继承原 service account 的 IAM permissions。建议在
    gcloud beta run services update
    中使用
    --no-traffic
    ,先完成 IAM bindings 的预配置,再切换流量。
  4. Cloud Run Jobs 不能作为 MCP Servers:只有 Cloud Run services 支持
    --functional-type=mcp-server
    ;Cloud Run jobs 仅支持
    --functional-type=agent
    。
bash
undefined

Deploy or update a Cloud Run service as an AI Agent or MCP Server

Deploy or update a Cloud Run service as an AI Agent or MCP Server

gcloud beta run deploy SERVICE_NAME --image=IMAGE_URL --region=us-central1
--functional-type=agent --identity-type=agent-identity gcloud beta run services update SERVICE_NAME --region=us-central1
--functional-type=agent --identity-type=agent-identity --no-traffic gcloud beta run deploy SERVICE_NAME --image=IMAGE_URL --region=us-central1
--functional-type=mcp-server --identity-type=IDENTITY_TYPE gcloud beta run services update SERVICE_NAME --region=us-central1 --functional-type=mcp-server
gcloud beta run deploy SERVICE_NAME --image=IMAGE_URL --region=us-central1
--functional-type=agent --identity-type=agent-identity gcloud beta run services update SERVICE_NAME --region=us-central1
--functional-type=agent --identity-type=agent-identity --no-traffic gcloud beta run deploy SERVICE_NAME --image=IMAGE_URL --region=us-central1
--functional-type=mcp-server --identity-type=IDENTITY_TYPE gcloud beta run services update SERVICE_NAME --region=us-central1 --functional-type=mcp-server

Create or update a Cloud Run Job as an AI Agent

Create or update a Cloud Run Job as an AI Agent

gcloud beta run jobs create JOB_NAME --image=IMAGE_URL --region=us-central1
--functional-type=agent --identity-type=agent-identity gcloud beta run jobs update JOB_NAME --region=us-central1
--functional-type=agent --identity-type=agent-identity
gcloud beta run jobs create JOB_NAME --image=IMAGE_URL --region=us-central1
--functional-type=agent --identity-type=agent-identity gcloud beta run jobs update JOB_NAME --region=us-central1 --functional-type=agent --identity-type=agent-identity

Inspect Agent Identity or delete Cloud Run workloads

Inspect Agent Identity or delete Cloud Run workloads

gcloud beta run revisions describe REVISION_NAME --region=us-central1 gcloud beta run jobs executions describe EXECUTION_NAME --region=us-central1 gcloud run services delete SERVICE_NAME --region=us-central1 gcloud run jobs delete JOB_NAME --region=us-central1
undefined
gcloud beta run revisions describe REVISION_NAME --region=us-central1 gcloud beta run jobs executions describe EXECUTION_NAME --region=us-central1 gcloud run services delete SERVICE_NAME --region=us-central1 gcloud run jobs delete JOB_NAME --region=us-central1
undefined

6. Bindings

6. Bindings

Connect a source agent to a target resource or an Auth Provider connector:
bash
gcloud agent-registry bindings create BINDING_NAME --location=us-central1 \
  --display-name="My Custom Binding" --source-identifier="SOURCE_ID" --target-identifier="TARGET_ID"
gcloud agent-registry bindings create BINDING_NAME --location=us-central1 \
  --display-name="Auth Provider Binding" --source-identifier="SOURCE_ID" \
  --auth-provider="projects/PROJECT_ID/locations/REGION/connectors/AUTH_PROVIDER_ID"
gcloud agent-registry bindings list --location=us-central1
gcloud agent-registry bindings describe BINDING_NAME --location=us-central1
gcloud agent-registry bindings update BINDING_NAME --display-name="New Display Name" --location=us-central1
gcloud agent-registry bindings delete BINDING_NAME --location=us-central1
将源 agent 连接到目标资源或 Auth Provider connector:
bash
gcloud agent-registry bindings create BINDING_NAME --location=us-central1 \
  --display-name="My Custom Binding" --source-identifier="SOURCE_ID" --target-identifier="TARGET_ID"
gcloud agent-registry bindings create BINDING_NAME --location=us-central1 \
  --display-name="Auth Provider Binding" --source-identifier="SOURCE_ID" \
  --auth-provider="projects/PROJECT_ID/locations/REGION/connectors/AUTH_PROVIDER_ID"
gcloud agent-registry bindings list --location=us-central1
gcloud agent-registry bindings describe BINDING_NAME --location=us-central1
gcloud agent-registry bindings update BINDING_NAME --display-name="New Display Name" --location=us-central1
gcloud agent-registry bindings delete BINDING_NAME --location=us-central1

7. Skills & Skill Revisions

7. Skills 与 Skill Revisions

Manage reusable AI Skills, Skill Revisions, and Skill IAM policies using
gcloud agent-registry skills
.
[!IMPORTANT] Skills Guardrails (
--location
,
private-
Prefix &
--target-state
):
  • Supported Locations: Skills only work in
    "global"
    ,
    "us"
    , or
    "eu"
    multi-regions. If a user asks for any single region (e.g.
    us-central1
    ), do not pass that region to
    gcloud
    . Explain that Skills are only supported in
    global
    ,
    us
    , or
    eu
    , preview the command using a concrete supported multi-region (e.g.
    --location=us
    ,
    --location=eu
    , or
    --location=global
    ), and ask them to confirm which multi-region to use.
  • Automatic
    private-
    Prefix
    : Running
    gcloud agent-registry skills create my-skill
    automatically prepends
    private-
    , creating
    skills/private-my-skill
    . Subsequent
    describe
    ,
    update
    ,
    delete
    ,
    revisions
    , and
    *-iam-policy
    commands must pass
    private-my-skill
    (passing
    my-skill
    fails with
    NOT_FOUND
    ).
  • Target State & Scanning:
    --target-state=active|disabled|draft
    sets the desired lifecycle state on creation (
    active
    requires an initial revision via
    --payload
    or
    --gcs-source-uri
    ;
    deprecated
    and
    decommissioned
    are also valid on
    update
    ). Under the default
    enabled-blocking
    scanning policy,
    --target-state=active
    enters
    DRAFT
    (
    STATE_DRAFT
    ) until the background security scan passes with no findings.
bash
undefined
使用
gcloud agent-registry skills
管理可复用的 AI Skills、Skill Revisions 和 Skill IAM policies。
[!IMPORTANT] Skills 防护规则(
--location
、
private-
前缀与
--target-state
):
  • 受支持的位置:Skills 仅支持
    "global"
    、
    "us"
    或
    "eu"
    multi-regions。如果用户要求使用任何单一区域(例如
    us-central1
    ),不要将该区域传递给
    gcloud
    。请说明 Skills 仅支持
    global
    、
    us
    或
    eu
    ,使用具体的受支持 multi-region(例如
    --location=us
    、
    --location=eu
    或
    --location=global
    )预览命令,并请用户确认要使用的 multi-region。
  • 自动添加
    private-
    前缀
    :运行
    gcloud agent-registry skills create my-skill
    会自动添加
    private-
    前缀,从而创建
    skills/private-my-skill
    。后续
    describe
    、
    update
    、
    delete
    、
    revisions
    和
    *-iam-policy
    命令必须传递
    private-my-skill
    (传递
    my-skill
    会失败并返回
    NOT_FOUND
    )。
  • 目标状态与扫描:
    --target-state=active|disabled|draft
    用于在创建时设置期望的生命周期状态(
    active
    需要通过
    --payload
    或
    --gcs-source-uri
    提供初始 revision;更新时也可使用
    deprecated
    和
    decommissioned
    )。在默认的
    enabled-blocking
    scanning policy 下,
    --target-state=active
    会进入
    DRAFT
    (
    STATE_DRAFT
    )状态,直至后台安全扫描通过且没有 findings。
bash
undefined

List, create (local ZIP or GCS URI), describe, update, and delete Skills

List, create (local ZIP or GCS URI), describe, update, and delete Skills

gcloud agent-registry skills list --location=us gcloud agent-registry skills create my-skill --location=us
--display-name="My Custom Skill" --description="Skill description" --type=simple --target-state=active --payload=/path/to/archive.zip gcloud agent-registry skills create my-skill --location=us
--display-name="My Custom Skill" --target-state=disabled --gcs-source-uri=gs://my-bucket/skill.zip gcloud agent-registry skills describe private-my-skill --location=us gcloud agent-registry skills update private-my-skill --location=us --display-name="Updated Skill Name" --target-state=active gcloud agent-registry skills delete private-my-skill --location=us
gcloud agent-registry skills list --location=us gcloud agent-registry skills create my-skill --location=us
--display-name="My Custom Skill" --description="Skill description" --type=simple --target-state=active --payload=/path/to/archive.zip gcloud agent-registry skills create my-skill --location=us
--display-name="My Custom Skill" --target-state=disabled --gcs-source-uri=gs://my-bucket/skill.zip gcloud agent-registry skills describe private-my-skill --location=us gcloud agent-registry skills update private-my-skill --location=us --display-name="Updated Skill Name" --target-state=active gcloud agent-registry skills delete private-my-skill --location=us

Manage Skill Revisions and Resource-Level IAM Policies (using private-my-skill)

Manage Skill Revisions and Resource-Level IAM Policies (using private-my-skill)

gcloud agent-registry skills revisions create REVISION_ID --skill=private-my-skill --location=us --payload=/path/to/archive.zip gcloud agent-registry skills revisions list --skill=private-my-skill --location=us gcloud agent-registry skills revisions describe REVISION_ID --skill=private-my-skill --location=us gcloud agent-registry skills revisions download REVISION_ID --skill=private-my-skill --location=us --destination=./skill-payload.zip gcloud agent-registry skills revisions delete REVISION_ID --skill=private-my-skill --location=us gcloud agent-registry skills get-iam-policy private-my-skill --location=us gcloud agent-registry skills set-iam-policy private-my-skill policy.json --location=us gcloud agent-registry skills add-iam-policy-binding private-my-skill --location=us
--member='user:test-user@example.com' --role='roles/agentregistry.viewer' gcloud agent-registry skills remove-iam-policy-binding private-my-skill --location=us
--member='user:test-user@example.com' --role='roles/agentregistry.viewer'
undefined
gcloud agent-registry skills revisions create REVISION_ID --skill=private-my-skill --location=us --payload=/path/to/archive.zip gcloud agent-registry skills revisions list --skill=private-my-skill --location=us gcloud agent-registry skills revisions describe REVISION_ID --skill=private-my-skill --location=us gcloud agent-registry skills revisions download REVISION_ID --skill=private-my-skill --location=us --destination=./skill-payload.zip gcloud agent-registry skills revisions delete REVISION_ID --skill=private-my-skill --location=us gcloud agent-registry skills get-iam-policy private-my-skill --location=us gcloud agent-registry skills set-iam-policy private-my-skill policy.json --location=us gcloud agent-registry skills add-iam-policy-binding private-my-skill --location=us
--member='user:test-user@example.com' --role='roles/agentregistry.viewer' gcloud agent-registry skills remove-iam-policy-binding private-my-skill --location=us
--member='user:test-user@example.com' --role='roles/agentregistry.viewer'
undefined

8. AI Applications (
ai-applications
)

8. AI Applications(
ai-applications
)

An AI Application (
projects/{project}/locations/{location}/aiApplications/{ai_application}
, including the regional
default
AI Application) groups agents, MCP servers, and endpoints under a governance perimeter.
bash
undefined
AI Application(
projects/{project}/locations/{location}/aiApplications/{ai_application}
,包括区域
default
AI Application)将 agents、MCP servers 和 endpoints 归组到一个治理边界内。
bash
undefined

List, filter, describe, and search AI Applications

List, filter, describe, and search AI Applications

gcloud agent-registry ai-applications list --location=us-central1 gcloud agent-registry ai-applications list --location=us-central1
--filter="attributes.environment.type=production AND attributes.criticality.type=high" gcloud agent-registry ai-applications describe my-app --location=us-central1 gcloud agent-registry ai-applications describe default --location=us-central1 gcloud agent-registry ai-applications search --location=us-central1 --search-string="displayName:Support*"
gcloud agent-registry ai-applications list --location=us-central1 gcloud agent-registry ai-applications list --location=us-central1
--filter="attributes.environment.type=production AND attributes.criticality.type=high" gcloud agent-registry ai-applications describe my-app --location=us-central1 gcloud agent-registry ai-applications describe default --location=us-central1 gcloud agent-registry ai-applications search --location=us-central1 --search-string="displayName:Support*"

Create, update, and delete an AI Application

Create, update, and delete an AI Application

gcloud agent-registry ai-applications create my-app --location=us-central1
--display-name="Customer Support App" --description="AI Application orchestrating customer support agents"
--environment-type=production --criticality-type=high
--business-owners=email=biz-owner@example.com --developer-owners=email=dev-owner@example.com --operator-owners=email=ops-owner@example.com gcloud agent-registry ai-applications update my-app --location=us-central1
--display-name="Updated Support App" --environment-type=staging --criticality-type=medium gcloud agent-registry ai-applications delete my-app --location=us-central1 --force
gcloud agent-registry ai-applications create my-app --location=us-central1
--display-name="Customer Support App" --description="AI Application orchestrating customer support agents"
--environment-type=production --criticality-type=high
--business-owners=email=biz-owner@example.com --developer-owners=email=dev-owner@example.com --operator-owners=email=ops-owner@example.com gcloud agent-registry ai-applications update my-app --location=us-central1
--display-name="Updated Support App" --environment-type=staging --criticality-type=medium gcloud agent-registry ai-applications delete my-app --location=us-central1 --force

Inspect & search subresources scoped to an AI Application (agents, mcp-servers, endpoints)

Inspect & search subresources scoped to an AI Application (agents, mcp-servers, endpoints)

gcloud agent-registry ai-applications agents list --ai-application=my-app --location=us-central1 gcloud agent-registry ai-applications agents describe AGENT_ID --ai-application=my-app --location=us-central1 gcloud agent-registry ai-applications agents search --ai-application=my-app --location=us-central1 --search-string="displayName:Assistant*" gcloud agent-registry ai-applications mcp-servers list --ai-application=my-app --location=us-central1 gcloud agent-registry ai-applications endpoints list --ai-application=my-app --location=us-central1
gcloud agent-registry ai-applications agents list --ai-application=my-app --location=us-central1 gcloud agent-registry ai-applications agents describe AGENT_ID --ai-application=my-app --location=us-central1 gcloud agent-registry ai-applications agents search --ai-application=my-app --location=us-central1 --search-string="displayName:Assistant*" gcloud agent-registry ai-applications mcp-servers list --ai-application=my-app --location=us-central1 gcloud agent-registry ai-applications endpoints list --ai-application=my-app --location=us-central1

Manage Resource-Level IAM Policies on an AI Application

Manage Resource-Level IAM Policies on an AI Application

gcloud agent-registry ai-applications get-iam-policy my-app --location=us-central1 gcloud agent-registry ai-applications set-iam-policy my-app policy.json --location=us-central1 gcloud agent-registry ai-applications add-iam-policy-binding my-app --location=us-central1
--member='group:support-team@example.com' --role='roles/agentregistry.viewer' gcloud agent-registry ai-applications remove-iam-policy-binding my-app --location=us-central1
--member='group:support-team@example.com' --role='roles/agentregistry.viewer'
undefined
gcloud agent-registry ai-applications get-iam-policy my-app --location=us-central1 gcloud agent-registry ai-applications set-iam-policy my-app policy.json --location=us-central1 gcloud agent-registry ai-applications add-iam-policy-binding my-app --location=us-central1
--member='group:support-team@example.com' --role='roles/agentregistry.viewer' gcloud agent-registry ai-applications remove-iam-policy-binding my-app --location=us-central1
--member='group:support-team@example.com' --role='roles/agentregistry.viewer'
undefined

9. Management Boundary Setup (Admin Governance)

9. 管理边界设置(管理员治理)

Configure Folder/Organization hub-and-spoke perimeters using
gcloud resource-manager
(
boundary-configs
,
capability-configs
,
boundaries
, and
tags bindings
). Read Management Boundaries Guide for the full IAM table, 6 interactive scoping questions, and 6-step provisioning workflow.
  • Always Use Project Numbers (
    projects/<PROJECT_NUMBER>
    )
    : Cloud Resource Manager v3 requires project numbers (not project IDs) for
    --management-project=projects/<PROJECT_NUMBER>
    and
    --parent=//cloudresourcemanager.googleapis.com/projects/<PROJECT_NUMBER>
    . When given a project ID, output both
    gcloud projects describe PROJECT_ID --format="value(projectNumber)"
    and the
    capability-configs create
    command template (
    --types=agent-management
    by default) in the same response.
  • Set
    BoundaryConfig
    Before Attaching Boundaries & Isolate
    dev
    /
    prod
    Hubs
    : Set
    boundary-configs update --tag-key=...
    before attaching boundaries. Use separate
    CapabilityConfig
    + Management Project +
    Boundary
    per environment (
    dev
    vs.
    prod
    ) for strict catalog and IAM isolation.
  • Tag Rebinding Requires Delete-Then-Create: Moving a project between tag values (e.g.,
    dev
    to
    prod
    ) fails with
    FAILED_PRECONDITION
    if you only run
    create
    ; always run
    tags bindings delete
    first, then
    tags bindings create
    .
  • Safe 3-Step Teardown Order: Always output all 3 commands in order when deleting a boundary and capability config (noting that BYO projects are preserved with
    isManagementProject=false
    , while Google-managed hubs are deleted):
    bash
    gcloud resource-manager capability-configs update CAPABILITY_CONFIG_ID --folder=FOLDER_ID --clear-boundaries
    gcloud resource-manager boundaries delete BOUNDARY_ID --folder=FOLDER_ID
    gcloud resource-manager capability-configs delete CAPABILITY_CONFIG_ID --folder=FOLDER_ID

使用
gcloud resource-manager
(
boundary-configs
、
capability-configs
、
boundaries
和
tags bindings
)配置 Folder/Organization hub-and-spoke perimeters。有关完整 IAM 表、6 个交互式范围界定问题以及 6 步配置工作流,请阅读管理边界指南。
  • 始终使用项目编号(
    projects/<PROJECT_NUMBER>
    )
    :Cloud Resource Manager v3 要求
    --management-project=projects/<PROJECT_NUMBER>
    和
    --parent=//cloudresourcemanager.googleapis.com/projects/<PROJECT_NUMBER>
    使用项目编号,而不是 project ID。当收到 project ID 时,在同一条回复中同时输出
    gcloud projects describe PROJECT_ID --format="value(projectNumber)"
    和
    capability-configs create
    命令模板(默认使用
    --types=agent-management
    )。
  • 附加 boundaries 前设置
    BoundaryConfig
    ,并隔离
    dev
    /
    prod
    Hubs
    :在附加 boundaries 之前,先执行
    boundary-configs update --tag-key=...
    。为严格隔离目录和 IAM,请为每个环境(
    dev
    与
    prod
    )分别使用独立的
    CapabilityConfig
    、Management Project 和
    Boundary
    。
  • 重新绑定 Tag 需要先删除再创建:在 tag 值之间移动项目(例如从
    dev
    移到
    prod
    )时,如果只运行
    create
    ,会因
    FAILED_PRECONDITION
    而失败;务必先运行
    tags bindings delete
    ,再运行
    tags bindings create
    。
  • 安全的三步拆卸顺序:删除 boundary 和 capability config 时,始终按顺序输出全部 3 条命令(注意:BYO projects 会通过
    isManagementProject=false
    保留,而 Google-managed hubs 会被删除):
    bash
    gcloud resource-manager capability-configs update CAPABILITY_CONFIG_ID --folder=FOLDER_ID --clear-boundaries
    gcloud resource-manager boundaries delete BOUNDARY_ID --folder=FOLDER_ID
    gcloud resource-manager capability-configs delete CAPABILITY_CONFIG_ID --folder=FOLDER_ID

Advanced Filtering & Search

高级筛选与搜索

Filtering (
list --filter
)

筛选(
list --filter
)

  • URN Substring Filtering (
    agentId
    &
    mcpServerId
    )
    :
    • agentId
      :
      urn:agent:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments}
    • mcpServerId
      :
      urn:mcp:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments}
    • Platform segments:
      aiplatform:reasoningEngines:{id}
      (Vertex AI Reasoning Engine),
      container:clusters:{cluster}:k8s:namespaces:{ns}:apps:deployments:{deploy}
      (GKE),
      run:services:{svc}
      or
      run:jobs:{job}
      (Cloud Run).
  • Attribute Mapping:
    • "runtime" ("agent engine", "reasoning engine", "vertex ai" ->
      reasoningEngine
      ):
      attributes."agentregistry.googleapis.com/system/RuntimeReference".uri
    • "identity":
      attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal
    • "tool" / "tool name" (on
      mcp-servers list
      ):
      tools.name
bash
undefined
  • URN 子字符串筛选(
    agentId
    与
    mcpServerId
    )
    :
    • agentId
      :
      urn:agent:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments}
    • mcpServerId
      :
      urn:mcp:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments}
    • Platform segments:
      aiplatform:reasoningEngines:{id}
      (Vertex AI Reasoning Engine)、
      container:clusters:{cluster}:k8s:namespaces:{ns}:apps:deployments:{deploy}
      (GKE)、
      run:services:{svc}
      或
      run:jobs:{job}
      (Cloud Run)。
  • 属性映射:
    • "runtime"("agent engine"、"reasoning engine"、"vertex ai" ->
      reasoningEngine
      ):
      attributes."agentregistry.googleapis.com/system/RuntimeReference".uri
    • "identity":
      attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal
    • "tool" / "tool name"(用于
      mcp-servers list
      ):
      tools.name
bash
undefined

Filter agents by runtime (Vertex AI Reasoning Engine) or identity principal

Filter agents by runtime (Vertex AI Reasoning Engine) or identity principal

gcloud agent-registry agents list --location=us-central1
--filter="attributes."agentregistry.googleapis.com/system/RuntimeReference".uri:reasoningEngine" gcloud agent-registry agents list --location=us-central1
--filter="attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal:service-123456789012"
gcloud agent-registry agents list --location=us-central1
--filter="attributes."agentregistry.googleapis.com/system/RuntimeReference".uri:reasoningEngine" gcloud agent-registry agents list --location=us-central1
--filter="attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal:service-123456789012"

Filter by agentId / mcpServerId substring or MCP tool name

Filter by agentId / mcpServerId substring or MCP tool name

gcloud agent-registry agents list --location=us-central1 --filter="agentId:reason" gcloud agent-registry mcp-servers list --location=us-central1 --filter="mcpServerId:run" gcloud agent-registry mcp-servers list --location=us-central1 --filter="tools.name:search_documents"
undefined
gcloud agent-registry agents list --location=us-central1 --filter="agentId:reason" gcloud agent-registry mcp-servers list --location=us-central1 --filter="mcpServerId:run" gcloud agent-registry mcp-servers list --location=us-central1 --filter="tools.name:search_documents"
undefined

Searching Agents, MCP Servers, and Skills (
search
)

搜索 Agents、MCP Servers 和 Skills(
search
)

  • Agents (
    gcloud agent-registry agents search
    )
    : Supports
    --search-string
    with exact (
    =
    ), token (
    :
    ), and prefix (
    *
    ) matching across
    agentId
    ,
    displayName
    ,
    skills.name
    ,
    skills.id
    ,
    skills.tags
    ,
    skills.description
    , and boolean
    OR
    /
    AND
    . Note: Values with colons (URNs) must be quoted, and wildcard
    *
    is not supported on
    skills.description
    (use token match
    :
    instead).
  • MCP Servers (
    gcloud agent-registry mcp-servers search
    )
    : Supports
    --search-string
    across
    mcpServerId
    ,
    name
    , and
    displayName
    .
  • Skills (
    gcloud agent-registry skills search
    )
    : Supports
    --query
    and
    --search-type=keyword
    or
    --search-type=semantic
    in
    global
    ,
    us
    , or
    eu
    .
bash
undefined
  • Agents(
    gcloud agent-registry agents search
    )
    :支持通过
    --search-string
    使用精确匹配(
    =
    )、token 匹配(
    :
    )和前缀匹配(
    *
    ),可搜索
    agentId
    、
    displayName
    、
    skills.name
    、
    skills.id
    、
    skills.tags
    、
    skills.description
    ,并支持布尔
    OR
    /
    AND
    。注意:包含冒号的值(URNs)必须加引号,且
    skills.description
    不支持通配符
    *
    (请改用 token 匹配
    :
    )。
  • MCP Servers(
    gcloud agent-registry mcp-servers search
    )
    :支持通过
    --search-string
    搜索
    mcpServerId
    、
    name
    和
    displayName
    。
  • Skills(
    gcloud agent-registry skills search
    )
    :在
    global
    、
    us
    或
    eu
    中支持
    --query
    以及
    --search-type=keyword
    或
    --search-type=semantic
    。
bash
undefined

Search Agents

Search Agents

gcloud agent-registry agents search --location=us-central1 --search-string="agentId:"urn:agent:projects-123456789012*"" gcloud agent-registry agents search --location=us-central1 --search-string="displayName:MyAgent*" gcloud agent-registry agents search --location=us-central1 --search-string="skills.name:translation" gcloud agent-registry agents search --location=us-central1 --search-string="skills.id:translate-text" gcloud agent-registry agents search --location=us-central1 --search-string="skills.tags:productivity" gcloud agent-registry agents search --location=us-central1 --search-string="skills.description:database" gcloud agent-registry agents search --location=us-central1 --search-string="analytics OR reporting"
gcloud agent-registry agents search --location=us-central1 --search-string="agentId:"urn:agent:projects-123456789012*"" gcloud agent-registry agents search --location=us-central1 --search-string="displayName:MyAgent*" gcloud agent-registry agents search --location=us-central1 --search-string="skills.name:translation" gcloud agent-registry agents search --location=us-central1 --search-string="skills.id:translate-text" gcloud agent-registry agents search --location=us-central1 --search-string="skills.tags:productivity" gcloud agent-registry agents search --location=us-central1 --search-string="skills.description:database" gcloud agent-registry agents search --location=us-central1 --search-string="analytics OR reporting"

Search MCP Servers

Search MCP Servers

gcloud agent-registry mcp-servers search --location=us-central1 --search-string="mcpServerId:"urn:mcp:projects-123456789012*"" gcloud agent-registry mcp-servers search --location=us-central1 --search-string="displayName:MyMcp*"
gcloud agent-registry mcp-servers search --location=us-central1 --search-string="mcpServerId:"urn:mcp:projects-123456789012*"" gcloud agent-registry mcp-servers search --location=us-central1 --search-string="displayName:MyMcp*"

Search Skills (Keyword and Semantic)

Search Skills (Keyword and Semantic)

gcloud agent-registry skills search --location=us --query="sql" --search-type=keyword gcloud agent-registry skills search --location=us --query="summarize support tickets" --search-type=semantic

---
gcloud agent-registry skills search --location=us --query="sql" --search-type=keyword gcloud agent-registry skills search --location=us --query="summarize support tickets" --search-type=semantic

---

Python ADK Integration

Python ADK 集成

Whenever the user asks to discover or connect to registered Agents (
get_remote_a2a_agent
) or MCP Servers (
get_mcp_toolset
) in Python using Google's Agent Development Kit (
google-adk[a2a,agent-identity,mcp]
), read and follow ADK Integration Guide.

每当用户要求使用 Google 的 Agent Development Kit(
google-adk[a2a,agent-identity,mcp]
)在 Python 中发现或连接已注册的 Agents(
get_remote_a2a_agent
)或 MCP Servers(
get_mcp_toolset
)时,请阅读并遵循 ADK 集成指南。

Documentation Fallback (
developerknowledge
MCP Server)

文档回退(
developerknowledge
MCP Server)

For CLI synopses, read gcloud Command Reference. If a user asks about a feature, Terraform resource (
google_agent_registry_service
), or error not covered in
SKILL.md
or
references/
, query the
developerknowledge
MCP server (
search_documents
+
get_documents
, or
answer_query
) or fetch the public
.md.txt
documentation pages:
  • https://docs.cloud.google.com/agent-registry/overview.md.txt
  • https://docs.cloud.google.com/agent-registry/automatic-registration.md.txt
  • https://docs.cloud.google.com/agent-registry/manual-registration.md.txt
  • https://docs.cloud.google.com/agent-registry/register-agents.md.txt
  • https://docs.cloud.google.com/agent-registry/register-mcp-servers.md.txt
  • https://docs.cloud.google.com/agent-registry/register-endpoints.md.txt
  • https://docs.cloud.google.com/agent-registry/register-skills.md.txt
  • https://docs.cloud.google.com/agent-registry/manage-skills.md.txt
  • https://docs.cloud.google.com/agent-registry/skills-architecture.md.txt
  • https://docs.cloud.google.com/agent-registry/scan-skills.md.txt
  • https://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txt
  • https://docs.cloud.google.com/agent-registry/access-control.md.txt
  • https://docs.cloud.google.com/agent-registry/roles-permissions.md.txt
  • https://docs.cloud.google.com/agent-registry/a2a-protocol.md.txt
  • https://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txt
  • https://docs.cloud.google.com/agent-registry/search-agents-and-tools.md.txt
  • https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt
  • https://docs.cloud.google.com/agent-registry/troubleshooting.md.txt
  • https://docs.cloud.google.com/run/docs/ai/agent-platform-features.md.txt
有关 CLI 概览,请阅读 gcloud 命令参考。如果用户询问
SKILL.md
或
references/
未涵盖的 feature、Terraform resource(
google_agent_registry_service
)或错误,请查询
developerknowledge
MCP server(
search_documents
+
get_documents
,或
answer_query
),或获取以下公开的
.md.txt
文档页面:
  • https://docs.cloud.google.com/agent-registry/overview.md.txt
  • https://docs.cloud.google.com/agent-registry/automatic-registration.md.txt
  • https://docs.cloud.google.com/agent-registry/manual-registration.md.txt
  • https://docs.cloud.google.com/agent-registry/register-agents.md.txt
  • https://docs.cloud.google.com/agent-registry/register-mcp-servers.md.txt
  • https://docs.cloud.google.com/agent-registry/register-endpoints.md.txt
  • https://docs.cloud.google.com/agent-registry/register-skills.md.txt
  • https://docs.cloud.google.com/agent-registry/manage-skills.md.txt
  • https://docs.cloud.google.com/agent-registry/skills-architecture.md.txt
  • https://docs.cloud.google.com/agent-registry/scan-skills.md.txt
  • https://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txt
  • https://docs.cloud.google.com/agent-registry/access-control.md.txt
  • https://docs.cloud.google.com/agent-registry/roles-permissions.md.txt
  • https://docs.cloud.google.com/agent-registry/a2a-protocol.md.txt
  • https://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txt
  • https://docs.cloud.google.com/agent-registry/search-agents-and-tools.md.txt
  • https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt
  • https://docs.cloud.google.com/agent-registry/troubleshooting.md.txt
  • https://docs.cloud.google.com/run/docs/ai/agent-platform-features.md.txt

Error Handling

错误处理

  1. Verify Cloud SDK version (560.0.0+, updated for GA
    skills
    ) and
    beta
    component (2026.03.09+ for Cloud Run).
  2. Verify
    --location
    /
    --region
    : Google Cloud remote MCP servers are discovered in
    global
    ; Skills only support
    global
    ,
    us
    , or
    eu
    .
  3. Ensure JSON strings passed to
    --interfaces
    ,
    --agent-spec-content
    , or
    --mcp-server-spec-content
    are properly single-quoted for the shell.
  4. Confirm required APIs (
    agentregistry.googleapis.com
    ,
    run.googleapis.com
    ,
    apphub.googleapis.com
    ) and IAM roles are enabled on the target project.
  1. 验证 Cloud SDK 版本(560.0.0+,已更新以支持 GA
    skills
    )和
    beta
    component(Cloud Run 要求 2026.03.09+)。
  2. 验证
    --location
    /
    --region
    :Google Cloud remote MCP servers 在
    global
    中被发现;Skills 仅支持
    global
    、
    us
    或
    eu
    。
  3. 确保传递给
    --interfaces
    、
    --agent-spec-content
    或
    --mcp-server-spec-content
    的 JSON 字符串已正确使用 shell 单引号。
  4. 确认目标项目已启用所需 APIs(
    agentregistry.googleapis.com
    、
    run.googleapis.com
    、
    apphub.googleapis.com
    )和 IAM roles。