跳到正文
Google Developers Blog·· 2026-07-31AI 评分59

Genkit Go 引入 Agent Skills,按需加载技能防止上下文膨胀

Enable on-demand expertise with Agent Skills in Genkit Go

AI 导读

Genkit Go 推出基于渐进式披露架构的 Agent Skills,将专用指令、脚本和参考资料打包为模块化 SKILL.md 包,初始仅向系统提示暴露 frontmatter 元数据。当任务匹配技能描述时,Genkit 中间件动态加载完整指令和关联资源,确保模型在需要时访问精确工作流,以减少 token 消耗并防止上下文窗口膨胀。

正文 · 原文

To prevent context window bloat and reduce token consumption, Genkit Go introduces Agent Skills based on a progressive disclosure architecture. Developers can package specialized instructions, scripts, and references into modular SKILL.md bundles where only the frontmatter metadata is initially exposed to the agent's system prompt. When a task matches the skill's description, Genkit's middleware dynamically loads the full instruction body and associated assets, ensuring the model accesses precise workflows exactly when needed.

来源:Google Developers Blog · developers.googleblog.com