跳转到内容

Async Delegate Profile

基于 Hermes Kanban 的多 Profile 异步任务处理架构。大任务拆解后交给后台 Worker 执行,前台保持响应。解决 delegate_task() 同步阻塞的问题。

GitHub 仓库: HTZY08/wiki-for-Amaranthstatic/skills/async-delegate/

直接下载: hermes-async-delegate.tar.gz(3.4KB)

License: CC BY-NC-SA 4.0


Hermes Agent 内置的 delegate_task() 提供子 agent 能力,但问题是同步阻塞的——主 agent 派发子任务后必须等待所有子任务完成才能继续响应。社区对此的诉求体现在 GitHub issues 中,但尚未进入主分支。

Kanban 是 Hermes 内建的异步任务队列,支持多 profile 协作、依赖链、自动派发。这套 skill 封装了”前后台分离”的最佳实践。

文件功能
delegate/SKILL.md核心 Skill:架构说明、配置参数、行为规则、Profile 模板
delegate/references/worker-SOUL.mdWorker Profile 的 SOUL.md 模板,含失败处理、路径限制、完成验证
kanban-worker/SKILL.mdKanban Worker 行为指南,含 Retry 诊断、Block 策略、Recitation 模式
Terminal window
# 下载并解压
wget https://github.com/HTZY08/wiki-for-Amaranth/raw/main/static/skills/async-delegate/hermes-async-delegate.tar.gz
tar xzf hermes-async-delegate.tar.gz -C ~/.hermes/skills/
# 初始化 Kanban
hermes kanban init
# 创建 Worker Profile
hermes profile create worker --clone
# 使用参考 worker-SOUL.md 更新 worker 的行为定义
参数推荐值说明
dispatch_interval5sDispatcher 轮询间隔
stale_timeout600s(10min)Worker 崩溃后自动回收
failure_limit3失败重试次数
max_concurrent3每 Profile 并发任务数
Profile主模型副模型专精
worker通用不明确分类的任务
compute执行模型分析模型计算化学
code执行模型架构模型编码/Debug
writer写作模型执行模型文档/翻译
researcher分析模型执行模型文献/深度研究
  • 前后台分离铁律:先创建卡片再回复用户,禁止在回复前做调研
  • 最小权限:Worker .env 只保留必要的 API Key,移除所有第三方服务 Key
  • 路径白名单:限制 Worker 只能写入指定输出目录,防止覆盖系统配置
  • Stale Timeout:Worker 崩溃后 10 分钟自动回收,避免任务永久卡死
  • 分层模型:执行用快速模型,复杂分析调高端模型(Gemini Pro / Claude)
  • 🧠 Recitation 模式(新增):复杂任务中 worker 自动在 workspace 维护 todo.md,每步更新全局目标到上下文末尾,对抗 “lost in the middle”。详见 kanban-worker/SKILL.md
资源链接
GitHub 仓库github.com/HTZY08/wiki-for-Amaranth
Skill 文件目录static/skills/async-delegate/
直接下载 tar.gzhermes-async-delegate.tar.gz
LicenseCC BY-NC-SA 4.0