跳到正文
Skillpedia
智能体260k · #441

dynamic-workflow

它能做什么

它把包含大量相似部分的大型任务(例如每个文件或每个接口一项任务)组织为一个脚本,记录每一项结果。它适合使用 Hermes 智能体进行大批量工作的开发者。

适用场景

  • ✓任务包含的独立单元多到一次对话无法容纳,例如数十个文件的时候。
  • ✓你希望由独立的审阅者检查多轮尝试结果的时候。
  • ✓大型重构或修复需要分成若干批并行工作者来完成的时候。

技能链接

https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/dynamic-workflow/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/autonomous-ai-agents/dynamic-workflow/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请更新全部 60 个 API 接口文件的错误处理,并在回报前逐一检查。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体编写一个脚本,用来保存计划和循环,把工作单元并行分派给辅助智能体,并把每项结果记录到磁盘上。只有经过验证的结果才会返回主对话。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Dynamic Workflow Skill

Runs large fan-out work as a workflow: the plan, the loop and every intermediate result live in a script and on disk, so the parent's context holds only verified results. Covers one-shot fan-outs, adversarial convergence (attempts + refuters), and multi-wave campaigns that integrate dozens of worker branches. It does not make delegate_task durable across restarts; that is the kanban swarm's job.

When to Use

Reach for it when the unit of work is clear (a file, an endpoint, a record) and there are more units than one context can hold. Skip it for under ~10 units or for serial chains. For a refactor or fix campaign on hermes-agent itself, load hermes-agent (the dev workflow) alongside; this skill owns the fan-out shape.

Prerequisites

  • delegate_task available and delegation.max_concurrent_children sized for the wave (default 10; the runtime rejects a tasks=[] larger than that with a clear error rather than queueing). delegation.max_spawn_depth >= 2 only if children must fan out themselves.
<!-- no-tmp: ok — explains why a literal /tmp is wrong -->
  • A writable run directory resolved from the terminal environment's temp dir ($TMPDIR, else the platform temp dir). Never a literal /tmp: Termux has no such directory and native Windows breaks on it. Use <tmp>/wf_<name>_<uuid>/, unique per run, so an interrupted earlier run cannot leave stale outputs to be misread.
  • execute_code for the deterministic layer (only web_search, web_extract, read_file, write_file, search_files, terminal, patch exist inside it).

How to Run

Two layers, split by a real capability boundary:

Layer A - execute_code script Layer B - delegate_task batch
Use for DETERMINISTIC work: fetch N URLs, parse N files, run N commands, template N outputs, build manifests, merge outputs LLM-JUDGMENT work: classify, review, decide, write, refute, refactor one unit
Holds loop, branching, intermediate variables nothing; one call with tasks=[...], each task its own isolated agent
Tools the sandbox set above; it can NOT call delegate_task the parent's toolsets, inherited unchanged (no per-task narrowing); children lose delegate_task, clarify, memory, send_message, cronjob_manage
Concurrency yours (ThreadPoolExecutor, batches) bounded by delegation.max_concurrent_children
Cost tool calls only one full agent tree per task; multiplies linearly

Do the deterministic part in Layer A first, fan out only the irreducibly-LLM step in Layer B, synthesize on the parent.

Background-first: results re-enter as messages

A top-level delegate_task returns immediately with one handle per task; each child's result re-enters the conversation as a new message when it finishes. You cannot read out_*.csv on the line after the call. Finish whatever does not depend on the children, give a one-line status, and END YOUR TURN; act on each result message as it lands. An ordinary follow-up user message does not cancel children; /stop, /new and process exit do. Only a delegation issued by an orchestrator subagent (depth > 0) is synchronous.

Quick Reference

  • Unit must be answerable without sibling output, else it is serial.
  • Manifest: one unit per line in <run>/manifest.jsonl; print count + run dir.
  • Per child: ~8-12 mechanical edits, or ~2-3k lines of reading, or ~50-70 KB of corpus; size by the LARGEST unit. Structured output goes to files, never the summary field (it truncates under load); delimiter-separated lines over JSON.
  • Parent verifies file count and per-run freshness before merging.
  • A "stalled" child usually completed its write; check the filesystem first.
  • Scoped slice first (one directory, 20 records), report token cost, then scale.

Procedure

One-shot fan-out

  1. Decompose into independent units.
  2. Layer A pre-pass writes the manifest.
  3. Size chunks against the limits above; for more tasks than max_concurrent_children, issue bounded waves yourself.
  4. Layer B: one delegate_task(tasks=[...]); each task reads its slice, writes <run>/out_<i>.csv, prints a status word, stops.
  5. End the turn. As result messages arrive, read the files, verify, merge; the cross-cutting synthesis stays on the parent.

Adversarial convergence (finding-quality work)

  1. Independent attempts: the SAME question to N children (2-4) with DIFFERENT framings in each context, each writi
常见问题

什么时候不值得使用这项技能?

技能说明,当单元少于十个左右,或步骤必须依次执行时,应跳过它。

工作在重启后还能保留吗?

不能。技能说明它不会让辅助任务在重启后仍然保留。

工作保存在哪里?

保存在系统临时目录中一个唯一的运行文件夹里,而不是 /tmp 这样的固定路径。

详情

作者的原始描述

Plan-in-code fan-outs, adversarial verification, waves.

repo: NousResearch/hermes-agent

热度

GitHub 星标
260k
排名
#441
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能