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 (, , , , , , , , , ), ( and for automatic registration of Cloud Run services and jobs), Kubernetes manifests and scripts/annotate_gke.py (GKE automatic registration), (, , , and for management boundaries), and Python ADK ().
gcloud agent-registryagentsmcp-serversservicesendpointsbindingsskillsfindingspublishersai-applicationsoperationsgcloud beta run--functional-type--identity-typegcloud resource-managerboundary-configscapability-configsboundariestags bindingsgoogle-adk使用 (、、、、、、、、、)、( 和 ,用于自动注册 Cloud Run services 和 jobs)、Kubernetes manifests 和 scripts/annotate_gke.py(GKE 自动注册)、(、、,以及用于管理边界的 )以及 Python ADK()与 Google Cloud Agent Registry 交互。
gcloud agent-registryagentsmcp-serversservicesendpointsbindingsskillsfindingspublishersai-applicationsoperationsgcloud beta run--functional-type--identity-typegcloud resource-managerboundary-configscapability-configsboundariestags bindingsgoogle-adkUsage Attribution
使用归属
MUST READ: Before executing any , REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.
gcloud必须阅读:在执行任何 、REST API 或 MCP 命令之前,你必须阅读并遵循 使用归属 中的说明。
gcloudWorkflow
工作流
- Resolve session context — at the start of each session, silently run:
Store the results asbash
gcloud config get-value project 2>/dev/null gcloud config get-value compute/region 2>/dev/nullandSESSION_PROJECTand use them as defaults.SESSION_LOCATION - Parse the user's request to identify the target resource and action.
- Construct the 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.
gcloud - Documentation Fallback — if a user asks about a feature, flag, schema, or error message not covered in this skill, query the MCP server or public
developerknowledgedocumentation (see Documentation Fallback)..md.txt - Approval:
- Read-only commands (,
list,describe,search): Execute immediately without asking for approval.get-iam-policy - Mutating commands (,
create,delete,update,deploy,set-iam-policy,add-iam-policy-binding): Display the exact command and ask: "Ready to run this command? (yes/no)"remove-iam-policy-binding - Multi-task requests: Always output the commands for every requested task in the same response before asking for approval.
- Read-only commands (
- Execute and display the output.
- 解析会话上下文——在每个会话开始时,静默运行:
将结果存储为bash
gcloud config get-value project 2>/dev/null gcloud config get-value compute/region 2>/dev/null和SESSION_PROJECT,并将其用作默认值。SESSION_LOCATION - 解析用户请求,确定目标资源和操作。
- 使用会话默认值构造 命令或 Kubernetes manifest。有关完整 flag 概览、命令摘要表以及 60 多个自然语言到命令的示例,请参阅 gcloud 命令参考。
gcloud - 文档回退——如果用户询问此 skill 未涵盖的 feature、flag、schema 或错误消息,请查询 MCP server 或公开的
developerknowledge文档(请参阅文档回退)。.md.txt - 批准:
- 只读命令(、
list、describe、search):立即执行,无需询问批准。get-iam-policy - 变更命令(、
create、delete、update、deploy、set-iam-policy、add-iam-policy-binding):显示确切命令并询问:"准备好运行此命令吗?(yes/no)"remove-iam-policy-binding - 多任务请求:始终在同一条回复中输出每个所请求任务的命令,然后再询问批准。
- 只读命令(
- 执行并显示输出。
Prerequisites, Auth, Billing, Region & IAM Permissions
前提条件、身份验证、计费、区域与 IAM 权限
- Cloud SDK: Requires 560.0.0+ (
gcloud2026.03.09+ for Cloud Run automatic registration; ensurebetais up to date for GAgcloud). Do not install or update tools or packages on the host without explicit user approval; ifgcloud agent-registry skillsis missing, sharegcloudand fall back tohttps://docs.cloud.google.com/sdk/docs/install-sdk.md.txtdocumentation..md.txt - 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 () and verify supported regions at
gcloud config set compute/region us-central1andhttps://docs.cloud.google.com/agent-registry/locations.md.txt(note: Skills only supporthttps://cloud.google.com/about/locations,global, orus).eu - Authentication: Check active credentials first with . Because
gcloud auth listandgcloud auth loginlaunch interactive browser flows and stop responding in non-interactive shells, never execute them directly — if unauthenticated, ask the user to rungcloud auth application-default login(for CLI sessions) orgcloud auth login(for local Python ADK Application Default Credentials) in their own terminal, or configuregcloud auth application-default login.GOOGLE_APPLICATION_CREDENTIALS
bash
undefined- Cloud SDK:要求 560.0.0+(Cloud Run 自动注册要求
gcloud2026.03.09+;请确保beta为最新版本,以使用 GAgcloud)。不要在未获得用户明确批准的情况下在主机上安装或更新工具或软件包;如果缺少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验证受支持的区域(注意:Skills 仅支持https://cloud.google.com/about/locations、global或us)。eu - 身份验证:先使用 检查活动凭据。由于
gcloud auth list和gcloud auth login会启动交互式浏览器流程并在非交互式 shell 中停止响应,因此绝不直接执行它们——如果尚未认证,请让用户在自己的终端中运行gcloud auth application-default login(用于 CLI 会话),或为本地 Python ADK Application Default Credentials 运行gcloud auth login,也可以配置gcloud auth application-default login。GOOGLE_APPLICATION_CREDENTIALS
bash
undefinedCheck 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 createcreates a writablegcloud agent-registry services createresource to manually register external or cross-projectService,Agent, andMcpServerresources in Agent Registry, and automatically projects a corresponding read-onlyEndpoint,Agent, orMcpServercatalog entry (Endpoint, returned inagentregistry-{ID}onregistryResource) used for runtime discovery and IAP/Agent Gateway policies.services describe
- 手动注册():
services create创建一个可写的gcloud agent-registry services create资源,用于在 Agent Registry 中手动注册外部或跨项目的Service、Agent和McpServer资源,并自动投影对应的只读Endpoint、Agent或McpServer目录条目(Endpoint,通过agentregistry-{ID}的services describe返回),以供运行时发现以及 IAP/Agent Gateway policies 使用。registryResource
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
undefinedRegister 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"}]'
--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"}]'
--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
undefinedgcloud agent-registry mcp-servers list --location=us-central1
gcloud agent-registry mcp-servers list --location=global
undefined2. Agents
2. Agents
For A2A agents, if the user has not pasted yet, ask: "Please paste the contents of your file." and preview the command template using :
agent_card.jsonagent_card.json'PASTE_AGENT_CARD_JSON_HERE'bash
undefined对于 A2A agents,如果用户尚未粘贴 ,请询问:"请粘贴您的 文件内容。",并使用 预览命令模板:
agent_card.jsonagent_card.json'PASTE_AGENT_CARD_JSON_HERE'bash
undefinedRegister 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"}]'
--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"}]'
--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'
--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'
--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
undefinedgcloud agent-registry agents list --location=us-central1
gcloud agent-registry agents list --location=global
undefined3. Endpoints, Services & Quick Add GCP Service (Composite Agent Gateway Registration)
3. Endpoints、Services 与 Quick Add GCP Service(复合 Agent Gateway 注册)
bash
undefinedbash
undefinedRegister 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
--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
undefinedgcloud 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
--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
undefinedQuick 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:
- Base:
https://${SERVICE_ID}.googleapis.com - Base mTLS:
https://${SERVICE_ID}.mtls.googleapis.com - Locational: (omit when
https://${LOCATION}-${SERVICE_ID}.googleapis.com)--location=global - Locational mTLS: (omit when
https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com)--location=global - Regional REP: (omit when
https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com)--location=global
Register a single composite containing all applicable variants using scripts/quick-add-gcp-service.sh or (always previewing and asking for approval first):
Servicegcloud agent-registry services create- Service ID Length (chars): Service IDs must match
4–63. For 3-letter APIs (^[a-z][a-z0-9-]{2,61}[a-z0-9]$,iam,kms,run), suffix thednsID (e.g.,Service) while keeping${SERVICE_ID}-apiin the endpoint URLs.${SERVICE_ID} - Global Location Guardrail: When , include only
--location=globalandBaseso invalid regional DNS names are not registered.Base mTLS - IAP Egress Policy Target: Bind for the Agent Identity to the projected
roles/iap.egressorcatalog ID (Endpointfromendpoints/agentregistry-{UUID}onregistryResource), not the user-chosenservices describeID.Service
bash
undefined当 Agent 运行在受治理的 Agent Gateway(默认拒绝出站流量)之后时,Google Cloud SDK 会动态解析最多 5 种主机名变体的 endpoints:
- 基础:
https://${SERVICE_ID}.googleapis.com - 基础 mTLS:
https://${SERVICE_ID}.mtls.googleapis.com - 位置型:(当
https://${LOCATION}-${SERVICE_ID}.googleapis.com时省略)--location=global - 位置型 mTLS:(当
https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com时省略)--location=global - 区域 REP:(当
https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com时省略)--location=global
使用 scripts/quick-add-gcp-service.sh 或 注册一个包含所有适用变体的单一复合 (始终先预览并询问批准):
gcloud agent-registry services createService- Service ID 长度(个字符):Service IDs 必须匹配
4–63。对于 3 字母 API(^[a-z][a-z0-9-]{2,61}[a-z0-9]$、iam、kms、run),请为dnsID 添加后缀(例如Service),同时在 endpoint URLs 中保留${SERVICE_ID}-api。${SERVICE_ID} - Global Location Guardrail:当 时,仅包含
--location=global和Base,以免注册无效的区域 DNS 名称。Base mTLS - IAP Egress Policy Target:将 绑定到 Agent Identity 对应的投影
roles/iap.egressor目录 ID(Endpoint,通过endpoints/agentregistry-{UUID}的services describe获取),而不是用户选择的registryResourceID。Service
bash
undefinedOption 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"
--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"
undefinedSERVICE_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"
--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"
undefined4. GKE Agents & MCP Servers (Automatic Registration)
4. GKE Agents 与 MCP Servers(自动注册)
Configure GKE manifests for automatic discovery in Agent Registry (using as the display name):
Deploymentmetadata.name| Component Type | | | |
|---|---|---|---|
| GKE Agent | | | |
| GKE MCP Server | | | |
Use scripts/annotate_gke.py to automatically add , , and the Pod template annotation to existing YAML files (target path is required; supports ):
registry.gke.io/functional-typeapphub.cloud.google.com/functional-typeiam.gke.io/spiffe-identity-type: "agent-identity"--dry-runbash
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type AGENT
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type MCP_SERVERGKE Agent ( + ) & MCP Server () Templates:
DeploymentServiceDeploymentyaml
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-agentyaml
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 manifests,以在 Agent Registry 中自动发现资源(使用 作为显示名称):
Deploymentmetadata.name| 组件类型 | | | |
|---|---|---|---|
| GKE Agent | | | |
| GKE MCP Server | | | |
使用 scripts/annotate_gke.py 自动向现有 YAML 文件添加 、 和 Pod template annotation(必须指定目标路径;支持 ):
registry.gke.io/functional-typeapphub.cloud.google.com/functional-typeiam.gke.io/spiffe-identity-type: "agent-identity"--dry-runbash
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type AGENT
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type MCP_SERVERGKE Agent( + )与 MCP Server()模板:
DeploymentServiceDeploymentyaml
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-agentyaml
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.05. Cloud Run Agents & MCP Servers (Automatic Registration via --functional-type
)
--functional-type5. Cloud Run Agents 与 MCP Servers(通过 --functional-type
自动注册)
--functional-typeRegister Cloud Run services and jobs automatically using :
gcloud beta run[!WARNING] Critical Cloud Run Guardrails:
- Immutability: Once
or--functional-typeis set on a Cloud Run service or job, it is immutable and cannot be changed or cleared.--identity-type Requires--functional-type=agent: Always include--identity-type=agent-identitywhenever--identity-type=agent-identityis used (certificates are provisioned by default; opt out with--functional-type=agent).--no-identity-certificate- Updating Existing Services (
Guardrail): Transitioning an existing service to--no-trafficassigns a new SPIFFE Agent Identity principal (--identity-type=agent-identity) that does not inherit the previous service account's IAM permissions. Recommendprincipal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/run/projects/PROJECT_NUMBER/locations/REGION/services/SERVICE_NAMEon--no-trafficto stage IAM bindings before shifting traffic.gcloud beta run services update- Cloud Run Jobs Cannot Be MCP Servers: Only Cloud Run services support
; Cloud Run jobs only support--functional-type=mcp-server.--functional-type=agent
bash
undefined使用 自动注册 Cloud Run services 和 jobs:
gcloud beta run[!WARNING] Cloud Run 关键防护规则:
- 不可变性:一旦在 Cloud Run service 或 job 上设置
或--functional-type,该值即不可更改且无法清除。--identity-type 要求--functional-type=agent:使用--identity-type=agent-identity时,始终包含--functional-type=agent(默认预配证书;可使用--identity-type=agent-identity选择退出)。--no-identity-certificate- 更新现有 Services(
防护规则):将现有 service 转换为--no-traffic时,会分配新的 SPIFFE Agent Identity principal(--identity-type=agent-identity),该 principal 不会继承原 service account 的 IAM permissions。建议在principal://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/run/projects/PROJECT_NUMBER/locations/REGION/services/SERVICE_NAME中使用gcloud beta run services update,先完成 IAM bindings 的预配置,再切换流量。--no-traffic- Cloud Run Jobs 不能作为 MCP Servers:只有 Cloud Run services 支持
;Cloud Run jobs 仅支持--functional-type=mcp-server。--functional-type=agent
bash
undefinedDeploy 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
--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
--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
--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
--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
undefinedgcloud 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
undefined6. 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-central17. 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 (,--locationPrefix &private-):--target-state
- Supported Locations: Skills only work in
,"global", or"us"multi-regions. If a user asks for any single region (e.g."eu"), do not pass that region tous-central1. Explain that Skills are only supported ingcloud,global, orus, preview the command using a concrete supported multi-region (e.g.eu,--location=us, or--location=eu), and ask them to confirm which multi-region to use.--location=global- Automatic
Prefix: Runningprivate-automatically prependsgcloud agent-registry skills create my-skill, creatingprivate-. Subsequentskills/private-my-skill,describe,update,delete, andrevisionscommands must pass*-iam-policy(passingprivate-my-skillfails withmy-skill).NOT_FOUND- Target State & Scanning:
sets the desired lifecycle state on creation (--target-state=active|disabled|draftrequires an initial revision viaactiveor--payload;--gcs-source-urianddeprecatedare also valid ondecommissioned). Under the defaultupdatescanning policy,enabled-blockingenters--target-state=active(DRAFT) until the background security scan passes with no findings.STATE_DRAFT
bash
undefined使用 管理可复用的 AI Skills、Skill Revisions 和 Skill IAM policies。
gcloud agent-registry skills[!IMPORTANT] Skills 防护规则(、--location前缀与private-):--target-state
- 受支持的位置:Skills 仅支持
、"global"或"us"multi-regions。如果用户要求使用任何单一区域(例如"eu"),不要将该区域传递给us-central1。请说明 Skills 仅支持gcloud、global或us,使用具体的受支持 multi-region(例如eu、--location=us或--location=eu)预览命令,并请用户确认要使用的 multi-region。--location=global- 自动添加
前缀:运行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提供初始 revision;更新时也可使用--gcs-source-uri和deprecated)。在默认的decommissionedscanning policy 下,enabled-blocking会进入--target-state=active(DRAFT)状态,直至后台安全扫描通过且没有 findings。STATE_DRAFT
bash
undefinedList, 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
--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
--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'
--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'
undefinedgcloud 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'
--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'
undefined8. AI Applications (ai-applications
)
ai-applications8. AI Applications(ai-applications
)
ai-applicationsAn AI Application (, including the regional AI Application) groups agents, MCP servers, and endpoints under a governance perimeter.
projects/{project}/locations/{location}/aiApplications/{ai_application}defaultbash
undefinedAI Application(,包括区域 AI Application)将 agents、MCP servers 和 endpoints 归组到一个治理边界内。
projects/{project}/locations/{location}/aiApplications/{ai_application}defaultbash
undefinedList, 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*"
--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*"
--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
--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
--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'
--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'
undefinedgcloud 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'
--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'
undefined9. Management Boundary Setup (Admin Governance)
9. 管理边界设置(管理员治理)
Configure Folder/Organization hub-and-spoke perimeters using (, , , and ). Read Management Boundaries Guide for the full IAM table, 6 interactive scoping questions, and 6-step provisioning workflow.
gcloud resource-managerboundary-configscapability-configsboundariestags bindings- Always Use Project Numbers (): Cloud Resource Manager v3 requires project numbers (not project IDs) for
projects/<PROJECT_NUMBER>and--management-project=projects/<PROJECT_NUMBER>. When given a project ID, output both--parent=//cloudresourcemanager.googleapis.com/projects/<PROJECT_NUMBER>and thegcloud projects describe PROJECT_ID --format="value(projectNumber)"command template (capability-configs createby default) in the same response.--types=agent-management - Set Before Attaching Boundaries & Isolate
BoundaryConfig/devHubs: Setprodbefore attaching boundaries. Use separateboundary-configs update --tag-key=...+ Management Project +CapabilityConfigper environment (Boundaryvs.dev) for strict catalog and IAM isolation.prod - Tag Rebinding Requires Delete-Then-Create: Moving a project between tag values (e.g., to
dev) fails withprodif you only runFAILED_PRECONDITION; always runcreatefirst, thentags bindings delete.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 , while Google-managed hubs are deleted):
isManagementProject=falsebashgcloud 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
使用 (、、 和 )配置 Folder/Organization hub-and-spoke perimeters。有关完整 IAM 表、6 个交互式范围界定问题以及 6 步配置工作流,请阅读管理边界指南。
gcloud resource-managerboundary-configscapability-configsboundariestags bindings- 始终使用项目编号():Cloud Resource Manager v3 要求
projects/<PROJECT_NUMBER>和--management-project=projects/<PROJECT_NUMBER>使用项目编号,而不是 project ID。当收到 project ID 时,在同一条回复中同时输出--parent=//cloudresourcemanager.googleapis.com/projects/<PROJECT_NUMBER>和gcloud projects describe PROJECT_ID --format="value(projectNumber)"命令模板(默认使用capability-configs create)。--types=agent-management - 附加 boundaries 前设置 ,并隔离
BoundaryConfig/devHubs:在附加 boundaries 之前,先执行prod。为严格隔离目录和 IAM,请为每个环境(boundary-configs update --tag-key=...与dev)分别使用独立的prod、Management Project 和CapabilityConfig。Boundary - 重新绑定 Tag 需要先删除再创建:在 tag 值之间移动项目(例如从 移到
dev)时,如果只运行prod,会因create而失败;务必先运行FAILED_PRECONDITION,再运行tags bindings delete。tags bindings create - 安全的三步拆卸顺序:删除 boundary 和 capability config 时,始终按顺序输出全部 3 条命令(注意:BYO projects 会通过 保留,而 Google-managed hubs 会被删除):
isManagementProject=falsebashgcloud 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筛选(list --filter
)
list --filter- URN Substring Filtering (&
agentId):mcpServerId- :
agentIdurn:agent:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments} - :
mcpServerIdurn:mcp:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments} - Platform segments: (Vertex AI Reasoning Engine),
aiplatform:reasoningEngines:{id}(GKE),container:clusters:{cluster}:k8s:namespaces:{ns}:apps:deployments:{deploy}orrun:services:{svc}(Cloud Run).run:jobs:{job}
- Attribute Mapping:
- "runtime" ("agent engine", "reasoning engine", "vertex ai" -> ):
reasoningEngineattributes."agentregistry.googleapis.com/system/RuntimeReference".uri - "identity":
attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal - "tool" / "tool name" (on ):
mcp-servers listtools.name
- "runtime" ("agent engine", "reasoning engine", "vertex ai" ->
bash
undefined- URN 子字符串筛选(与
agentId):mcpServerId- :
agentIdurn:agent:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments} - :
mcpServerIdurn:mcp:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments} - Platform segments:(Vertex AI Reasoning Engine)、
aiplatform:reasoningEngines:{id}(GKE)、container:clusters:{cluster}:k8s:namespaces:{ns}:apps:deployments:{deploy}或run:services:{svc}(Cloud Run)。run:jobs:{job}
- 属性映射:
- "runtime"("agent engine"、"reasoning engine"、"vertex ai" -> ):
reasoningEngineattributes."agentregistry.googleapis.com/system/RuntimeReference".uri - "identity":
attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal - "tool" / "tool name"(用于 ):
mcp-servers listtools.name
- "runtime"("agent engine"、"reasoning engine"、"vertex ai" ->
bash
undefinedFilter 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"
--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="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"
undefinedgcloud 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"
undefinedSearching Agents, MCP Servers, and Skills (search
)
search搜索 Agents、MCP Servers 和 Skills(search
)
search- Agents (): Supports
gcloud agent-registry agents searchwith exact (--search-string), token (=), and prefix (:) matching across*,agentId,displayName,skills.name,skills.id,skills.tags, and booleanskills.description/OR. Note: Values with colons (URNs) must be quoted, and wildcardANDis not supported on*(use token matchskills.descriptioninstead).: - MCP Servers (): Supports
gcloud agent-registry mcp-servers searchacross--search-string,mcpServerId, andname.displayName - Skills (): Supports
gcloud agent-registry skills searchand--queryor--search-type=keywordin--search-type=semantic,global, orus.eu
bash
undefined- Agents():支持通过
gcloud agent-registry agents search使用精确匹配(--search-string)、token 匹配(=)和前缀匹配(:),可搜索*、agentId、displayName、skills.name、skills.id、skills.tags,并支持布尔skills.description/OR。注意:包含冒号的值(URNs)必须加引号,且AND不支持通配符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
undefinedSearch 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 () or MCP Servers () in Python using Google's Agent Development Kit (), read and follow ADK Integration Guide.
get_remote_a2a_agentget_mcp_toolsetgoogle-adk[a2a,agent-identity,mcp]每当用户要求使用 Google 的 Agent Development Kit()在 Python 中发现或连接已注册的 Agents()或 MCP Servers()时,请阅读并遵循 ADK 集成指南。
google-adk[a2a,agent-identity,mcp]get_remote_a2a_agentget_mcp_toolsetDocumentation Fallback (developerknowledge
MCP Server)
developerknowledge文档回退(developerknowledge
MCP Server)
developerknowledgeFor CLI synopses, read gcloud Command Reference. If a user asks about a feature, Terraform resource (), or error not covered in or , query the MCP server ( + , or ) or fetch the public documentation pages:
google_agent_registry_serviceSKILL.mdreferences/developerknowledgesearch_documentsget_documentsanswer_query.md.txthttps://docs.cloud.google.com/agent-registry/overview.md.txthttps://docs.cloud.google.com/agent-registry/automatic-registration.md.txthttps://docs.cloud.google.com/agent-registry/manual-registration.md.txthttps://docs.cloud.google.com/agent-registry/register-agents.md.txthttps://docs.cloud.google.com/agent-registry/register-mcp-servers.md.txthttps://docs.cloud.google.com/agent-registry/register-endpoints.md.txthttps://docs.cloud.google.com/agent-registry/register-skills.md.txthttps://docs.cloud.google.com/agent-registry/manage-skills.md.txthttps://docs.cloud.google.com/agent-registry/skills-architecture.md.txthttps://docs.cloud.google.com/agent-registry/scan-skills.md.txthttps://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txthttps://docs.cloud.google.com/agent-registry/access-control.md.txthttps://docs.cloud.google.com/agent-registry/roles-permissions.md.txthttps://docs.cloud.google.com/agent-registry/a2a-protocol.md.txthttps://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txthttps://docs.cloud.google.com/agent-registry/search-agents-and-tools.md.txthttps://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txthttps://docs.cloud.google.com/agent-registry/troubleshooting.md.txthttps://docs.cloud.google.com/run/docs/ai/agent-platform-features.md.txt
有关 CLI 概览,请阅读 gcloud 命令参考。如果用户询问 或 未涵盖的 feature、Terraform resource()或错误,请查询 MCP server( + ,或 ),或获取以下公开的 文档页面:
SKILL.mdreferences/google_agent_registry_servicedeveloperknowledgesearch_documentsget_documentsanswer_query.md.txthttps://docs.cloud.google.com/agent-registry/overview.md.txthttps://docs.cloud.google.com/agent-registry/automatic-registration.md.txthttps://docs.cloud.google.com/agent-registry/manual-registration.md.txthttps://docs.cloud.google.com/agent-registry/register-agents.md.txthttps://docs.cloud.google.com/agent-registry/register-mcp-servers.md.txthttps://docs.cloud.google.com/agent-registry/register-endpoints.md.txthttps://docs.cloud.google.com/agent-registry/register-skills.md.txthttps://docs.cloud.google.com/agent-registry/manage-skills.md.txthttps://docs.cloud.google.com/agent-registry/skills-architecture.md.txthttps://docs.cloud.google.com/agent-registry/scan-skills.md.txthttps://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txthttps://docs.cloud.google.com/agent-registry/access-control.md.txthttps://docs.cloud.google.com/agent-registry/roles-permissions.md.txthttps://docs.cloud.google.com/agent-registry/a2a-protocol.md.txthttps://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txthttps://docs.cloud.google.com/agent-registry/search-agents-and-tools.md.txthttps://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txthttps://docs.cloud.google.com/agent-registry/troubleshooting.md.txthttps://docs.cloud.google.com/run/docs/ai/agent-platform-features.md.txt
Error Handling
错误处理
- Verify Cloud SDK version (560.0.0+, updated for GA ) and
skillscomponent (2026.03.09+ for Cloud Run).beta - Verify /
--location: Google Cloud remote MCP servers are discovered in--region; Skills only supportglobal,global, orus.eu - Ensure JSON strings passed to ,
--interfaces, or--agent-spec-contentare properly single-quoted for the shell.--mcp-server-spec-content - Confirm required APIs (,
agentregistry.googleapis.com,run.googleapis.com) and IAM roles are enabled on the target project.apphub.googleapis.com
- 验证 Cloud SDK 版本(560.0.0+,已更新以支持 GA )和
skillscomponent(Cloud Run 要求 2026.03.09+)。beta - 验证 /
--location:Google Cloud remote MCP servers 在--region中被发现;Skills 仅支持global、global或us。eu - 确保传递给 、
--interfaces或--agent-spec-content的 JSON 字符串已正确使用 shell 单引号。--mcp-server-spec-content - 确认目标项目已启用所需 APIs(、
agentregistry.googleapis.com、run.googleapis.com)和 IAM roles。apphub.googleapis.com