google-cloud-solution-multi-agent-security
它能做什么
这个技能为通过 Agent Gateway 在 Google Cloud 上运行的 AI 智能体设计安全方案。它适用于需要控制并筛查智能体进出流量的团队。
适用场景
- ✓当你需要保护用户通过 Agent Gateway 访问智能体的方式的时候。
- ✓当你想用出站规则控制智能体可以访问外部的哪些内容的时候。
- ✓当你想为多智能体系统设置 Model Armor、IAP 或 Agent Registry 的时候。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/google-cloud-solution-multi-agent-security/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请保护我在 Google Cloud 上的多智能体系统,使用户流量经过 Model Armor 筛查,并限制对外部的调用。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用 Model Armor、IAP 和 Agent Registry 配置入站和出站模式,并使用确切的 gcloud 发布通道。它使用 Python 验证脚本而不是 curl 来检查出站策略。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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.comin 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 bothpiAndJailbreakFilterSettingsandsdpFilterSettings(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 = trueenabled 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, orcurl) 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_fileas needed for extended configurations, deployment scripts, and test suites.
Quick Reference: Required Filenames
Always generate files with these exact names when requested:
agw-ingress-config.yaml(assets/agw-ingress-config.yaml)agw-egress-config.yaml(assets/agw-egress-config.yaml)agw-authz-extension.yaml(assets/agw-authz-extension.yaml)agw-authz-policy.yaml(assets/agw-authz-policy.yaml)model-armor-config.yaml(assets/model-armor-config.yaml)sgp-policy.yaml(assets/sgp-policy.yaml)iap-policy.json(assets/iap-policy.json)model-armor-payload.json(assets/model-armor-payload.json)
1. Dual Ingress & Egress Architecture Design (dual_ingress_egress_architecture_design)
Ingress Pattern:
CLIENT_TO_AGENTfronted by Ingress Control Plane (Agent Gateway, Model Armor).Egress Pattern:
AGENT_TO_ANYWHEREutilizing Egress Control Plane (Agent Gateway,roles/iap.egressorCEL 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 M
常见问题
它涵盖一般的负载均衡吗?
不涵盖。它只针对 Agent Gateway 安全,不涵盖一般的负载均衡或基础 VPC 设置。
为什么出站检查需要 Python 脚本?
出站检查依赖 SDK 的生命周期处理和 curl 无法模拟的 JWT 上下文。
它需要启用 Model Armor 吗?
需要。必须启用 Model Armor API,其策略才能附加到网关上。
详情
作者的原始描述
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.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10325
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。