agent-platform-troubleshooting
Skill21k starsChanged 2 months agoApache-2.0View on GitHub
Troubleshoots Google Cloud Gemini Enterprise Agent Platform issues (Agent Gateway, Registry, Identity, Policies, Model Armor, Identity-Aware Proxy (IAP)). Use when agent requests fail with 403 (especially unauthorized egress), Agent Runtime queries return 500, or gateway/IAP logs show permission errors. Don't use for general Google Cloud Identity and Access Management (IAM) debugging or networking issues unrelated to the Agent Platform stack.
1 other project uses a version of this, 1 of them edited.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- isaccanedo/skillsedited, first seen Aug 4, 2026
Who's talking about google/skills
- @camilleroux.com“google/skills : dépôt open source de Google avec des dizaines de skills prêts à l'emploi pour agents IA sur …”Bluesky · Aug 11, 2026 · 9 likes
- A Hacker News story“Google repository now has 90 skills”Hacker News · Aug 6, 2026 · 5 points
- vercel-labs/skills“[Feature]: Support npx skills add to discover double nested skill directories”GitHub · Jun 23, 2026 · 5 reactions
- @matsuu.bsky.social“Google公式Skillsリポジトリ”Bluesky · May 2, 2026 · 5 likes
- @kweinmeister.bsky.social“Resources: - Vercel Labs Skills CLI: github.com/vercel-labs/... - Google Agent Skills: …”Bluesky · Jun 27, 2026 · 4 likes
The biggest 5 of 32 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 32
Talked about on Bluesky, GitHub, the web and Hacker News (32 times).
On Bluesky · 14
- Aug 11, 2026google/skills : dépôt open source de Google avec des dizaines de skills prêts à l'emploi pour agents IA sur GKE, BigQuery, Gemini API et… — @camilleroux.com9 likes and reposts · 4 replies
- May 2, 2026Google公式Skillsリポジトリ — @matsuu.bsky.social5 likes and reposts
- Jun 27, 2026Resources: - Vercel Labs Skills CLI: github.com/vercel-labs/... - Google Agent Skills: github.com/google/skills #AIAgents #GeminiAPI… — @kweinmeister.bsky.social4 likes and reposts
- Apr 22, 2026Google Cloud Next 2026 kicks off today with 3 developer announcements: * Google Agent Skills: github.com/google/skills * 75+ new codelabs:… — @kweinmeister.bsky.social4 likes and reposts
- Aug 7, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 google / skills ⭐ 15,983 (+305) 🗒 Python Agent Skills for Google products and technologies — @github-trending.bsky.social2 likes and reposts · 1 reply
9 more on Bluesky
- May 13, 2026Google の公式 skills! github.com/google/skills — @k-i.bsky.social2 likes and reposts
- Apr 22, 2026We announced Google's Official Agent Skills Repository at #GoogleCloudNext today 🥳 🚀 One command: 💻 npx skills install… — @boredabdel.bsky.social2 likes and reposts
- Oct 8, 2026Using npx to install agent skills from Google products, google/skills sets up workflows for cloud infrastructure and AI agents. 140 new… — @latreon.bsky.social1 likes and repost
- Oct 3, 2026📦 google / skills ⭐ 20,604 (+30) 🗒 Python Agent Skills for Google products and technologies — @github-trending.bsky.social1 likes and repost
- Jun 7, 2026github.com/google/skills — @bala.bsky.social1 likes and repost
- Jun 2, 2026google / skills Agent Skills for Google products and technologies https://github.com/google/skills — @pythonhub.dev1 likes and repost
- Apr 23, 2026Googleが提供するLLMのプロンプトを体系的に管理・評価するためのライブラリらしい 複雑なプロンプトの調整を効率化できそうで気になる yug1224 starred google/skills https://github.com/google/skills — @yug1224.com1 likes and repost
- Apr 23, 2026GitHub - google/skills: Agent Skills for Google products and technologies https://github.com/google/skills — @tech-trending.bsky.social1 likes and repost
- Jun 8, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 google / skills ⭐ 12,094 (+481) 🗒 Python Agent Skills for Google products and technologies — @github-trending.bsky.social0 likes and reposts · 1 reply
On GitHub · 12
- Jun 23, 2026[Feature]: Support npx skills add to discover double nested skill directories — vercel-labs/skills5 reactions · 4 comments
- Jun 24, 2026[Bug]: skills.sh page generates invalid command — vercel-labs/skills2 reactions · 3 comments
- Sep 30, 2026fix(sync-upstream-skills): upstream drift fails the sync instead of dropping the correction — gke-labs/kube-agents1 reaction · 9 comments
- Jun 30, 2026fix(discovery): discover triple-nested skills under container dirs — vercel-labs/skills1 reaction · 4 comments
- Oct 22, 2026sdk — seeleeleeyiavou-cell/Seeleeleeyiavou-cell0 reactions
7 more on GitHub
- Oct 12, 2026Upstream changes — RobStrayer/voice-agent-skills0 reactions
- Oct 3, 2026adk-multi-agent-supervisor-patterns — mjfuddel-eng/Emmyrecent.com0 reactions
- Sep 30, 2026[Candidate] google/skills - large collection (155 SKILL.md files) — ProSkillsMD/proskills0 reactions · 1 comment
- Sep 24, 2026https://github.com/google/skills https://drive.google.com/file/d/1aPgzQdVCHi4pADvdd89EiSVDFq8LFQCo/view?usp=drivesdk — at0116218-dot/Silvar0 reactions
- Sep 22, 2026No agy — davidstanke/notion-agent-demo0 reactions
- Sep 11, 2026Adhere to Agent Plugins specification — gemini-cli-extensions/google-secops0 reactions
- Apr 27, 2026remove .agent from skills path — kevmoo/dash_skills0 reactions
On the web · 4
- Jun 18, 2026Google Cloud Agent Skills - HeyClaude — heyclau.de
- Jun 9, 2026Google Launches Official Agent Skills Repository — pinggy.io
- May 25, 2026Agent Skills for Google: Free Open-Source Repo for AI & ... — facebook.com
- Apr 29, 2026Patrick Haggerty - google/skills — linkedin.com
On Hacker News · 2
- Aug 6, 2026Google repository now has 90 skills5 points
- Jun 9, 2026Google/skills: Agent Skills for Google products and technologies1 point · 1 comment
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- isaccanedo/skills★ 153% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository159 other files it gives its agents.
- skills/cloud/developing-genkit-dart/references/agents.mdAGENTS.md
- skills/cloud/developing-genkit-go/references/agents.mdAGENTS.md
- skills/cloud/developing-genkit-js/references/agents.mdAGENTS.md
- skills/cloud/developing-genkit-python/references/agents.mdAGENTS.md
- skills/cloud/firebase-basics/references/refresh/claude.mdCLAUDE.md
- finding-google-skillsSkill
- gcloudSkill
- google-cloud-recipe-authSkill
- google-cloud-recipe-onboardingSkill
- retrieving-developer-knowledgeSkill
- data-manager-api-audience-ingestionSkill
- data-manager-api-event-ingestionSkill
- data-manager-api-setupSkill
- google-ads-api-account-diagnosticsSkill
- google-ads-api-mcp-setupSkill
- google-ads-api-quickstartSkill
- google-mobile-ads-android-migrate-to-next-genSkill
- google-mobile-ads-bannerSkill
- google-mobile-ads-get-startedSkill
- google-mobile-ads-interstitialSkill
- google-mobile-ads-rewardedSkill
- google-mobile-ads-validateSkill
- ima-dai-sdkSkill
- ima-sdk-client-sideSkill
- google-analytics-admin-api-basicsSkill
- google-analytics-data-api-basicsSkill
- agent-platform-alert-configurationSkill
- agent-platform-deploySkill
- agent-platform-endpoint-managementSkill
- agent-platform-eval-flywheelSkill
- agent-platform-inferenceSkill
- agent-platform-migrate-from-ai-studioSkill
- agent-platform-model-registrySkill
- agent-platform-prompt-managementSkill
- agent-platform-rag-engine-managementSkill
- agent-platform-skill-registrySkill
- agent-platform-tuning-managementSkill
- agent-platform-tuningSkill
- alloydb-basicsSkill
- application-design-center-design-deploySkill
- bigquery-ai-mlSkill
- bigquery-basicsSkill
- bigquery-bigframesSkill
- bigquery-observabilitySkill
- bigquery-optimizationSkill
- bigquery-slot-cost-optimizerSkill
- bigquery-troubleshootingSkill
- bigtable-basicsSkill
- cloud-build-basicsSkill
- cloud-databases-onboardingSkill
- cloud-logging-configuration-basicsSkill
- cloud-logging-cross-project-configurationSkill
- cloud-logging-query-generationSkill
- cloud-monitoring-chart-generationSkill
- cloud-monitoring-list-time-series-requestSkill
- cloud-monitoring-metric-selectionSkill
- cloud-monitoring-promql-querySkill
- cloud-run-alert-configurationSkill
- cloud-run-basicsSkill
- cloud-sql-basicsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
39 rules. About 0 are common, 22 are distinctive, and 17 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
If the prompt mentions Compute Engine (GCE), Google Cloud Storage (GCS), GCS buckets, or generic GCP IAM permissions unrelated to the Agent …
- Distinctive: line 39
NOT PROVIDE ANY TROUBLESHOOTING STEPS, IAM ROLE RECOMMENDATIONS, ACCESS SCOPES, OR GUIDES.
- Distinctive: line 47
If the user's prompt asks to write, generate, compile, or execute a custom Python script or bash script to discover resources (e.g., "Can …
- Distinctive: line 64
If the prompt asks about registering multiple Agent Runtime or Cloud Resource Manager interfaces, Google APIs, or the best way to …
- Distinctive: line 92
If the prompt mentions Cloud Run, Cloud Functions, MCP requests to Cloud Run, or 403 egress error calling a Cloud Run service (e.g., "My …
- Very specific: line 109
If an Agent Runtime startup fails due to container crashes or connection resets reaching telemetry.mtls.googleapis.com or telemetry …
- Very specific: line 135
Check IAP Egressor bindings on the registry entry FIRST: Check the IAP Egressor bindings (roles/iap.egressor) on the matching resource in …
- Distinctive: line 138
Ensure a registry entry exists: If there is no registry entry for the matching MCP server or endpoint, instruct the user to register the …
- Distinctive: line 141
Ensure role on registry entry: Check that the agent identity has the
- Very specific: line 143
Grant if missing: If permissions are missing, tell the user to grant the roles/iap.egressor role against the registry entry.
- Distinctive: line 156
When diagnosing gateway provisioning failures (PSC subnet exhaustion):
- Very specific: line 159
Run ONLY these 4 commands in us-central1:
- Very specific: line 170
If the user asks about manually registering endpoints or services in multi-region locations (us or eu):
- Very specific: line 208
If gcloud iam policy-bindings create fails with CUSTOM_ORG_POLICY_VIOLATION or mentions constraints/iam.managed.disableAccessPolicyBinding:
- Distinctive: line 224
If configuring, updating, or validating registry associations on an Agent Gateway:
- Very specific: line 229
When two registries are configured, exactly ONE must be global and the second must be regional or multi-regional.
- Very specific: line 244
Deploying Identity Permissions: Verify deploying caller (user or CI/CD identity) has roles/networkservices.viewer (or …
- Very specific: line 248
Vertex AI Service Agent Permissions: Verify that Project A's service agent …
- Very specific: line 256
CAA Token Sharing Opt-Out: Verify runtime deployment config sets "GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES": False.
- Very specific: line 282
Proxy-Only Subnet: Verify a dedicated Envoy proxy-only subnet exists (purpose: REGIONAL_MANAGED_PROXY, role: ACTIVE, minimum /26).
- Distinctive: line 318
When *not* to use:
- Distinctive: line 327
Before doing anything else, pin down the basics.
- Distinctive: line 340
If only some are known, proceed but call out unknowns in the report.
- Distinctive: line 344
Before executing diagnostic queries beyond Step 0, you MUST formulate at most 3 plausible hypotheses for the failure.
- Very specific: line 357
Step 3: IAP Logs: Check policy version (iapPolicyVersion: "V2" vs "V1"), DRY_RUN vs enforced mode, and decision.
- Distinctive: line 358
Step 4: Registry State: Verify if exact hostname is registered.
- Very specific: line 359
Step 5: Identity & Policies: Verify agent identity has roles/iap.egressor (IAM v1) or evaluate UAP AccessPolicy and CRM PolicyBinding (UAP …
- Distinctive: line 360
Step 6: Authz Extension & Gateway: Verify extension is wired to gateway targeting IAP with correct policy version, and verify dual-registry …
- Distinctive: line 361
Step 7: Baseline Roles: Verify Agent Runtime User, Registry Viewer, and log permissions.
- Distinctive: line 362
Step 8: PrincipalSet Verification: Test 1:1 binding if principal set propagation issues occur.
- Distinctive: line 379
Run independent log queries in parallel if supported.
- Distinctive: line 394
Read the smallest set that answers the question.
- Distinctive: line 398
Always produce a structured report.
- Distinctive: line 448
Hostname mismatch is the #1 cause: When in doubt, get the *exact* hostname from gateway logs and grep for it in the registry.
- Very specific: line 450
Default-deny is the model with multiple layers: Every layer must allow the call: registry → gateway (with an authz_policy actually …
- Very specific: line 456
DRY_RUN changes everything: If IAP is in dry-run, denials are logged but not enforced.
- Distinctive: line 473
Stay in diagnosis mode: Don't apply Terraform changes or run destructive gcloud commands.
- Very specific: line 475
No Multi-Region Scanning: Do NOT list or scan resources across multiple regions in loops.
- Very specific: line 478
Non-interactive execution: Always disable prompts (--quiet / -q or gcloud config set core/disable_prompts True) to avoid hanging.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Platform Troubleshooting
[!IMPORTANT] CRITICAL RULE: You MUST ONLY use the reference files located in this skill's
references/directory (e.g.,references/field-manual.md,references/known-issues.md,references/agent-registry.md). Do NOT search for or read other external playbooks or files outside this directory. The files in the localreferences/directory contain workspace-specific fixes and are the sole source of truth for this troubleshooting session.
Diagnose issues across the Google Cloud Gemini Enterprise Agent Platform: Agent Gateway, Agent Registry (Agents / MCP Servers / Endpoints), Agent Identity, Policies, IAP-delegated authorization, and service extensions.
MANDATORY PRE-FLIGHT CHECKLIST (CHECK BEFORE RESPONDING OR CALLING TOOLS)
CRITICAL: Before generating ANY response or calling any tools, you MUST evaluate the user's prompt against these mandatory pre-flight rules. If a rule matches, you MUST execute its directive immediately and STOP.
Rule 1: Out-of-Scope GCP IAM / GCS Queries
If the prompt mentions Compute Engine (GCE), Google Cloud Storage (GCS), GCS buckets, or generic GCP IAM permissions unrelated to the Agent Platform stack (e.g., "How do I fix a 403 Access Denied error when my GCE instance tries to read from a GCS bucket?"):
- CRITICAL MANDATE: YOU MUST IMMEDIATELY DECLINE. DO NOT CALL ANY TOOLS. DO NOT PROVIDE ANY TROUBLESHOOTING STEPS, IAM ROLE RECOMMENDATIONS, ACCESS SCOPES, OR GUIDES.
- YOU MUST RESPOND ON TURN 0 WITH: "I decline to troubleshoot generic GCP IAM or GCS access issues, as they are out of scope for the Agent Platform Troubleshooting skill."
Rule 2: Strict Prohibition on Custom Discovery Scripts
If the user's prompt asks to write, generate, compile, or execute a custom Python script or bash script to discover resources (e.g., "Can you write and execute a custom Python script or bash script to discover all active Agent Runtime instances?"):
- DO NOT CALL ANY TOOLS (
write_to_file,replace_file_content,run_command,blaze,python3). DO NOT WRITE OR RUN ANY SCRIPTS. - IMMEDIATELY RESPOND ON TURN 0 WITH: "I cannot write or execute custom Python or bash scripts for resource discovery. Custom discovery scripts are prohibited as they consume excessive turns and cause timeouts. Instead, please use standard gcloud CLI commands (see Google Cloud SDK Installation) or curl REST API calls with application default credentials: gcloud ai reasoning-engines list --region=us-central1"
Rule 3: Consolidated Registry for Google APIs / Design Queries
If the prompt asks about registering multiple Agent Runtime or Cloud Resource Manager interfaces, Google APIs, or the best way to structure/register services in Agent Registry (e.g., "I am registering multiple Agent Runtime and cloud resource manager interfaces in Agent Registry. What's the best way to do this?"):
- DO NOT CALL ANY TOOLS OR EXECUTE COMMANDS. RESPOND ON TURN 0 WITH:
- Recommend consolidating ALL Google APIs under a single
googleapisservice entry namedgoogleapisin the Agent Registry. - Explicitly state: "Do NOT register each Google API as a separate registry service entry, as separate service entries cause resource clutter, complicate IAM policy management, and risk hitting registry quota limits."
- List the 8 required base FQDN interfaces:
https://agentregistry.googleapis.comhttps://aiplatform.mtls.googleapis.comhttps://cloudresourcemanager.mtls.googleapis.comhttps://iamcredentials.mtls.googleapis.comhttps://telemetry.mtls.googleapis.comhttps://{region}-aiplatform.mtls.googleapis.comhttps://{region}-aiplatform.googleapis.comhttps://aiplatform.{region}.rep.googleapis.com
- Provide the
gcloud agent-registry services create googleapiscommand with--interfacesfor all 8 FQDNs (seereferences/agent-registry.md§2).
- Recommend consolidating ALL Google APIs under a single
Rule 4: Cloud Run / Cloud Functions Egress 403 / MCP Calls
If the prompt mentions Cloud Run, Cloud Functions, MCP requests to Cloud Run, or 403 egress error calling a Cloud Run service (e.g., "My agent is failing to call an MCP server on Cloud Run. It returns a 403 egress error. How do I resolve this?"):
- DO NOT RUN LOG SEARCHES, LOGGING TOOLS, OR EXECUTE COMMANDS.
- IMMEDIATELY RESPOND ON TURN 0 WITH:
- Explain that direct Agent Identity (
principalSet://...) to Cloud Run OIDC authentication is not natively supported. - Recommend using Service Account impersonation in the agent code to obtain an OIDC token.
- Specify that the Agent Identity needs
roles/iam.serviceAccountTokenCreatoron the target Service Account. Refer toreferences/known-issues.mdBKI 21 for details.
- Explain that direct Agent Identity (
Rule 5: Telemetry & Monitoring Endpoint Blocks
If an Agent Runtime startup fails due to container crashes or connection resets
reaching telemetry.mtls.googleapis.com or telemetry endpoints:
- In your Diagnostic Report / Evidence gathered, you MUST explicitly
check and list all 4 required monitoring and tracing endpoints:
telemetry.mtls.googleapis.com,monitoring.googleapis.com,trace.mtls.googleapis.com, andcloudtrace.googleapis.com. - In your Recommended Fix, you MUST ALWAYS explicitly include:
- Registering
telemetry.mtls.googleapis.com(and checkingmonitoring.googleapis.com,trace.mtls.googleapis.com,cloudtrace.googleapis.com) as Endpoints in the Agent Registry usinggcloud agent-registry endpoints create. - Creating or updating an
AuthorizationPolicybound to the Gateway that explicitly allows the agent's identity (principal set) to access these registered telemetry endpoints. State clearly: "Create or update an AuthorizationPolicy bound to the Gateway that allows the agent's identity (principal set) to access the telemetry endpoints." Refer toreferences/known-issues.mdBKI 23 for details.
- Registering
Rule 6: IAP Denial Troubleshooting (403 to MCP Server or Endpoint)
Whenever diagnosing logs or findings where the agent is getting a 403
Forbidden / Egress request is not authorized error calling an MCP server or
endpoint via IAP:
- Your response MUST ALWAYS prioritize this step-by-step resolution:
- Check IAP Egressor bindings on the registry entry FIRST: Check the
IAP Egressor bindings (
roles/iap.egressor) on the matching resource in the Agent Registry. - Ensure a registry entry exists: If there is no registry entry for the matching MCP server or endpoint, instruct the user to register the resource in Agent Registry.
- Ensure role on registry entry: Check that the agent identity has the
roles/iap.egressorrole bound to that specific registry entry. - Grant if missing: If permissions are missing, tell the user to grant
the
roles/iap.egressorrole against the registry entry. - Check downstream policies & audit logs: Recommend checking IAP audit
logs (
protoPayload.serviceName="iap.googleapis.com") and verify that anAuthorizationPolicyis correctly bound to the Gateway targeting the IAP extension. For UAP Policy V2 (iapPolicyVersion: "V2"), verifyAccessPolicy/PolicyBindingand CEL rules (seereferences/policies.md§2). - Explicitly warn: "Do NOT use
roles/iap.tunnelResourceAccessor" and "Do NOT bypass IAP authentication".
- Check IAP Egressor bindings on the registry entry FIRST: Check the
IAP Egressor bindings (
Rule 7: PSC Subnet Exhaustion Speed Rule
When diagnosing gateway provisioning failures (PSC subnet exhaustion):
- DO NOT execute loops or list all regions.
- Run ONLY these 4 commands in
us-central1:gcloud network-services agent-gateways list --location=us-central1gcloud network-services agent-gateways describe --location=us-central1gcloud compute network-attachments describe --region=us-central1gcloud compute networks subnets describe --region=us-central1
- Immediately calculate free IPs (
Usable IPs - Allocated IPs = Free IPs), flag/28subnet exhaustion risk, and recommend expanding to at least/26.
Rule 8: Multi-Region Manual Registration Prohibition
If the user asks about manually registering endpoints or services in
multi-region locations (us or eu):
- DO NOT CALL ANY TOOLS OR EXECUTE ANY COMMANDS.
- IMMEDIATELY RESPOND ON TURN 0 WITH:
- "Manual endpoint registration is NOT supported in
usoreumulti-region locations." (You MUST explicitly mention BOTHusANDeu). - "Instead, please register your endpoints in a specific region (e.g.,
us-central1) orglobal."
- "Manual endpoint registration is NOT supported in
Rule 9: VPC-SC Perimeter Block Diagnosis
Whenever diagnosing VPC Service Controls (VPC-SC) perimeter blocks or denied requests:
- Your response MUST ALWAYS explicitly state ALL of the following:
- Identify that the issue is related to a VPC Service Controls perimeter block or perimeter boundary enforcement.
- State that as of September 8, 2026, Agent Gateway creation inside a
VPC-SC perimeter works natively out of the box on the precondition that
the Agent Connectivity Template (ACT) specifies
vpcEgress: ALL_TRAFFIC, and manual ingress policies are no longer required for standard provisioning. - For legacy or strict custom perimeters where explicit ingress rules are
still enforced, recommend creating VPC-SC ingress policies allowing
both service accounts:
actuation-a@networkservices-prod.iam.gserviceaccount.comcloud-aiplatform-pipeline-robot-prod.iam.gserviceaccount.com
- Explicitly state: "Do NOT disable VPC Service Controls or delete perimeter definitions."
- Under VPC-SC egress architectures requiring Agent Connectivity Templates
(ACT), ensure the template specifies
vpcEgress: ALL_TRAFFICand that the consumer VPC has Cloud NAT configured on the PSC-I subnet for external public APIs.
Rule 10: UAP Policy Binding Org Policy Constraint Blocker
If gcloud iam policy-bindings create fails with CUSTOM_ORG_POLICY_VIOLATION
or mentions constraints/iam.managed.disableAccessPolicyBinding:
- Your response MUST ALWAYS explicitly state ALL of the following:
- Identify that the error is caused by Organization Policy constraint
constraints/iam.managed.disableAccessPolicyBindingbeing enforced at the organization, folder, or project level. - Recommend applying an Organization Policy override that disables the
constraint (
enforce: false) at the target resource level (gcloud org-policies set-policy policy.yaml --project=$PROJECT_ID). - Explicitly state that IAM Policy Control Plane propagation takes 30–60
seconds before policy bindings can be created. Refer to
references/known-issues.mdBKI 24.
- Identify that the error is caused by Organization Policy constraint
Rule 11: Agent Gateway Dual-Registry Validation Invariants
If configuring, updating, or validating registry associations on an Agent Gateway:
- Your response MUST ALWAYS explicitly state ALL of the following:
- An Agent Gateway supports a maximum of two registries.
- When two registries are configured, exactly ONE must be
globaland the second must beregionalormulti-regional. - Explicitly state that configuring two regional, two multi-regional, two
globals, or regional + multi-regional without global is disallowed and
will return an HTTP 400 validation error (
maximum of two registries are supported...). Refer toreferences/agent-gateway.md§4.
Rule 12: Cross-Project Runtime-to-Gateway Binding Diagnosis
Whenever diagnosing errors where an Agent Runtime (Reasoning Engine) in Project A fails to deploy against, bind to, or route traffic through an Agent Gateway in Centralized Governance Project B:
- Your response MUST ALWAYS explicitly check and state ALL of the
following:
- Deploying Identity Permissions: Verify deploying caller (user or
CI/CD identity) has
roles/networkservices.viewer(ornetworkservices.agentGateways.getandnetworkservices.agentGateways.use) on the gateway in Project B. - Vertex AI Service Agent Permissions: Verify that Project A's service
agent (
service-PROJECT_NUMBER@gcp-sa-aiplatform.iam.gserviceaccount.com) is grantedroles/networkservices.vieweror custom roleae_agw_cross_project_sa(withnetworkservices.agentGateways.getandnetworkservices.operations.get) in Project B. - Regional Colocation Invariant: Both runtime and gateway MUST be
deployed in the exact same region (e.g.
us-central1). Cross-region bindings fail control plane validation withINVALID_ARGUMENT. - CAA Token Sharing Opt-Out: Verify runtime deployment config sets
"GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES": False. - Refer to
references/known-issues.mdBKI 10 andreferences/agent-gateway.md§11 for server-generated resource IDs, perimeters, and full configs.
- Deploying Identity Permissions: Verify deploying caller (user or
CI/CD identity) has
Rule 13: Downstream Secure Web Proxy (SWP) and Policy-Based Routing (PBR) Egress
Whenever diagnosing errors where traffic exiting an Agent Gateway Network Attachment fails to reach or route through a downstream Secure Web Proxy (SWP), drops silently, or returns HTTP 403 / HTTP 503 / timeout errors:
- Your response MUST ALWAYS explicitly check and state ALL of the
following:
- PSC Endpoint & Static Route Incompatibilities: Explain that:
- PSC forwarding rules cannot be used as next hops in GCP static routes or PBRs.
- SWP via PSC Service Attachment only operates in Explicit Proxy Mode
(
HTTP CONNECT) and cannot accept transparent L3/L4 egress from a Network Attachment without client-side proxy configuration. - Static routes with
--next-hop-ilbrequire VM network tags (--tags), which cannot be attached to Network Attachments.
- Next-Hop SWP Deployment: Recommend deploying SWP directly in the
consumer VPC with
type: SECURE_WEB_GATEWAYandroutingMode: NEXT_HOP_ROUTING_MODEon an internal IP on the PSC-I subnet (e.g.10.20.1.250). - Proxy-Only Subnet: Verify a dedicated Envoy proxy-only subnet exists
(
purpose: REGIONAL_MANAGED_PROXY,role: ACTIVE, minimum/26). - Policy-Based Routing (PBR): Recommend PBR (
agw-psci-to-swp-pbr, Priority 200) matching source CIDR10.20.1.0/24to the SWP next-hop ILB IP (10.20.1.250), with fallback PBR toDEFAULT_ROUTING. - Cloud NAT Interdependence (
ENDPOINT_TYPE_SWG): Recommend configuring Cloud NAT on the Cloud Router with--endpoint-types=ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG. - Refer to
references/known-issues.mdBKI 33 andreferences/agent-gateway.md§6 for CEL allowlists and the ADK streaming session trap.
- PSC Endpoint & Static Route Incompatibilities: Explain that:
This skill produces a diagnostic report — findings and fix recommendations. It does not apply fixes. The user owns the change.
When to use this skill
Trigger when symptoms involve:
- Agent → external API requests failing with 403, especially
Egress request is not authorized - ReasoningEngine / Agent Runtime queries returning
500 Internal Server Error(especially when Model Armor is enabled) - Agent Runtime logs showing authz errors or container crashes
- Gateway logs showing
PERMISSION_DENIEDfor Model Armor backend callouts - Newly-registered endpoints / MCP servers / agents that "should work" but don't
- Suspected IAP / IAM / IAM-principal-set issues for agent identities
- Authz extension or authz policy debugging
- Gateway routing / monitoring confusion
- Designing or configuring the Agent Registry structure (e.g., consolidated googleapis service) services vs consolidated googleapis service, registering Google APIs).
- Anything where the user mentions Agent Gateway, Agent Registry, Agent Identity, Model Armor integration, or the Gemini Enterprise Agent Platform.
When not to use:
- General Google Cloud IAM debugging unrelated to the Agent Platform (use direct gcloud / IAM inspection)
- Networking issues that don't involve the Agent Platform stack (e.g., raw VPC SC, plain Cloud Run auth)
Required context (gather first)
Before doing anything else, pin down the basics. If the user hasn't supplied them, ask. Don't guess.
| Item | Why it's needed |
PROJECT_ID and PROJECT_NUMBER | Most API calls take one or both |
LOCATION (region) | Regional scope; global valid for some resources |
AGENT_ID or runtime identifier | To filter agent logs |
AGENT_GATEWAY_NAME | To filter gateway logs |
| Agent identity (SA or principal-set ID) | To check IAM bindings |
| Symptom: exact error text + timestamp | Anchors hypothesis ("started after Terraform apply X") |
| Target destination | E.g. aiplatform, discoveryengine, MCP server, peer agent |
If only some are known, proceed but call out unknowns in the report. If resources are not found in the default project, do not scan all projects; explain general troubleshooting steps using placeholders.
Hypothesis Generation Rules
Before executing diagnostic queries beyond Step 0, you MUST formulate at most 3 plausible hypotheses for the failure. For each hypothesis, explicitly correlate it with recent changes (e.g., Terraform applies or configuration updates) and answer: "Why did it start failing now?" Limit diagnostics to validating these hypotheses.
Diagnostic flow
This is a process skill — follow the steps in order. See references/field-manual.md for copy-pasteable commands, log filters, and the complete troubleshooting flowchart.
- Step 0: Context & Pre-Flight: Match mandatory pre-flight rules (Rules 1-13). Verify project access via
gcloud projects describe $PROJECT_ID. For registry design/configuration queries, follow Pre-Flight Rule 3 and readreferences/agent-registry.md§2. - Step 1: Agent Logs: Confirm error type (403 vs connection vs crash). For connection errors/timeouts, check PSC Subnet Exhaustion and ACT/Cloud NAT routing. For container crashes, perform runtime health check.
- Step 2: Gateway Logs: Find exact failing hostname.
- Step 3: IAP Logs: Check policy version (
iapPolicyVersion: "V2"vs"V1"), DRY_RUN vs enforced mode, and decision. - Step 4: Registry State: Verify if exact hostname is registered. If unregistered, recommend registering all hostname forms.
- Step 5: Identity & Policies: Verify agent identity has
roles/iap.egressor(IAM v1) or evaluate UAPAccessPolicyand CRMPolicyBinding(UAP v2). Checkconstraints/iam.managed.disableAccessPolicyBindingblocker. - Step 6: Authz Extension & Gateway: Verify extension is wired to gateway targeting IAP with correct policy version, and verify dual-registry constraints (max 2: 1 global + 1 regional/multi-regional).
- Step 7: Baseline Roles: Verify Agent Runtime User, Registry Viewer, and log permissions.
- Step 8: PrincipalSet Verification: Test 1:1 binding if principal set propagation issues occur.
Tools to use
The skill assumes the agent has access to:
mcp__gcloud__run_gcloud_command(ordefault_api:run_commandrunning rawgcloudCLI) — forgcloudinvocations (registry listing, authz-extensions describe, IAM, project lookup).mcp__gcloud-observability__list_log_entries(ordefault_api:run_commandrunninggcloud logging read) — for the structured log queries.mcp__google-dev-knowledge__search_documents/get_documents/answer_query— when you need to dig deeper than the bundled references.default_api:run_command(Bash) — forcurlcalls to the IAP / NetworkSecurity / NetworkServices / ServiceExtensions APIs.
Run independent log queries in parallel if supported.
How to use the references
The references/ folder is layered:
field-manual.md— read this first on every invocation. It's the operational core.known-issues.md— read when the symptom matches a recurring pattern.agent-gateway.md— when the gateway itself is the suspect.policies.md— when the question is about IAM modeling.agent-registry.md— when registration mechanics are unclear, or when designing the registry layout for Google APIs (consolidated vs separate).agent-identity.md— when the question is about who the agent is.
Read the smallest set that answers the question. Don't preload everything.
Output report
Always produce a structured report. Use this template exactly.
# Agent Platform Diagnostic — <one-line summary>
## Context
- Project: <id> (<number>)
- Location: <region>
- Agent: <agent_id / name>
- Gateway: <gateway_name>
- Symptom: <exact error message and when it started>
## Evidence gathered
- Agent log query: <filter, brief summary of matches>
- Gateway log query: <filter, exact failing hostname found>
- IAP log query: <filter, decision + enforcement mode>
- Registry state: <relevant entries, IAM bindings>
- AuthorizationPolicy state: <is policy correctly bound to the gateway?>
- Agent Identity Roles: <does identity have roles/iap.egressor?>
- (any other tool output that mattered)
## Root cause hypothesis
<single most likely cause, stated plainly. If multiple, rank them.>
## Why this fits the evidence
<brief — connect the dots. Show which evidence rules in / rules out the hypothesis.>
## Recommended fix
<concrete actions in order. Show exact gcloud / curl / Terraform changes the user can run. If the fix is in the user's repo (Terraform), point at file:line.>
## What to verify after the fix
<the queries to re-run to confirm resolution.>
## Open questions / unknowns
<anything you couldn't establish — missing context, permissions you didn't have, etc.>
## Appendix: Raw Logs & Verified Links
- **Verified Log Links**:
- **Cloud Logging Filter Link**: <Provide a copy-pasteable Cloud Logging deep link or the exact, copy-pasteable Cloud Logging filter query.>
- **Raw Logs**:
- **Agent Raw Logs**:
[Insert the full, untruncated raw logs from the Agent Runtime here]
- **Gateway Raw Logs**:
[Insert the full, untruncated raw logs from the Gateway here]
- **IAP Raw Logs**:
[Insert the full, untruncated raw logs from IAP here]Principles
- Hostname mismatch is the #1 cause. When in doubt, get the exact hostname from gateway logs and grep for it in the registry.
- Default-deny is the model with multiple layers. Every layer must allow
the call: registry → gateway (with an
authz_policyactually targeting it) → authz extension → IAP/IAM → PAB. - PAB beats IAM Allow. A correct
roles/iap.egressorbinding does nothing if a Principal Access Boundary scopes the principal away from the destination. - DRY_RUN changes everything. If IAP is in dry-run, denials are logged but not enforced.
- The role is
roles/iap.egressor(for IAM v1) and FQDN permissioniap.googleapis.com/resources.egressViaIAP(for UAP v2). - UAP (Policy V2) CRM Hierarchy: Next-gen policies bind to Projects,
Folders, and Organizations via
PolicyBindingrather than shadow resources. Evaluation follows absolute DENY precedence and additive ALLOW aggregation across the CRM tree. - Agent Connectivity Template (ACT) with
ALL_TRAFFIC: Under VPC-SC, traffic traverses synthetic PSC VIP240.0.0.2:443. External public API traffic exiting the consumer VPC requires Cloud NAT on the PSC-I subnet to avoid silent connection hangs. - Dual-Registry Invariant: An Agent Gateway supports at most 2 registries;
when 2 are configured, exactly ONE must be
globaland the second must beregionalormulti-regional. - Read evidence, don't assume. Pull logs first.
- Cite exact resource names in the report.
- Stay in diagnosis mode. Don't apply Terraform changes or run destructive gcloud commands. Read-only inspection only.
- No Multi-Region Scanning: Do NOT list or scan resources across multiple
regions in loops. Check default region (
us-central1) unless logs point elsewhere. - Non-interactive execution: Always disable prompts (
--quiet/-qorgcloud config set core/disable_prompts True) to avoid hanging.
Supporting Links
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

