Chuyển đến nội dung
Skillpedia
Agent22k · #10215

apigee-agent-gateway-governance

Skill này làm gì

Skill này giúp thiết lập Apigee làm điểm kiểm soát cho các lần gọi mô hình AI của agent trên Google Cloud. Skill dành cho các đội muốn theo dõi mức dùng, biết ai đang gọi và lọc prompt.

Khi nào nên dùng

  • ✓Khi bạn muốn theo dõi số token một agent dùng cho mỗi mô hình AI trên Google Cloud.
  • ✓Khi bạn cần kiểm tra prompt hoặc thêm bộ nhớ đệm ngữ nghĩa cho lưu lượng mô hình của agent.
  • ✓Khi bạn muốn đặt Apigee phía trước một agent gateway để quản trị các lần gọi mô hình.

Liên kết skill

https://github.com/google/skills/blob/main/skills/cloud/apigee-agent-gateway-governance/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/google/skills/blob/main/skills/cloud/apigee-agent-gateway-governance/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thiết lập Apigee để đếm số token AI agent của tôi dùng và kiểm tra prompt trước khi chúng đến mô hình.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill xây dựng một bộ xử lý Apigee mà Agent Gateway gọi cho mỗi yêu cầu và phản hồi mô hình. Bộ xử lý trả về kết luận cho từng lần, và bắt đầu với việc xác định danh tính và theo dõi mức dùng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Apigee as an Agent Gateway Service Extension

Wires an Apigee proxy in as an ext-proc callout on a GCP Agent Gateway. The proxy is a processor, not an API proxy: it has no backend, inspects the LLM request and response the gateway hands it, and returns a verdict.

Usage Attribution

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

You build the proxy; the user does not.

Two modes, one schema. Decide which before anything else, and say which. Input file present → prod mode: it is the contract, every value comes from it, and a missing or malformed field is a refusal, not a default. No input file and the user is describing an outcome → dev mode: apply the documented defaults, show a plan with durations and get approval, start with identity and metering only, write apigee-agent-gateway-governance.yaml at the end as the handoff. assets/apigee-agent-gateway-governance.example.yaml documents the schema both modes use.

Modes, defaults, durations, cost disclosure and the interlocks that bind both: references/modes.md. Read it before you start.

Colour the plan's ACTION column — green REUSE, cyan CREATE/RESERVE, yellow APPEND/MODIFY; full palette in references/modes.md. Yellow is the one that earns its place: it is the only signal that a resource the user already owns is being changed. Rendered plain, the one row that modifies something is indistinguishable from the dozen that do not — which is exactly the row the approval exists for.

Prerequisite: where the agent runs

Check this before building anything. It decides whether traffic can reach the gateway at all, and it is silent when wrong — every step below still succeeds while nothing arrives.

Use Agent Runtime, created with agent_gateway_config / agent_to_anywhere_config. It is the supported path and the orchestrator builds the client-side PSC, routing, DNS and cert trust for you. There is no gcloud surface for this and no console path — it is SDK-only, at agent creation time. See Route traffic through Agent Gateway for the binding, and references/networking-psc.md for a worked example.

Set GOOGLE_API_PREVENT_AGENT_TOKEN_SHARING_FOR_GCP_SERVICES: "False" in the agent's env_vars, or every invocation 401s on the agent's own sessions.create, before user code runs. Deploy-time invisible. Full symptom and isolation: references/gotchas.md, Agent Gateway.

Where the agent runs is otherwise settled — the premise is a working gateway and a working agent. Do not explain how to build one or list unsupported compute unprompted; references/networking-psc.md has the constraints if it turns out to matter.

Tool versions

Do not assume these are installed or current.

Tool Minimum Why
gcloud 588.0.0 apigee apis import --from-template is on the GA track at this version; older SDKs need gcloud beta
google-cloud-aiplatform[agent_engines,adk] >=2.1,<3 Agent Runtime client used to bind the agent to the gateway
google-adk >=2.9,<3 only if you build the test agent with ADK

On gcloud >= 588.0.0: every feature must keep its uid, and the template must never declare endpoints or targets. All six features set uid today and the template declares neither, so the shipped bundle is correct — but both are load-bearing now, and breaking either one still compiles, still deploys, and reports nothing. Mechanism and symptoms: references/gotchas.md, under Authoring (AFT).

gcloud version | head -1          # confirm >= 588.0.0
gcloud components update          # if older
pip install "google-cloud-aiplatform[agent_engines,adk]>=2.1,<3" "google-adk>=2.9,<3"

scripts/compile_check.py needs PyYAML and names the interpreter if it is missing. pip install pyyaml, or run it with a Python 3 that has it; gcloud's bundled interpreter does not, and the SDK's vendored yaml is Python 2.

python3 scripts/compile_check.py assets/apigee-proxy-template.yaml

Execution model

Three layers, and the choice between them is not stylistic:

Layer

Câu hỏi thường gặp

Tôi có phải tự viết proxy không?

Không. Skill sẽ xây dựng proxy, còn bạn cung cấp thiết lập hoặc mô tả kết quả mong muốn.

Proxy có gọi một API backend không?

Không. Bộ xử lý không có backend. Nó chỉ kiểm tra lưu lượng mô hình và trả về kết luận.

Tôi có thể đưa cho skill một file thiết lập không?

Có. Nếu bạn cung cấp file thiết lập, skill sẽ dùng chính xác các giá trị trong đó và dừng lại nếu thiếu trường nào.

Chi tiết

Mô tả gốc của tác giả

Stands up an Apigee API proxy that a Google Cloud Agent Gateway calls as an ext-proc (Service Extension) callout on an agent's LLM traffic, to meter token usage per model, extract caller identity, and apply Model Armor prompt screening or a semantic cache. Use when wiring Apigee in as an AI gateway behind an Agent Gateway, when an agent's model egress needs governing, or when a callout proxy returns no verdict and you need to find out why. The distinguishing question is whether Apigee forwards the traffic or only inspects it: this skill is inspect-only, and builds the proxy itself. Don't use i

repo: google/skills

Độ phổ biến

Sao GitHub
22k
Vị trí xếp hạng
#10215
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự