agent-platform-architecture
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGemini platform Architecture and Engineering Guide
Gemini platform 架构与工程指南
This skill is the reference system for designing, engineering, and validating enterprise-grade Gemini platform architectures across multi-project hierarchies, hybrid/cross-cloud networks, zero-trust identity boundaries, and inline safety/policy enforcement planes.
本 skill 是用于设计、工程化并验证企业级 Gemini platform 架构的参考体系,涵盖多项目层级结构、混合云/跨云网络、零信任身份边界,以及内联安全/策略执行平面。
Usage Attribution
使用说明与归属要求
MUST READ: Before executing any , REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
gcloud[!IMPORTANT] Architectural Scope and Reference Discipline: Useto select the target topology, egress mode, ingress pattern, and governance plane, then consult the authoritativeSKILL.mdmanual for exact CLI commands, REST/YAML schemas, Common Expression Language (CEL) expressions, and Python Agent Development Kit (ADK) runtime code (references/*.mdis the single source of truth for all implementation syntax). When remote Model Context Protocol (MCP) tools (such as the Google Developer Knowledge MCP server or Google-managed MCP endpoints) are available, prefer remote MCP tool invocation over raw CLI/REST commands. Do not execute unrequested live mutations against customer projects when asked for architectural designs.references/*.md
[!CAUTION] Human Approval Gate for Sensitive Operations: Always prompt the user for explicit confirmation before executing commands or applying configurations that grant permissive Identity and Access Management (IAM) bindings (,roles/iap.egressor,roles/compute.networkUser), modify Organization Policies (roles/networkservices.admin), update Unified Access Policy (UAP) or VPC Service Controls (VPC-SC) policies, or delete resources (RESTconstraints/iam.managed.disableAccessPolicyBindingor CLIDELETE ...?force=true).--quiet
必须阅读:在执行任何 、REST API 或 MCP 命令之前,你必须阅读并遵循 使用说明与归属要求 中的指示。
gcloud[!IMPORTANT] 架构范围与参考规范:使用选择目标拓扑、出口模式、入口模式和治理平面,然后查阅权威的SKILL.md手册,以获取准确的 CLI 命令、REST/YAML schema、Common Expression Language (CEL) 表达式和 Python Agent Development Kit (ADK) runtime 代码(references/*.md是所有实现语法的唯一事实来源)。当可以使用远程 Model Context Protocol (MCP) 工具(例如 Google Developer Knowledge MCP server 或 Google 托管的 MCP endpoint)时,应优先通过远程 MCP 工具调用,而不是使用原始 CLI/REST 命令。当请求仅为架构设计时,不要对客户项目执行未经请求的实时变更。references/*.md
[!CAUTION] 敏感操作的人工审批门禁:在执行命令或应用配置之前,始终要求用户明确确认;这些操作包括授予权限过于宽松的 Identity and Access Management (IAM) binding(、roles/iap.egressor、roles/compute.networkUser)、修改 Organization Policies(roles/networkservices.admin)、更新 Unified Access Policy (UAP) 或 VPC Service Controls (VPC-SC) policy,或者删除资源(RESTconstraints/iam.managed.disableAccessPolicyBinding或 CLIDELETE ...?force=true)。--quiet
Prerequisites, Authentication, Region, and Billing Setup
前提条件、身份验证、区域和结算设置
- Google Cloud SDK, Authentication, and Project Setup:
-
Install the Google Cloud SDK () and authenticate CLI and Application Default Credentials (
gcloud, or setgcloud auth login && gcloud auth application-default login).GOOGLE_APPLICATION_CREDENTIALS -
Select or create the target project (/
gcloud projects create {project_id}), set the default region (gcloud config set project {project_id}, defaulting togcloud config set compute/region {region}; see Google Cloud Locations), and enable required APIs:us-central1bashgcloud services enable aiplatform.googleapis.com agentregistry.googleapis.com \ agentidentity.googleapis.com agentidentitycredentials.googleapis.com \ networkservices.googleapis.com networksecurity.googleapis.com iap.googleapis.com \ modelarmor.googleapis.com compute.googleapis.com dns.googleapis.com \ certificatemanager.googleapis.com servicenetworking.googleapis.com
-
- Billing, Least-Privilege IAM, and Product Terminology:
- Verify an active billing account is attached () across
gcloud billing projects describe {project_id} --format="value(billingEnabled)",{host_project_id},{gov_project_id}, and{runtime_project_id}(required even when evaluating free-tier allowances; review Google Cloud Pricing).{mcp_project_id} - Grant explicit least-privilege IAM roles (,
roles/aiplatform.user,roles/networkservices.admin,roles/compute.networkAdmin,roles/compute.networkUser, or a custom role withroles/iap.egressor) rather than primitivenetworkservices.agentGateways.get,networkservices.agentGateways.use,networkservices.operations.getorroles/owner.roles/editor - Use approved product names: Gemini platform,
Agent Runtime (), Agent Gateway (
reasoningEngines), Agent Connectivity Template (ACT), Agent Registry, and Unified Access Policy (UAP Policy V2) / Semantic Governance Policy (SGP).240.0.0.2:443
- Verify an active billing account is attached (
- Google Cloud SDK、身份验证和项目设置:
-
安装 Google Cloud SDK (), 并对 CLI 和 Application Default Credentials 进行身份验证(
gcloud,或设置gcloud auth login && gcloud auth application-default login)。GOOGLE_APPLICATION_CREDENTIALS -
选择或创建目标项目(/
gcloud projects create {project_id}),设置 默认区域(gcloud config set project {project_id},默认为gcloud config set compute/region {region};参见 Google Cloud Locations),并启用所需 API:us-central1bashgcloud services enable aiplatform.googleapis.com agentregistry.googleapis.com \ agentidentity.googleapis.com agentidentitycredentials.googleapis.com \ networkservices.googleapis.com networksecurity.googleapis.com iap.googleapis.com \ modelarmor.googleapis.com compute.googleapis.com dns.googleapis.com \ certificatemanager.googleapis.com servicenetworking.googleapis.com
-
- 结算、最小权限 IAM 和产品术语:
- 验证所有项目均绑定了有效的结算账号(),涵盖
gcloud billing projects describe {project_id} --format="value(billingEnabled)"、{host_project_id}、{gov_project_id}和{runtime_project_id}(即使在评估免费层额度时也必须执行;请参阅 Google Cloud Pricing)。{mcp_project_id} - 授予明确的最小权限 IAM role(、
roles/aiplatform.user、roles/networkservices.admin、roles/compute.networkAdmin、roles/compute.networkUser,或包含roles/iap.egressor的自定义 role),而不是粗粒度的networkservices.agentGateways.get,networkservices.agentGateways.use,networkservices.operations.get或roles/owner。roles/editor - 使用批准的产品名称:Gemini platform、
Agent Runtime()、Agent Gateway (
reasoningEngines)、Agent Connectivity Template (ACT)、 Agent Registry,以及 Unified Access Policy (UAP Policy V2) / Semantic Governance Policy (SGP)。240.0.0.2:443
- 验证所有项目均绑定了有效的结算账号(
3-Phase Architect Workflow and Decision Tree
3 阶段架构工作流与决策树
mermaid
graph TD
Start["Enterprise Gemini platform Architecture"] --> Q1{"1. Egress Destinations?"}
Q1 -->|"RFC 1918 + Google APIs Only"| Priv["ACT: vpcEgress = PRIVATE_RANGES_ONLY<br/>• Direct Private Google Access (PGA)"]
Q1 -->|"Public Internet, VPC-SC, or Non-RFC 1918 PUPI"| All["ACT: vpcEgress = ALL_TRAFFIC<br/>• 100% Egress via AGW VIP 240.0.0.2:443<br/>• Consolidate Core Google APIs FQDNs"]
All --> Q2{"2. Layer 7 URL List or Cross-Cloud mTLS?"}
Q2 -->|"No (Standard NAT)"| Nat["Direct Cloud NAT on PSC-I Subnet<br/>• ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG"]
Q2 -->|"Yes (Next-Hop SWP)"| Swp["Next-Hop SWP (NEXT_HOP_ROUTING_MODE) + PBR<br/>• Internal and Google API DEFAULT_ROUTING bypasses<br/>• Default route via SWP ILB IP<br/>• Exclude PSC-I from manual Cloud NAT"]- Phase 1 — Scope Verification and Architecture Discovery:
- Scope Boundaries and Single-Region Discovery: Decline generic Google
Cloud IAM/Compute/Storage debugging unrelated to the Gemini platform
stack or requests to run broad multi-region live project scanning loops,
pointing instead to .
gcloud ai reasoning-engines list --region={region} - Architecture Design and Engineering: Identify the project
hierarchy (,
Host,Governance Hub,Runtime Spoke), egress mode (Tool/MCP SpokevsALL_TRAFFIC), policy plane (UAP V2, SGP, Model Armor), and target output format (topology specification,PRIVATE_RANGES_ONLYCLI commands, or REST/YAML manifests).gcloud
- Scope Boundaries and Single-Region Discovery: Decline generic Google
Cloud IAM/Compute/Storage debugging unrelated to the Gemini platform
stack or requests to run broad multi-region live project scanning loops,
pointing instead to
- Phase 2 — Draft Architecture Plan and Resource Mapping:
- Synthesize the topology diagram, project/VPC layout, IAM bootstrap matrix, and security controls using the Domain Router and Symptom Matrix, and map each manual's canonical REST/YAML schema and CLI commands into the target deployment artifacts.
- Phase 3 — Post-Deployment and Audit Log Verification:
- Pair every architecture design with the Post-Deployment and Cloud Audit
Log Verification checklist
() and runtime query validation (
references/topologies_and_project_layouts.md).references/agent_runtime_and_identity.md
- Pair every architecture design with the Post-Deployment and Cloud Audit
Log Verification checklist
(
mermaid
graph TD
Start["Enterprise Gemini platform Architecture"] --> Q1{"1. Egress Destinations?"}
Q1-->| "RFC 1918 + Google APIs Only"| Priv["ACT: vpcEgress = PRIVATE_RANGES_ONLY<br/>• Direct Private Google Access (PGA)"]
Q1-->| "Public Internet, VPC-SC, or Non-RFC 1918 PUPI"| All["ACT: vpcEgress = ALL_TRAFFIC<br/>• 100% Egress via AGW VIP 240.0.0.2:443<br/>• Consolidate Core Google APIs FQDNs"]
All --> Q2{"2. Layer 7 URL List or Cross-Cloud mTLS?"}
Q2-->| "No (Standard NAT)"| Nat["Direct Cloud NAT on PSC-I Subnet<br/>• ENDPOINT_TYPE_VM,ENDPOINT_TYPE_SWG"]
Q2-->| "Yes (Next-Hop SWP)"| Swp["Next-Hop SWP (NEXT_HOP_ROUTING_MODE) + PBR<br/>• Internal and Google API DEFAULT_ROUTING bypasses<br/>• Default route via SWP ILB IP<br/>• Exclude PSC-I from manual Cloud NAT"]- 阶段 1 — 范围验证与架构发现:
- 范围边界与单区域发现:拒绝处理与 Gemini
platform 技术栈无关的常规 Google Cloud IAM/Compute/Storage 调试,
或拒绝运行广泛的多区域实时项目扫描循环,并改用
。
gcloud ai reasoning-engines list --region={region} - 架构设计与工程化:识别项目层级结构(、
Host、Governance Hub、Runtime Spoke)、 出口模式(Tool/MCP Spoke与ALL_TRAFFIC)、策略平面 (UAP V2、SGP、Model Armor),以及目标输出格式(拓扑规范、PRIVATE_RANGES_ONLYCLI 命令或 REST/YAML manifest)。gcloud
- 范围边界与单区域发现:拒绝处理与 Gemini
platform 技术栈无关的常规 Google Cloud IAM/Compute/Storage 调试,
或拒绝运行广泛的多区域实时项目扫描循环,并改用
- 阶段 2 — 架构草案与资源映射:
- 使用 域路由与症状矩阵(Domain Router and Symptom Matrix) 综合生成拓扑图、项目/VPC 布局、IAM 引导矩阵和安全控制,并将每份手册中的标准 REST/YAML schema 和 CLI 命令映射到目标部署工件中。
- 阶段 3 — 部署后与审计日志验证:
- 将每项架构设计与 部署后与 Cloud Audit Log 验证清单
()以及 runtime 查询验证 (
references/topologies_and_project_layouts.md)配对。references/agent_runtime_and_identity.md
- 将每项架构设计与 部署后与 Cloud Audit Log 验证清单
(
Domain Router and Symptom Matrix
域路由与症状矩阵
Each reference manual in is the single source of truth for its
domain's CLI commands, REST/YAML schemas, quotas, and CEL expressions. Always
read the corresponding reference manual before generating configurations or
answering domain-specific questions:
references/| Architecture Domain | Topics and Architectural Decisions Covered | Symptoms and Failure Modes Routed Here | Canonical Reference Manual |
|---|---|---|---|
| 1. Project Hierarchy, Shared VPC, VPC-SC, and Custom Routing | Multi-project separation ( | PSC-I IP exhaustion, cross-project attachment or | |
| 2. Agent Connectivity Template (ACT) and Agent Gateway | Choosing | Control-plane URI validation errors, registry attachment limit errors, or container TLS verification failures ( | |
| 3. Outbound Routing, Next-Hop SWP, PBR, and Hybrid mTLS | Source-range Policy-Based Routes (PBR) for PSC-I subnets, Next-Hop Secure Web Proxy ( | Asymmetric return-routing drops between manual Cloud NAT and | |
| 4. Ingress ALB, URL Rewrites, Private CA, and 3P IdP STS | Two-Tier and Single-Tier ALB ingress with URL Map | WebPKI root stripping ( | |
| 5. UAP Policy V2, IAP V1, SGP, and Model Armor Governance | Organization/Folder/Project UAP Policy V2 and IAP V1 CEL authorization rules, Semantic Governance Policy (SGP | | |
6. Agent Registry, Consolidated | Consolidating core Google APIs FQDNs into a single | | |
| 7. ADK Runtime Packaging, Agent Identity, and Day-2 Operations | Packaging ADK agents with | Raw credential exposure, | |
references/| 架构领域 | 涵盖的主题与架构决策 | 路由至此的症状与故障模式 | 标准参考手册 |
|---|---|---|---|
| 1. 项目层级结构、共享 VPC、VPC-SC 与自定义路由 | 多项目隔离( | PSC-I IP 耗尽、跨项目 attachment 或 | |
| 2. Agent Connectivity Template (ACT) 与 Agent Gateway | 选择 | 控制平面 URI 验证错误、registry attachment 数量限制错误,或容器 TLS 验证失败( | |
| 3. 出站路由、Next-Hop SWP、PBR 与 Hybrid mTLS | PSC-I subnet 的 Source-range Policy-Based Routes (PBR)、Next-Hop Secure Web Proxy( | 手动 Cloud NAT 与 | |
| 4. 入口 ALB、URL 重写、Private CA 与 3P IdP STS | 两层和单层 ALB ingress,URL Map 的 | WebPKI 根剥离( | |
| 5. UAP Policy V2、IAP V1、SGP 与 Model Armor 治理 | Organization/Folder/Project UAP Policy V2 与 IAP V1 CEL authorization rule、Semantic Governance Policy(SGP | MCP | |
6. Agent Registry、整合的 | 将核心 Google APIs FQDN 整合到单一 | | |
| 7. ADK Runtime 打包、Agent Identity 与 Day-2 运维 | 使用 | 原始凭据暴露、 | |