Skip to main content
BuildOfficialCertifiedAI reviewed Aug 27, 2026

google-cloud-solution-multi-agent-security

Designs, deploys, and secures Google Cloud Agent Gateway solutions. Use when the user needs to configure multi-agent security, ingress (CLIENT_TO_AGENT), or egress (AGENT_TO_ANYWHERE) patterns involving Model Armor, IAP, and Agent Registry. Don't use for general Cloud Load Balancing or basic VPC setup not related to Agent Gateways.

v1.0.1New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install google-cloud-skills-google-cloud-solution-multi-agent-security
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/google-cloud-skills-google-cloud-solution-multi-agent-security/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

Agent Gateway multi-agent security

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.

Critical Enforcement Rules & Rationale

  • Gcloud Release Tracks: Always use the exact release tracks specified in
    the commands (e.g., gcloud beta network-services agent-gateways). Omitting
    these prefixes causes commands to fail because Agent Gateway features are
    located in specialized, non-default namespaces.
  • API Enablement: Include modelarmor.googleapis.com in the API
    enablement list when setting up guardrails. Excluding it prevents Model
    Armor policies and filters from successfully attaching to the Gateway.
  • Egress Verification: Egress policy verification requires using the
    Python script
    (scripts/verify_egress_policies.py),
    not curl. Egress gateways rely on runtime SDK lifecycle handling and JWT
    context that a standard curl command cannot simulate correctly.
  • Model Armor Keys: In model-armor-config.yaml, always include both
    piAndJailbreakFilterSettings and sdpFilterSettings (filterEnforcement: ENFORCE). Invalid or missing filters cause deployment validation failures
    or lead to silent bypasses of the guardrails.
  • Subnet Private Access: Any subnet hosting a Private Service Connect
    network attachment for Egress Gateways must have private_ip_google_access = true enabled in Terraform. Disabling this blocks connectivity to
    Google-managed endpoints, causing total routing failures for agents.
  • Direct Delivery: Immediately provide the requested architecture,
    configuration files, CLI commands, scripts, and diagrams in full. Do not
    stop at a planning phase, do not generate a plan artifact, and do not ask
    for user confirmation before delivering outputs.
  • No Infrastructure Execution: Do not attempt to run deployment or
    verification commands (such as gcloud, kubectl, terraform, or curl)
    against real cloud resources during design. You are generating plan
    configurations, not executing them.

[!IMPORTANT] Just-In-Time (JIT) Resource Loading Protocol: Inspect
template files in assets/ and executable scripts in
scripts/ using view_file as needed for extended configurations,
deployment scripts, and test suites.


Quick Reference: Required Filenames

Always generate files with these exact names when requested:

  1. agw-ingress-config.yaml
    (assets/agw-ingress-config.yaml)
  2. agw-egress-config.yaml
    (assets/agw-egress-config.yaml)
  3. agw-authz-extension.yaml
    (assets/agw-authz-extension.yaml)
  4. agw-authz-policy.yaml
    (assets/agw-authz-policy.yaml)
  5. model-armor-config.yaml
    (assets/model-armor-config.yaml)
  6. sgp-policy.yaml (assets/sgp-policy.yaml)
  7. iap-policy.json (assets/iap-policy.json)
  8. model-armor-payload.json
    (assets/model-armor-payload.json)

1. Dual Ingress & Egress Architecture Design (dual_ingress_egress_architecture_design)

  • Ingress Pattern: CLIENT_TO_AGENT fronted by Ingress Control Plane
    (Agent Gateway, Model Armor).

  • Egress Pattern: AGENT_TO_ANYWHERE utilizing Egress Control Plane
    (Agent Gateway, roles/iap.egressor CEL policies, Cloud DNS) and Egress
    Data Plane (PSC Interface, Cloud Run, PSC Google APIs Global Endpoint),
    coordinated via Agent Registry & Agent Engine runtime.

  • Mermaid Diagram:

    graph TD
        Client["External Clients"] -->|HTTPS / MCP| GLB["Global Load Balancer"]
        GLB --> Ingress["Ingress Agent Gateway (CLIENT_TO_AGENT)"]
        Ingress --> MA["Model Armor (CONTENT_AUTHZ)"]
        MA --> Agent["Agent Engine Agents (BillingAgent, SupportAgent, FraudAgent)"]
        Agent --> Egress["Egress Agent Gateway (AGENT_TO_ANYWHERE)"]
        Egress --> PSC["Private Service Connect Network Attachment"]
        PSC --> Tools["Private MCP Tool Backends"]
    

