构建 Hermes 插件
构建一个计算器插件,包含工具、钩子和捆绑技能。
步骤
- 创建目录:
mkdir -p ~/.hermes/plugins/calculator - 编写
plugin.yaml清单 - 编写
schemas.py(工具模式) - 编写
tools.py(工具处理器) - 编写
__init__.py(注册) - 添加钩子和捆绑技能(可选)
- 启用:
config.yaml→plugins.enabled: [calculator] - 激活:
/reset
项目结构
~/.hermes/plugins/calculator/
├── plugin.yaml # 清单
├── __init__.py # 注册入口
├── schemas.py # 工具模式
├── tools.py # 工具处理器
└── skills/ # 可选:捆绑技能
└── calculator/SKILL.md
详见 workspace zh/guides/build-a-hermes-plugin.md