[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-84147":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":10,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},84147,"hermes-dynamic-workflows","lingjiuu\u002Fhermes-dynamic-workflows","lingjiuu","Dynamic Workflows for hermes","",null,"Python",60,3,1,0,5,1.81,"MIT License",false,"master",true,[23,24,25,26,27,28,29],"dynamic-workflows","hermes-agent","hermes-plugin","multi-agent","nous-research","python","workflow-orchestration","2026-06-12 02:04:38","# Hermes Dynamic Workflows\n\n> **Claude-Code-style dynamic workflows for [Hermes Agent](https:\u002F\u002Fgithub.com\u002FNousResearch\u002Fhermes-agent).**\n\nEnglish | [简体中文](.\u002FREADME.zh-CN.md) | [日本語](.\u002FREADME.ja-JP.md)\n\nYou can now use **Dynamic Workflows** in Hermes: have the model write a sandboxed Python\nscript on the fly, execute it in the background runtime, and orchestrate large numbers\nof independent subagents with `agent()\u002Fparallel()\u002Fpipeline()` — ideal for codebase\naudits, large-scale migrations, and cross-validated research. Inspired by\n[Dynamic Workflows in Claude Code](https:\u002F\u002Fclaude.com\u002Fblog\u002Fintroducing-dynamic-workflows-in-claude-code).\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F06ef3d0d-4d89-48c4-9851-e1cae690e9b0\n\n## Quick Start\n\nInstall and enable in one line:\n\n```bash\nhermes plugins install lingjiuu\u002Fhermes-dynamic-workflows --enable\n```\n\n> Gateway users: run `hermes gateway restart` after installing.\n\nOnce it's installed, just tell Hermes \"run a workflow that …\" and you're set.\n\n### Live Dashboard (optional, requires a separate step)\n\n`hermes plugins install` only clones the plugin — it does not install its console\nscripts, so the dashboard command has to be installed once separately:\n\n```bash\npython3 \"${HERMES_HOME:-$HOME\u002F.hermes}\u002Fplugins\u002Fdynamic-workflows\u002Fscripts\u002Finstall-hermes-workflows.py\"\n# Installs to ~\u002F.local\u002Fbin\n```\n\nThen, in **a separate terminal**, run `hermes-workflows` to open the interactive\ndashboard, where you can watch the run list, per-phase\u002Fper-agent progress, and each\nsubagent's prompt and output in real time.\n\n## Configuration (optional)\n\nThe plugin reads the following section from Hermes's `~\u002F.hermes\u002Fconfig.yaml` (every key\ncan also be overridden via a `HERMES_DYNAMIC_WORKFLOWS_*` environment variable):\n\n```yaml\nplugins:\n  entries:\n    dynamic-workflows:\n      dynamic_workflows:\n        concurrency: 8                # Max concurrent agents (default: min(16, cpu-2))\n        max_concurrency: 16           # Hard cap on concurrency\n        max_agents: 1000              # Max total agents per run (runaway guard)\n        workflow_timeout_seconds: 900 # Wall-clock timeout for the whole run (excludes paused time)\n        child_timeout_seconds: 300    # Timeout for a single child agent\n        blocked_child_toolsets: [workflow, delegation, code_execution, memory, messaging, clarify]\n                                      # Toolsets child agents are forbidden to use\n        default_child_toolsets: [web, file, terminal, skills]\n                                      # Default toolsets for child agents (used when no agentType is given)\n        keep_worktrees: false         # Whether to keep each agent's git worktree (auto-cleaned by default)\n        allow_model_override: true    # Whether agent(model=...) may override the model\n        require_launch_approval: true # Require confirmation before a top-level workflow launches (denied if nobody is online)\n        child_approval_policy: inherit # Child agent approval policy: inherit|smart|deny|approve|ask\n        ask_fallback: smart           # Fallback when \"ask\" has no one to reach: smart|deny|approve\n        notify_on_complete: true      # Notify the originating CLI or gateway session on completion\n        notify_result_preview_chars: 2000  # Truncation length (chars) for the result preview in notifications\n```\n\n## Script API\n\nA workflow script is just a piece of async Python whose first statement is a literal\n`meta`; after that you orchestrate child agents using the sandboxed globals:\n\n```python\nmeta = {\n    \"name\": \"repo-audit\",\n    \"description\": \"Parallel review, then adversarial verify\",\n    \"phases\": [{\"title\": \"Review\"}, {\"title\": \"Verify\"}],\n}\n\n# Each target flows through review → verify independently\n# (pipeline has no barrier: A can be at verify while B is still at review)\nfindings = await pipeline(\n    args[\"targets\"],\n    lambda t, _o, i: agent(f\"Review for bugs: {t}\", {\"label\": f\"review:{i}\", \"phase\": \"Review\"}),\n    lambda r, _o, i: agent(f\"Verify adversarially: {json.dumps(r)}\", {\"label\": f\"verify:{i}\", \"phase\": \"Verify\"}),\n)\nreturn await agent(\"Synthesize the verified findings:\\n\" + json.dumps(findings))\n```\n\n- `agent(prompt, opts)` spawns a child agent; `opts` may include `schema` (enforce\n  structured output), `model`, `agentType`, and `isolation=\"worktree\"`.\n- `pipeline` (default, no barrier) \u002F `parallel` (with barrier) handle concurrency;\n  `phase`\u002F`log` report progress; `workflow()` runs a named workflow inline; `args` \u002F\n  `budget` access the input arguments and the token budget.\n\n### Agent Type\n\nSpecify a child agent's type via `agentType` in the script; if omitted, it defaults to\n`general-purpose` (full toolset):\n\n| Type | Toolset | Description |\n|------|---------|-------------|\n| `general-purpose` | `*` (all safe tools) | Default; good for searching code, researching complex problems, and multi-step tasks |\n| `explore` | Read-only (read_file, search_files, terminal) | Fast codebase exploration; good for locating files and searching keywords |\n| `plan` | Read-only (read_file, search_files, terminal) | Software architecture design; outputs a step-by-step implementation plan |\n| `verification` | web + file + terminal + browser | Verifies implementation correctness; runs build\u002Ftest\u002Flint to emit PASS\u002FFAIL |\n\nAgent types are resolved from three locations in priority order (on a name collision,\nearlier locations override later ones):\n\n1. `\u003Cproject>\u002F.hermes\u002Fdynamic-workflows\u002Fagents\u002F*.md`  — project level, applies only to the current project\n2. `~\u002F.hermes\u002Fdynamic-workflows\u002Fagents\u002F*.md`          — user level, applies globally\n3. `\u003Cplugin>\u002Fhermes_dynamic_workflows\u002Fagents\u002F*.md`    — built-in defaults (general-purpose\u002Fexplore\u002Fplan\u002Fverification)\n\nTo add a custom type, create a new `.md` file under directory 1 or 2 in the following format:\n\n```markdown\n---\nname: my-agent\ndescription: \"A short description of what this agent is for; the model uses it to automatically pick the right agent.\"\nmodel: inherit\ntoolsets: [web, file, terminal]\n---\n\nWrite the agent's system prompt here to guide its behavior, style, and constraints.\n```\n\n`name` and `description` are required; `model` defaults to `inherit` (inherits the\ncurrent session's model); `toolsets` defaults to the global `default_child_toolsets`;\noptional fields also include `allowed_tools`, `disallowed_tools`, and `isolation`.\n\nAt runtime the plugin persists the script and the full execution trace (transcript) of\nevery child agent, and injects a `\u003Ctask-notification>` into the conversation on\ncompletion — no polling required. Use `\u002Fworkflows` to view history and details.\n\n## Deep Dive\n\nFor implementation details (core execution path, tools and full call results, prompt\ncache, concurrency and limits, permission governance, rebuilding transcripts from\n`state.db`, sandboxing, resume…), see [TECHNICAL.md](.\u002FTECHNICAL.md).\n\n## License\n\n[MIT](.\u002FLICENSE)\n",2,"2026-06-11 04:12:24","CREATED_QUERY"]