Files
nexus/wiki/concepts/ToolWrapper.md

38 lines
1.2 KiB
Markdown

---
title: "Tool Wrapper"
type: concept
tags: [Agent, Skill, Design Pattern, ADK]
sources: [google-5个agent-skill设计模式-2026-03-19]
last_updated: 2026-03-19
---
## Overview
Tool Wrapper 是 Google ADK 发布的 5 种 Agent Skill 设计模式之一,通过动态加载领域知识让 Agent 快速成为某个领域的专家。
## Mechanism
- 将某个库或框架的规范文档打包成一个 Skill
- SKILL.md 监听特定的库关键词
- 当用户开始使用相关技术时才动态加载 `references/` 目录下的文档
- 把加载的规则当作绝对真理来执行
## Use Cases
- 分发团队内部的编码规范
- 特定框架的最佳实践(如 FastAPI 规范)
- 按需加载团队内部知识库
## Implementation
```
SKILL.md: 监听 "FastAPI" 关键词
references/conventions.md: FastAPI API 约定规范
→ 用户写 FastAPI 代码时才加载
```
## Related Concepts
- [[渐进式披露]]:只在使用时才加载相关知识
- [[Reviewer]]:另一个互补的 Skill 设计模式
- [[Generator]]:另一个互补的 Skill 设计模式
## Connections
- [[Google5个AgentSkill设计模式]] ← part_of ← [[ToolWrapper]]
- [[ADK]] ← published_by ← [[ToolWrapper]]