Google 为 Gemini 托管 agent 推出 Files API 与不泄密的 Credentials API

_philschmid · x · 2026-09-18

Google 为 Gemini API 的托管 agent 环境新增两个接口:

Files API:负责数据进出 agent 沙箱——files.upload() 可内联投喂或对话中上传文件;files.list() 查看生成文件与目录大小;files.download() 下载产出物、报告、CSV 乃至 git 仓库;沙箱通过 environmentid 跨轮次持久化。

Credentials API:让 agent 安全调用外部服务和 MCP 服务器——credentials.create() 支持 bearertoken、environmentvariable、oauth2(自动刷新与轮换);密钥永不明文进入模型上下文、stdout 或内存,agent 只能看到占位符。

文档同步发布在 Google AI for Developers。

所属事件:Gemini 托管 Agent 新版降本 30%,推出 Files 与 Credentials API(6 条相关)→

原文链接 →

「编程与Agent」频道最新

更多「编程与Agent」频道 AI 资讯 →