2. Ingress & Egress Guardrail Policy Config (ingress_and_egress_guardrail_policy_config)

When requested for Ingress & Egress guardrail policy configs, you MUST generate
and create all required files in the workspace:

  • agw-ingress-config.yaml
    (assets/agw-ingress-config.yaml): Declares
    governedAccessPath: CLIENT_TO_AGENT with protocols HTTP and MCP.
  • agw-egress-config.yaml
    (assets/agw-egress-config.yaml): Declares
    governedAccessPath: AGENT_TO_ANYWHERE with protocol MCP.
  • agw-authz-extension.yaml
    (assets/agw-authz-extension.yaml):
    Configures AuthzExtension service for IAP authorization.
  • agw-authz-policy.yaml
    (assets/agw-authz-policy.yaml): Configures
    AuthzPolicy action ALLOW targeting both Ingress and Egress gateways.
  • iap-policy.json (assets/iap-policy.json): Binds
    roles/iap.egressor with CEL condition checking
    iap.googleapis.com/mcp.toolName == 'get_account_balance' && iap.googleapis.com/mcp.tool.isReadOnly == true.
  • model-armor-config.yaml
    (assets/model-armor-config.yaml): Enables
    piAndJailbreakFilterSettings and sdpFilterSettings with
    filterEnforcement: ENFORCE.
  • sgp-policy.yaml (assets/sgp-policy.yaml):
    Implements Natural Language Constraints blocking transactions > $1000 and
    sanitizing PII.

3. Ingress & Egress Infrastructure Deployment (ingress_and_egress_infrastructure_deployment)

Inspect and provide the step-by-step gcloud CLI commands from
scripts/deploy_infrastructure.sh:

  1. Enable Required APIs: compute, networkservices, networksecurity,
    modelarmor, iap, agentregistry, serviceextensions, and aiplatform.
  2. Import Agent Gateways: Ingress (agw-ingress-config.yaml) and Egress
    (agw-egress-config.yaml) via gcloud alpha network-services agent-gateways import.
  3. Import Authz Extension: agw-authz-extension.yaml via gcloud beta service-extensions authz-extensions import.
  4. Import Authz Policy: agw-authz-policy.yaml via gcloud beta network-security authz-policies import.

4. Ingress & Egress Security Validation (ingress_and_egress_security_validation)

When validating security for Ingress and Egress:

  1. Ingress 403 Unauthenticated Test: Provide the copy-pasteable
    verification curl command from
    scripts/validate_ingress_unauth.sh
    sending an unauthenticated POST request to the Reasoning Engine endpoint
    expecting HTTP 403 Forbidden.
  2. Python Egress Verification Script (MUST use Python script snippet, NOT
    curl)
    : Provide the Python verification script snippet from
    scripts/verify_egress_policies.py
    sending JSON-RPC tools/call requests (get_account_balance) through the
    Egress Gateway to verify HTTP 200 for allowed tools.
  3. Model Armor Test Payload: Generate model-armor-payload.json
    (assets/model-armor-payload.json)
    containing prompt injection/jailbreak instructions.

