1
---
2
name: agent-platform-agent-registry
3
description: >-
4
Manages Google Cloud Agent Registry (agentregistry.googleapis.com) resources
5
using gcloud CLI and Kubernetes manifests, including agents, MCP servers,
6
endpoints, services, bindings, AI applications, skills and skill revisions,
7
resource-level IAM policies, Cloud Run and GKE automatic workload
8
registration, Cloud Resource Manager management boundaries, 5-endpoint Quick
9
Add for Agent Gateway, and Python ADK integration. Use when registering,
10
discovering, searching, filtering, or governing agents, MCP servers,
11
endpoints, skills, AI applications, or management boundaries in Google Cloud
12
Agent Registry. Don't use for the preview AI Platform Skill Registry Python
13
scripts (use agent-platform-skill-registry), deploying raw Vertex AI Agent
14
Engine code (use agent-platform-deploy), or runtime trace debugging (use
15
agent-platform-troubleshooting).
16
metadata:
17
version: "1.0.0"
18
category: AiAndMachineLearning
19
---
20
21
<!-- disableFinding(LINE_OVER_80) -->
22
23
# Google Cloud Agent Registry
24
25
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](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`).
26
27
## Usage Attribution
28
29
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you MUST read and follow the instructions in [Usage Attribution](references/attribution.md).
30
31
## Workflow
32
33
1. **Resolve session context** — at the start of each session, silently run:
34
```bash
35
gcloud config get-value project 2>/dev/null
36
gcloud config get-value compute/region 2>/dev/null
37
```
38
Store the results as `SESSION_PROJECT` and `SESSION_LOCATION` and use them as defaults.
39
2. **Parse** the user's request to identify the target resource and action.
40
3. **Construct** the `gcloud` command or Kubernetes manifest using session defaults. See [gcloud Command Reference](references/gcloud-command.md) for full flag synopses, command summary tables, and 60+ natural-language-to-command examples.
41
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](#documentation-fallback-developerknowledge-mcp-server)).
42
5. **Approval**:
43
- **Read-only commands** (`list`, `describe`, `search`, `get-iam-policy`): Execute immediately without asking for approval.
44
- **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)"_
45
- **Multi-task requests**: Always output the commands for **every** requested task in the same response before asking for approval.
46
6. **Execute** and display the output.
47
48
## Prerequisites, Auth, Billing, Region & IAM Permissions
49
50
- **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.
51
- **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`.
52
- **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`).
53
- **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`.
54
55
```bash
56
# Check active authentication status first (read-only)
57
gcloud auth list
58
59
# If unauthenticated, ask the user to run these interactively in their terminal:
60
# gcloud auth login
61
# gcloud auth application-default login
62
gcloud config set project PROJECT_ID
63
gcloud config set compute/region us-central1
64
gcloud services enable agentregistry.googleapis.com
65
```
66
67
| Role | Access Level |
68
|------|--------------|
69
| `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}`) |
70
| `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) |
71
| `roles/agentregistry.viewer` | Read-only access (`get`, `list`, `search`) to agents, MCP servers, endpoints, services, bindings, skills, skill revisions, publishers, and AI Applications |
72
| `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 |
73
| `roles/run.admin` + `roles/apphub.admin` + `roles/iam.serviceAccountUser` | Deploy or update Cloud Run services and jobs with `--functional-type` and `--identity-type` |
74
| `roles/resourcemanager.editor` | Create and update `BoundaryConfig`, `CapabilityConfig`, and `Boundary` on the parent folder or organization |
75
| `roles/resourcemanager.viewer` | Read `BoundaryConfig`, `CapabilityConfig`, and `Boundary` resources |
76
| `roles/resourcemanager.tagUser` | Bind or unbind tag values (`tags bindings create/delete`) on projects |
77
| `roles/owner` or `roles/editor` | Required on a candidate Bring-Your-Own project to associate it as a Management Project |
78
79
---
80
81
## Resource Types & Registration
82
83
- **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.
84
85
### 1. MCP Servers
86
87
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'`:
88
89
```bash
90
# Register an MCP Server (mutating — ask for approval first)
91
gcloud agent-registry services create my-mcp-service \
92
--location=us-central1 \
93
--display-name="My MCP Server" \
94
--description="Connects to an external MCP server" \
95
--mcp-server-spec-type=tool-spec \
96
--mcp-server-spec-content='PASTE_MCP_SPEC_JSON_HERE' \
97
--interfaces='[{"protocolBinding": "jsonrpc", "url": "https://mcp.example.com/v1"}]'
98
99
# List Regional or Global MCP Servers (read-only — execute immediately)
100
gcloud agent-registry mcp-servers list --location=us-central1
101
gcloud agent-registry mcp-servers list --location=global
102
```
103
104
### 2. Agents
105
106
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'`:
107
108
```bash
109
# Register a Standard Agent (no-spec)
110
gcloud agent-registry services create my-custom-agent \
111
--location=us-central1 \
112
--display-name="My Custom Agent" \
113
--description="Custom HTTP JSON agent" \
114
--agent-spec-type=no-spec \
115
--interfaces='[{"protocolBinding": "http-json", "url": "https://agent.example.com/v1"}]'
116
117
# Register an A2A Agent (a2a-agent-card)
118
gcloud agent-registry services create my-a2a-agent \
119
--location=us-central1 \
120
--display-name="My A2A Agent" \
121
--description="Sample A2A Agent" \
122
--agent-spec-type=a2a-agent-card \
123
--agent-spec-content='PASTE_AGENT_CARD_JSON_HERE'
124
125
# List Regional or Global Agents
126
gcloud agent-registry agents list --location=us-central1
127
gcloud agent-registry agents list --location=global
128
```
129
130
### 3. Endpoints, Services & Quick Add GCP Service (Composite Agent Gateway Registration)
131
132
```bash
133
# Register a single Endpoint, list/describe/update/delete Services, and inspect Operations
134
gcloud agent-registry services create gemini-models --location=us-central1 \
135
--display-name="Vertex AI Model Garden" --description="List of all models in Vertex AI Model Garden" \
136
--endpoint-spec-type=no-spec \
137
--interfaces='[{"protocolBinding": "jsonrpc", "url": "https://us-central1-aiplatform.googleapis.com/v1beta1/publishers/*/models"}]'
138
gcloud agent-registry endpoints list --location=us-central1
139
gcloud agent-registry services list --location=us-central1
140
gcloud agent-registry services describe gemini-models --location=us-central1
141
gcloud agent-registry services update gemini-models --display-name="Model Garden on Vertex AI" --location=us-central1
142
gcloud agent-registry services delete gemini-models --location=us-central1
143
gcloud agent-registry operations list --location=us-central1
144
gcloud agent-registry operations describe OPERATION_ID --location=us-central1
145
```
146
147
#### Quick Add GCP Service (All 5 Endpoint URL Variants)
148
149
When an agent runs behind a governed **Agent Gateway** (default-deny egress), Google Cloud SDKs dynamically resolve endpoints across up to 5 hostname variants:
150
1. **Base**: `https://${SERVICE_ID}.googleapis.com`
151
2. **Base mTLS**: `https://${SERVICE_ID}.mtls.googleapis.com`
152
3. **Locational**: `https://${LOCATION}-${SERVICE_ID}.googleapis.com` *(omit when `--location=global`)*
153
4. **Locational mTLS**: `https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com` *(omit when `--location=global`)*
154
5. **Regional REP**: `https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com` *(omit when `--location=global`)*
155
156
Register a **single composite `Service`** containing all applicable variants using [scripts/quick-add-gcp-service.sh](scripts/quick-add-gcp-service.sh) or `gcloud agent-registry services create` (always previewing and asking for approval first):
157
- **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.
158
- **Global Location Guardrail**: When `--location=global`, include only `Base` and `Base mTLS` so invalid regional DNS names are not registered.
159
- **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.
160
161
```bash
162
# Option A: Bundled Quick Add helper script (handles 3-letter APIs, --location=global, and --dry-run)
163
./scripts/quick-add-gcp-service.sh --service=aiplatform --location=us-central1 --project=PROJECT_ID
164
165
# Option B: Single composite gcloud command (all 5 variants for a regional location)
166
SERVICE_ID="aiplatform" && SERVICE_NAME="aiplatform" && LOCATION="us-central1" && PROJECT_ID="PROJECT_ID"
167
gcloud agent-registry services create "${SERVICE_NAME}" --project="${PROJECT_ID}" --location="${LOCATION}" \
168
--display-name="${SERVICE_ID}" --description="Google Cloud ${SERVICE_ID} API endpoints" --endpoint-spec-type=no-spec \
169
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.googleapis.com" \
170
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.mtls.googleapis.com" \
171
--interfaces="protocolBinding=jsonrpc,url=https://${LOCATION}-${SERVICE_ID}.googleapis.com" \
172
--interfaces="protocolBinding=jsonrpc,url=https://${LOCATION}-${SERVICE_ID}.mtls.googleapis.com" \
173
--interfaces="protocolBinding=jsonrpc,url=https://${SERVICE_ID}.${LOCATION}.rep.googleapis.com"
174
```
175
176
### 4. GKE Agents & MCP Servers (Automatic Registration)
177
178
Configure GKE `Deployment` manifests for automatic discovery in Agent Registry (using `metadata.name` as the display name):
179
180
| Component Type | `metadata.labels` (Deployment) | `metadata.annotations` (Deployment) | `spec.template.metadata.annotations` (Pod) |
181
|----------------|--------------------------------|-------------------------------------|--------------------------------------------|
182
| **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` |
183
| **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` |
184
185
Use [scripts/annotate_gke.py](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`):
186
187
```bash
188
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type AGENT
189
./scripts/annotate_gke.py /path/to/folder_or_file.yaml --type MCP_SERVER
190
```
191
192
**GKE Agent (`Deployment` + `Service`) & MCP Server (`Deployment`) Templates:**
193
```yaml
194
apiVersion: apps/v1
195
kind: Deployment
196
metadata:
197
name: my-agent
198
labels:
199
registry.gke.io/functional-type: "AGENT"
200
annotations:
201
apphub.cloud.google.com/functional-type: "AGENT"
202
a2a-protocol.org/agent-card: |
203
card:
204
endpoint: /.well-known/agent-card.json
205
protocol: HTTP
206
port: 8080
207
spec:
208
selector:
209
matchLabels:
210
app: my-agent
211
template:
212
metadata:
213
labels:
214
app: my-agent
215
annotations:
216
iam.gke.io/spiffe-identity-type: agent-identity
217
spec:
218
containers:
219
- name: server
220
image: us-central1-docker.pkg.dev/PROJECT_ID/my-repo/my-agent:1.0.0
221
ports:
222
- containerPort: 8080
223
---
224
apiVersion: v1
225
kind: Service
226
metadata:
227
name: my-agent-service
228
spec:
229
type: ClusterIP
230
ports:
231
- port: 8080
232
targetPort: 8080
233
protocol: TCP
234
name: http
235
selector:
236
app: my-agent
237
```
238
239
```yaml
240
apiVersion: apps/v1
241
kind: Deployment
242
metadata:
243
name: my-mcp-server
244
labels:
245
registry.gke.io/functional-type: "MCP_SERVER"
246
annotations:
247
apphub.cloud.google.com/functional-type: "MCP_SERVER"
248
modelcontextprotocol.info/urls: |
249
- https://my-mcp-server.default.svc.cluster.local/mcp
250
modelcontextprotocol.info/capabilities: |
251
card:
252
endpoint: "/mcp"
253
protocol: "HTTP"
254
spec:
255
selector:
256
matchLabels:
257
app: my-mcp-server
258
template:
259
metadata:
260
labels:
261
app: my-mcp-server
262
annotations:
263
iam.gke.io/spiffe-identity-type: agent-identity
264
spec:
265
containers:
266
- name: server
267
image: us-central1-docker.pkg.dev/PROJECT_ID/my-repo/my-mcp-server:1.0.0
268
```
269
270
### 5. Cloud Run Agents & MCP Servers (Automatic Registration via `--functional-type`)
271
272
Register Cloud Run services and jobs automatically using `gcloud beta run`:
273
274
> [!WARNING]
275
> **Critical Cloud Run Guardrails:**
276
> 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.
277
> 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`).
278
> 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.
279
> 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`.
280
281
```bash
282
# Deploy or update a Cloud Run service as an AI Agent or MCP Server
283
gcloud beta run deploy SERVICE_NAME --image=IMAGE_URL --region=us-central1 \
284
--functional-type=agent --identity-type=agent-identity
285
gcloud beta run services update SERVICE_NAME --region=us-central1 \
286
--functional-type=agent --identity-type=agent-identity --no-traffic
287
gcloud beta run deploy SERVICE_NAME --image=IMAGE_URL --region=us-central1 \
288
--functional-type=mcp-server --identity-type=IDENTITY_TYPE
289
gcloud beta run services update SERVICE_NAME --region=us-central1 --functional-type=mcp-server
290
291
# Create or update a Cloud Run Job as an AI Agent
292
gcloud beta run jobs create JOB_NAME --image=IMAGE_URL --region=us-central1 \
293
--functional-type=agent --identity-type=agent-identity
294
gcloud beta run jobs update JOB_NAME --region=us-central1 \
295
--functional-type=agent --identity-type=agent-identity
296
297
# Inspect Agent Identity or delete Cloud Run workloads
298
gcloud beta run revisions describe REVISION_NAME --region=us-central1
299
gcloud beta run jobs executions describe EXECUTION_NAME --region=us-central1
300
gcloud run services delete SERVICE_NAME --region=us-central1
301
gcloud run jobs delete JOB_NAME --region=us-central1
302
```
303
304
### 6. Bindings
305
306
Connect a source agent to a target resource or an Auth Provider connector:
307
308
```bash
309
gcloud agent-registry bindings create BINDING_NAME --location=us-central1 \
310
--display-name="My Custom Binding" --source-identifier="SOURCE_ID" --target-identifier="TARGET_ID"
311
gcloud agent-registry bindings create BINDING_NAME --location=us-central1 \
312
--display-name="Auth Provider Binding" --source-identifier="SOURCE_ID" \
313
--auth-provider="projects/PROJECT_ID/locations/REGION/connectors/AUTH_PROVIDER_ID"
314
gcloud agent-registry bindings list --location=us-central1
315
gcloud agent-registry bindings describe BINDING_NAME --location=us-central1
316
gcloud agent-registry bindings update BINDING_NAME --display-name="New Display Name" --location=us-central1
317
gcloud agent-registry bindings delete BINDING_NAME --location=us-central1
318
```
319
320
### 7. Skills & Skill Revisions
321
322
Manage reusable AI Skills, Skill Revisions, and Skill IAM policies using `gcloud agent-registry skills`.
323
324
> [!IMPORTANT]
325
> **Skills Guardrails (`--location`, `private-` Prefix & `--target-state`):**
326
> - **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.
327
> - **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`).
328
> - **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.
329
330
```bash
331
# List, create (local ZIP or GCS URI), describe, update, and delete Skills
332
gcloud agent-registry skills list --location=us
333
gcloud agent-registry skills create my-skill --location=us \
334
--display-name="My Custom Skill" --description="Skill description" --type=simple --target-state=active --payload=/path/to/archive.zip
335
gcloud agent-registry skills create my-skill --location=us \
336
--display-name="My Custom Skill" --target-state=disabled --gcs-source-uri=gs://my-bucket/skill.zip
337
gcloud agent-registry skills describe private-my-skill --location=us
338
gcloud agent-registry skills update private-my-skill --location=us --display-name="Updated Skill Name" --target-state=active
339
gcloud agent-registry skills delete private-my-skill --location=us
340
341
# Manage Skill Revisions and Resource-Level IAM Policies (using private-my-skill)
342
gcloud agent-registry skills revisions create REVISION_ID --skill=private-my-skill --location=us --payload=/path/to/archive.zip
343
gcloud agent-registry skills revisions list --skill=private-my-skill --location=us
344
gcloud agent-registry skills revisions describe REVISION_ID --skill=private-my-skill --location=us
345
gcloud agent-registry skills revisions download REVISION_ID --skill=private-my-skill --location=us --destination=./skill-payload.zip
346
gcloud agent-registry skills revisions delete REVISION_ID --skill=private-my-skill --location=us
347
gcloud agent-registry skills get-iam-policy private-my-skill --location=us
348
gcloud agent-registry skills set-iam-policy private-my-skill policy.json --location=us
349
gcloud agent-registry skills add-iam-policy-binding private-my-skill --location=us \
350
--member='user:test-user@example.com' --role='roles/agentregistry.viewer'
351
gcloud agent-registry skills remove-iam-policy-binding private-my-skill --location=us \
352
--member='user:test-user@example.com' --role='roles/agentregistry.viewer'
353
```
354
355
### 8. AI Applications (`ai-applications`)
356
357
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.
358
359
```bash
360
# List, filter, describe, and search AI Applications
361
gcloud agent-registry ai-applications list --location=us-central1
362
gcloud agent-registry ai-applications list --location=us-central1 \
363
--filter="attributes.environment.type=production AND attributes.criticality.type=high"
364
gcloud agent-registry ai-applications describe my-app --location=us-central1
365
gcloud agent-registry ai-applications describe default --location=us-central1
366
gcloud agent-registry ai-applications search --location=us-central1 --search-string="displayName:Support*"
367
368
# Create, update, and delete an AI Application
369
gcloud agent-registry ai-applications create my-app --location=us-central1 \
370
--display-name="Customer Support App" --description="AI Application orchestrating customer support agents" \
371
--environment-type=production --criticality-type=high \
372
--business-owners=email=biz-owner@example.com --developer-owners=email=dev-owner@example.com --operator-owners=email=ops-owner@example.com
373
gcloud agent-registry ai-applications update my-app --location=us-central1 \
374
--display-name="Updated Support App" --environment-type=staging --criticality-type=medium
375
gcloud agent-registry ai-applications delete my-app --location=us-central1 --force
376
377
# Inspect & search subresources scoped to an AI Application (agents, mcp-servers, endpoints)
378
gcloud agent-registry ai-applications agents list --ai-application=my-app --location=us-central1
379
gcloud agent-registry ai-applications agents describe AGENT_ID --ai-application=my-app --location=us-central1
380
gcloud agent-registry ai-applications agents search --ai-application=my-app --location=us-central1 --search-string="displayName:Assistant*"
381
gcloud agent-registry ai-applications mcp-servers list --ai-application=my-app --location=us-central1
382
gcloud agent-registry ai-applications endpoints list --ai-application=my-app --location=us-central1
383
384
# Manage Resource-Level IAM Policies on an AI Application
385
gcloud agent-registry ai-applications get-iam-policy my-app --location=us-central1
386
gcloud agent-registry ai-applications set-iam-policy my-app policy.json --location=us-central1
387
gcloud agent-registry ai-applications add-iam-policy-binding my-app --location=us-central1 \
388
--member='group:support-team@example.com' --role='roles/agentregistry.viewer'
389
gcloud agent-registry ai-applications remove-iam-policy-binding my-app --location=us-central1 \
390
--member='group:support-team@example.com' --role='roles/agentregistry.viewer'
391
```
392
393
### 9. Management Boundary Setup (Admin Governance)
394
395
Configure Folder/Organization hub-and-spoke perimeters using `gcloud resource-manager` (`boundary-configs`, `capability-configs`, `boundaries`, and `tags bindings`). Read [Management Boundaries Guide](references/management-boundaries.md) for the full IAM table, 6 interactive scoping questions, and 6-step provisioning workflow.
396
397
- **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.
398
- **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.
399
- **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`.
400
- **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):
401
```bash
402
gcloud resource-manager capability-configs update CAPABILITY_CONFIG_ID --folder=FOLDER_ID --clear-boundaries
403
gcloud resource-manager boundaries delete BOUNDARY_ID --folder=FOLDER_ID
404
gcloud resource-manager capability-configs delete CAPABILITY_CONFIG_ID --folder=FOLDER_ID
405
```
406
407
---
408
409
## Advanced Filtering & Search
410
411
### Filtering (`list --filter`)
412
413
- **URN Substring Filtering (`agentId` & `mcpServerId`)**:
414
- `agentId`: `urn:agent:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments}`
415
- `mcpServerId`: `urn:mcp:projects-{project-number}:projects:{project-number}:locations:{location}:{platform-segments}`
416
- 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).
417
- **Attribute Mapping**:
418
- **"runtime"** ("agent engine", "reasoning engine", "vertex ai" -> `reasoningEngine`): `attributes."agentregistry.googleapis.com/system/RuntimeReference".uri`
419
- **"identity"**: `attributes."agentregistry.googleapis.com/system/RuntimeIdentity".principal`
420
- **"tool" / "tool name"** (on `mcp-servers list`): `tools.name`
421
422
```bash
423
# Filter agents by runtime (Vertex AI Reasoning Engine) or identity principal
424
gcloud agent-registry agents list --location=us-central1 \
425
--filter="attributes.\"agentregistry.googleapis.com/system/RuntimeReference\".uri:reasoningEngine"
426
gcloud agent-registry agents list --location=us-central1 \
427
--filter="attributes.\"agentregistry.googleapis.com/system/RuntimeIdentity\".principal:service-123456789012"
428
429
# Filter by agentId / mcpServerId substring or MCP tool name
430
gcloud agent-registry agents list --location=us-central1 --filter="agentId:reason"
431
gcloud agent-registry mcp-servers list --location=us-central1 --filter="mcpServerId:run"
432
gcloud agent-registry mcp-servers list --location=us-central1 --filter="tools.name:search_documents"
433
```
434
435
### Searching Agents, MCP Servers, and Skills (`search`)
436
437
- **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).
438
- **MCP Servers (`gcloud agent-registry mcp-servers search`)**: Supports `--search-string` across `mcpServerId`, `name`, and `displayName`.
439
- **Skills (`gcloud agent-registry skills search`)**: Supports `--query` and `--search-type=keyword` or `--search-type=semantic` in `global`, `us`, or `eu`.
440
441
```bash
442
# Search Agents
443
gcloud agent-registry agents search --location=us-central1 --search-string="agentId:\"urn:agent:projects-123456789012*\""
444
gcloud agent-registry agents search --location=us-central1 --search-string="displayName:MyAgent*"
445
gcloud agent-registry agents search --location=us-central1 --search-string="skills.name:translation"
446
gcloud agent-registry agents search --location=us-central1 --search-string="skills.id:translate-text"
447
gcloud agent-registry agents search --location=us-central1 --search-string="skills.tags:productivity"
448
gcloud agent-registry agents search --location=us-central1 --search-string="skills.description:database"
449
gcloud agent-registry agents search --location=us-central1 --search-string="analytics OR reporting"
450
451
# Search MCP Servers
452
gcloud agent-registry mcp-servers search --location=us-central1 --search-string="mcpServerId:\"urn:mcp:projects-123456789012*\""
453
gcloud agent-registry mcp-servers search --location=us-central1 --search-string="displayName:MyMcp*"
454
455
# Search Skills (Keyword and Semantic)
456
gcloud agent-registry skills search --location=us --query="sql" --search-type=keyword
457
gcloud agent-registry skills search --location=us --query="summarize support tickets" --search-type=semantic
458
```
459
460
---
461
462
## Python ADK Integration
463
464
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](references/adk-docs.md).
465
466
---
467
468
## Documentation Fallback (`developerknowledge` MCP Server)
469
470
For CLI synopses, read [gcloud Command Reference](references/gcloud-command.md). 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:
471
- `https://docs.cloud.google.com/agent-registry/overview.md.txt`
472
- `https://docs.cloud.google.com/agent-registry/automatic-registration.md.txt`
473
- `https://docs.cloud.google.com/agent-registry/manual-registration.md.txt`
474
- `https://docs.cloud.google.com/agent-registry/register-agents.md.txt`
475
- `https://docs.cloud.google.com/agent-registry/register-mcp-servers.md.txt`
476
- `https://docs.cloud.google.com/agent-registry/register-endpoints.md.txt`
477
- `https://docs.cloud.google.com/agent-registry/register-skills.md.txt`
478
- `https://docs.cloud.google.com/agent-registry/manage-skills.md.txt`
479
- `https://docs.cloud.google.com/agent-registry/skills-architecture.md.txt`
480
- `https://docs.cloud.google.com/agent-registry/scan-skills.md.txt`
481
- `https://docs.cloud.google.com/agent-registry/boundaries-and-topology.md.txt`
482
- `https://docs.cloud.google.com/agent-registry/access-control.md.txt`
483
- `https://docs.cloud.google.com/agent-registry/roles-permissions.md.txt`
484
- `https://docs.cloud.google.com/agent-registry/a2a-protocol.md.txt`
485
- `https://docs.cloud.google.com/agent-registry/resolve-endpoints-and-build-orchestrators.md.txt`
486
- `https://docs.cloud.google.com/agent-registry/search-agents-and-tools.md.txt`
487
- `https://docs.cloud.google.com/agent-registry/identity-and-identifiers.md.txt`
488
- `https://docs.cloud.google.com/agent-registry/troubleshooting.md.txt`
489
- `https://docs.cloud.google.com/run/docs/ai/agent-platform-features.md.txt`
490
491
## Error Handling
492
493
1. Verify Cloud SDK version (**560.0.0+**, updated for GA `skills`) and `beta` component (**2026.03.09+** for Cloud Run).
494
2. Verify `--location` / `--region`: Google Cloud remote MCP servers are discovered in `global`; Skills only support `global`, `us`, or `eu`.
495
3. Ensure JSON strings passed to `--interfaces`, `--agent-spec-content`, or `--mcp-server-spec-content` are properly single-quoted for the shell.
496
4. Confirm required APIs (`agentregistry.googleapis.com`, `run.googleapis.com`, `apphub.googleapis.com`) and IAM roles are enabled on the target project.
497