# Gemini Managed Agents 通过拦截 GitHub API 调用并交换令牌，实现安全的自动化 PR triage，agent 获得完整 CLI 访问而令牌保留在控制平面

- 来源：Philipp Schmid
- 发布时间：2026-07-18 00:14
- AIWatch 分数：62
- AIWatch 标记：当日精选
- AIWatch 链接：https://aiwatch.icu/events/evt_01ky1v6sk143tn0ndzcnpkkgvk
- 原文链接：https://x.com/_philschmid/status/2078151359342239788

## 精选理由

常规快讯，保留列表

## AI 摘要

Gemini Managed Agents 通过拦截 GitHub API 调用并交换令牌，实现安全的自动化 PR triage，agent 获得完整 CLI 访问而令牌保留在控制平面。

## 正文

How it works:
1. Give the agent a dummy GH_TOKEN to satisfy local checks
2. Gemini API Intercept calls to api github and github com at the network layer
3. Egress proxy swap in your real token (`Bearer` for API, `Basic` for git)
4. Reuse the container across turns to keep gh installed

The agent gets full CLI access, and your real token stays in the control plane.