5. Troubleshooting Ingress & Egress Failures (troubleshooting_ingress_and_egress_failures)

  • Ingress 403 (Client-to-Agent):

    • Root Cause: Unauthenticated client requests or missing/invalid OAuth
      2.0 / IAP identity tokens.
    • OAuth Configuration Steps:
      1. Configure OAuth 2.0 Client ID credentials in Google Cloud Console.
      2. Grant the client identity / service account
        roles/iap.httpsResourceAccessor permission.
      3. Exchange credentials with Google OAuth to acquire an OIDC / OAuth ID
        token.
      4. Pass the token in the Authorization: Bearer <TOKEN> header.
    • Verification Command: Provide the curl command from
      scripts/verify_ingress_auth.sh.
  • Egress 403 (Agent-to-Anywhere):

    • Root Cause: Missing roles/iap.egressor IAM bindings on the Agent
      Identity, malformed principal ID, or mismatched CEL condition on tool
      metadata.
    • Fix Command: Provide the exact gcloud command from
      scripts/fix_egress_iap.sh.

6. Hybrid VPN Connectivity & Egress Routing (hybrid_vpn_connectivity_egress_routing)

  • Terraform HCL: Refer to baseline Terraform config in
    assets/main.tf for VPC, subnets
    (private_ip_google_access = true), PSC network attachment, Cloud DNS
    private forwarding for aws.internal., and HA VPN gateway/router.
  • Egress Gateway Config (agw-egress-config.yaml): Generate configuration
    declaring governedAccessPath: AGENT_TO_ANYWHERE, pointing to the PSC
    network attachment, and referencing aws.internal. in dnsPeeringConfig
    (see assets/agw-egress-config.yaml).
  • Python SDK Deployment Script: Refer to
    scripts/hybrid_vpn_agent.py for the complete
    script initializing Vertex AI with agent_to_anywhere_config referencing
    the Egress Gateway, enabling telemetry, and deploying HybridAgent using
    types.IdentityType.AGENT_IDENTITY.

