模块 1 / 10

进阶特性

Context Compression、Plugins、MCP、Webhooks、Kanban——让 Hermes 更强大。

预计阅读时间:8 分钟

1 Context Compression

对话历史太长时,Hermes 自动压缩旧消息为摘要,确保不超 token 上限。

compression:
enabled: true
threshold: 0.50  # 使用率超 50% 触发
target_ratio: 0.20  # 压到 20%
protect_last_n: 20  # 保护最近 20 条消息

2 Plugins 插件系统
hermes plugins list   # 列出已安装
hermes plugins install  # 安装

插件可以扩展 Hermes 的核心能力——添加新的 Provider、新的工具、新的平台适配器。


3 MCP Servers

MCP(Model Context Protocol)让 Hermes 接入外部工具服务器——社区生态的 MCP Server 可以直接用。

hermes mcp add NAME --url URL    # HTTP 模式
hermes mcp add NAME --command CMD  # 命令行模式
hermes mcp list                 # 列出

4 Webhooks

外部系统可以通过 Webhook 触发 Agent 运行:

hermes webhook subscribe NAME  # 创建路由
hermes webhook list         # 列出
hermes webhook test NAME      # 测试

5 Kanban 多 Agent 任务板

Kanban 是多 Profile 协作的任务队列。一个 Profile 派发任务,多个 Worker Profile 认领执行。

hermes kanban init    # 初始化
hermes kanban create  # 创建任务
hermes kanban list    # 查看
hermes kanban dispatch # 启动调度器

6 Checkpoints 文件快照

开启 Checkpoints 后,每次文件变更前自动创建快照。/rollback 一键回退。

checkpoints:
enabled: true
max_snapshots: 50