Don’t let the LLM decide who is allowed to act
说明与用途
在 Google Cloud 上使用 Gemini 的自动化代理分析资源,并仅在满足成本节约阈值时执行更改,所有关键操作均需人工批准。
问题
Automated cloud resource cleanup can unintentionally delete or modify resources if the LLM’s decisions are not constrained by human oversight and precise approval data.
结果
The agent reduced manual cleanup effort, prevented silent cost‑draining bugs, and ensured all high‑impact changes required human approval.
工作流
- 1. Deploy Cloud Run service with write credentials.
- 2. Agent uses Gemini 3.5 Flash‑Lite to read resource fleet and estimate savings.
- 3. Decision logic checks if tool is irreversible or savings ≥40.0 → await approval; if savings ≥5.0 → apply; else skip.
- 4. Agent logs actions, wraps any user‑supplied text in
<untrusted>delimiters, and escalates if cost threshold is met. - 5. Human reviews Level‑2 actions and approves or rejects.
- 6. Agent applies approved changes or skips.
- 7. Periodic audit reports include engine used and decision rationale.
证据
The agent cleans the name, wrapped it in <untrusted> delimiters, declared it as data, flagged it to me — and escalated it to Level 2 anyway, because $487 a month is $487 a month no matter what the resource is called.
If the ticket said "1 vCPU and 2Gi" and the executor applied 512Mi. Four code paths had an or "512Mi" fallback, so the ticket text and the applied change were derived independently from the same input.
- 记录日期: 2026-09-06T11:51:45.372Z