7. Private Egress GKE Internal Load Balancer (private_egress_gke_internal_load_balancer)

  • Expose GKE internal MCP tool server via an Internal Load Balancer (ILB) at
    literal IP 10.0.1.50, connecting via Agent Gateway PSC Interface + Cloud
    DNS Private zone.
  • Cloud DNS Record Mapping: Provide the command from
    scripts/create_gke_dns_record.sh mapping
    the private domain to GKE's private ILB IP 10.0.1.50.
  • Explicit TLS Warning: Agent Gateway egress does not natively trust
    self-signed certificates or private enterprise CAs
    . You must use
    publicly trusted TLS certificates signed by a trusted Certificate Authority
    (e.g., Let's Encrypt).

8. Governance Controls Model Armor SGP (governance_controls_model_armor_sgp)

When configuring dual safety layers with Model Armor on Ingress and SGP on
Egress:

  1. Model Armor Config: Generate model-armor-config.yaml
    (assets/model-armor-config.yaml) with
    piAndJailbreakFilterSettings and sdpFilterSettings (filterEnforcement: ENFORCE).
  2. Semantic Governance Policy: Generate sgp-policy.yaml
    (assets/sgp-policy.yaml) with Natural Language
    Constraints blocking transactions > $1000 and sanitizing PII.
  3. Curl PATCH Command: Provide the curl command from
    scripts/enforce_sgp_patch.sh to update
    authzExtensions with sgpEnforcementMode set to ENFORCE.

9. Multi-Agent Cloud Run Egress Routing (multi_agent_cloud_run_egress_routing)

Do NOT produce a plan artifact or stop at planning. When configuring multi-agent
Cloud Run egress routing, you MUST directly provide and generate ALL required
components:

  1. Egress Gateway Config (agw-egress-config-run.yaml): Generate
    configuration declaring governedAccessPath: AGENT_TO_ANYWHERE, PSC network
    attachment, and DNS peering for *.run.app (see
    assets/agw-egress-config-run.yaml).
  2. Register Cloud Run Services in Agent Registry: Provide the registration
    commands from
    scripts/register_cloud_run_services.sh
    registering all 3 Cloud Run services (marketing-tool-service,
    sales-tool-service, support-tool-service) in the us-east4 Agent
    Registry.
  3. iap-policy.json (Multi-Agent): Generate iap-policy.json
    (assets/iap-policy-multi-agent.json)
    containing all 3 principal:// bindings in the members list under
    roles/iap.egressor.
  4. Python SDK Deployment Script: Refer to
    scripts/multi_agent_cloud_run.py for the
    complete GenAI SDK deployment script.

10. Advanced Model Armor Filtering (advanced_model_armor_filtering)

For custom keyword matching, configure userDefinedFilterSettings (see
assets/model-armor-advanced.yaml).


11. Known Traps & Gotchas (known_traps_and_gotchas)

  • network_attachment is ForceNew: Enabling Semantic Governance
    Policies (SGP) or modifying network attachments after the initial Terraform
    apply will force-recreate the gateway resource. If not managed carefully,
    this can cause dependency deadlocks during destroy operations. Plan
    infrastructure sequencing accordingly.
  • Authz Policy Limit: An Agent Gateway allows at most 4 custom
    authorization policies
    attached concurrently. Ensure your security posture
    consolidates rules within this limit.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
google-cloud-storage-bucket-architectCreates Cloud Storage on Google Cloud (also known colloquially as GCS) buckets. Analyzes the workload (sensitive data, media hosting, ingestion, web hosting, archiving, backup, logging, analytics, AI/ML, or general-purpose), validates project-level security settings, and designs a secure-by-default, cost-effective configuration (location, storage class, uniform bucket-level access, public access prevention, soft delete, lifecycle) before creating it. Use whenever a user wants to create, make, set up, provision, or spin up a bucket, or needs object storage for an app, service, pipeline, or dataset — even a "simple" or "default" bucket, or when bucket creation is one step in a larger workflow. Outputs or executes the creation via gcloud, the JSON/REST API, Terraform, or SDK client libraries (C++, Java, Python, Go). Don't use for anything other than creating new buckets — for uploads, downloads, access changes, or reconfiguring existing buckets, use google-cloud-storage-basics.1 installsgke-cost-analysisAnswer natural language questions and perform analysis on GKE cluster and workload costs using BigQuery billing exports, cost allocation data, and live cluster monitoring metrics. Use when querying GKE costs across projects, namespaces, or workloads, analyzing billing reports in BigQuery (`bq`), checking cluster cost budgets (`gcloud billing`), or diagnosing cost drivers like pod requests vs. actual utilization (`kubectl top`). Don't use for applying cost optimization changes, creating rightsizing manifests (VPA/MPA), or selecting ComputeClasses (use gke-cost-optimization instead).1 installsmanaged-airflow-migrationsProvides guidance for migrating Apache Airflow DAGs in Managed Service for Apache Airflow (MSAA; formerly Cloud Composer). Covers migration to Airflow 2.11.1 (MSAA Gen 2 and 3) and Airflow 3 (MSAA Gen 3), including environment inspection, GCS download/upload and scanning patterns for breaking changes. Use when migrating the DAG code to newer Airflow version. Don't use when checking DAG run failures unrelated to code migration.1 installsfirebase-basicsProvides foundational Firebase CLI setup, CLI installation, version checks (`firebase-tools@latest --version`), CLI login (including --no-localhost), project creation, project selection (`firebase use`), and app config file downloads (`google-services.json`, `GoogleService-Info.plist`). Use ONLY for CLI login, project creation/switching, or downloading app config files. Don't use for Firebase Hosting deploy, Firestore, Auth, App Hosting, Data Connect, Crashlytics, or Remote Config.1 installsgoogle-cloud-solution-rag-enterprise-search-gke-sqldbDiscovers requirements, and generates architectural, design, and deployment guidance for a retrieval-augmented generation (RAG)-capable enterprise search system in Google Cloud. Use when users need a vector-enabled SQL database as the store and index for the embedding vectors, an open model and open-source inferencing framework, and Kubernetes containers to host all the application components. DON'T use this skill for fully-managed RAG, or SaaS search services, or when a non-SQL vector database is required.1 installsbigtable-basicsAssists in provisioning instances/tables, designing performant schemas, and querying data in Bigtable. Use when designing Bigtable row keys, configuring column families, writing SQL queries or client library code (Java, Go, Python) for Bigtable, or diagnosing performance/hotspotting issues. Also use when provisioning Bigtable clusters using gcloud or cbt CLIs. Don't use for generic Cloud SQL administration.1 installs

More from Google Cloud Skills

View source →
google-ads-api-mcp-setupGuides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server. Use this skill when a user wants to connect their AI assistant (such as Gemini, Claude Code, or Cursor) to their Google Ads account to query campaigns or retrieve reporting metrics using natural language.4 installsspanner-basicsAssists in provisioning instances and databases, designing performant schemas, and querying data in Cloud Spanner on Google Cloud. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.4 installsgke-workload-securityAudits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running security audits (`audit_cluster.sh`), enforcing Network Policies (default-deny and Dataplane V2 logging), isolating high-risk pods inside GKE Sandbox (`gVisor`), enforcing Pod Security Standards (`restricted` labeling) and pod securityContext, and mounting Secret Manager secrets via CSI (`SecretProviderClass`). Use when auditing workload security posture, isolating namespaces, applying pod security standards, or configuring network policies and secret volume mounts. Don't use for Workload Identity (use gke-workload-identity), cluster-wide control plane security, RBAC hardening, Binary Authorization, Shielded Nodes, or enabling platform-level GKE add-ons (use gke-platform-security instead).3 installsgoogle-cloud-recipe-networking-observabilityInvestigates Google Cloud networking issues by analyzing logs, metrics, and diagnostics. Use when investigating VPC Flow Logs, NAT, firewall, or threat logs, querying latency and throughput metrics, or running Connectivity Tests for path diagnostics.2 installsgke-upgradesPlans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both Standard and Autopilot clusters. Produces upgrade plans, pre/post-upgrade checklists, maintenance runbooks with gcloud commands, release channel strategy, and troubleshooting guides. Handles node pool upgrade strategies (surge, blue-green), version compatibility, PDB management, and workload-specific concerns (stateful, GPU, operators). Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE lifecycle management task — even casual mentions like "we need to upgrade our clusters" or "plan our next GKE maintenance" or "our upgrade is stuck." Don't use for GKE cluster creation, application onboarding, general networking/routing setup, or security policy configurations (use gke-basics or relevant GK2 installsgke-manifest-generationGenerates and updates secure, production-ready Kubernetes YAML manifests optimized for GKE Autopilot and GKE Standard clusters. Use when creating or modifying GKE deployment manifests, configuring container security contexts, setting CPU/memory resource limits, defining readiness/liveness/startup probes, mounting secrets and volumes, configuring GKE Gateway API routes, targeting Spot VMs, or deploying AI model inference workloads (vLLM, TGI, Gemma). Don't use for live cluster operations, pod troubleshooting (use gke-workload-troubleshooting), or cluster infrastructure provisioning (use gke-cluster-creation).2 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.638 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.539 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.349 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.248 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.176 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions145 installs

Frequently asked questions about google-cloud-solution-multi-agent-security

What does the google-cloud-solution-multi-agent-security skill do?

Designs, deploys, and secures Google Cloud Agent Gateway solutions. Use when the user needs to configure multi-agent security, ingress (CLIENT_TO_AGENT), or egress (AGENT_TO_ANYWHERE) patterns involving Model Armor, IAP, and Agent Registry. Don't use for general Cloud Load Balancing or basic VPC setup not related to Agent Gateways. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the google-cloud-solution-multi-agent-security skill?

Run `npx @skills-hub-ai/cli install google-cloud-skills-google-cloud-solution-multi-agent-security` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/google-cloud-skills-google-cloud-solution-multi-agent-security/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does google-cloud-solution-multi-agent-security work with?

google-cloud-solution-multi-agent-security runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the google-cloud-solution-multi-agent-security skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use google-cloud-solution-multi-agent-security after installing it?

In Claude Code, type `/google-cloud-skills-google-cloud-solution-multi-agent-security` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the google-cloud-solution-multi-agent-security skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.