Hermes Dynamic Workflows is a plugin for Hermes Agent that lets the model write a sandboxed Python script on the fly, run it in the background runtime, and orchestrate many independent subagents from it. It targets work such as codebase audits, large migrations, and cross-validated research, and it follows the dynamic-workflows pattern introduced in Claude Code.
A workflow script is async Python whose first statement is a meta literal describing the run and its phases. Inside the script, agent(prompt, opts) spawns a child agent (with options for a structured-output schema, model, agentType, and isolation="worktree"), pipeline chains stages per item without a barrier, parallel runs with a barrier, and phase, log, workflow(), args, and budget handle progress, nesting, inputs, and token budgets. The plugin persists the script and each child's full transcript and injects a into the conversation when the run completes.
Configuration in ~/.hermes/config.yaml (or HERMESDYNAMICWORKFLOWS_* variables) sets concurrency, a hard cap of 1000 agents per run, wall-clock and per-child timeouts, toolsets children may or may not use, launch-approval requirements, and completion notifications. An optional hermes-workflows terminal dashboard shows run lists, per-phase progress, and each subagent's prompt and output live.
Features
- Model-written scripts: the agent authors a sandboxed Python workflow at request time
- Concurrency primitives: agent(), pipeline() (no barrier), and parallel() (with barrier)
- Agent types: built-in general-purpose, explore, plan, and verification types, plus custom types defined as Markdown files at project or user level
- Structured output: a schema option enforces the shape of a child agent's result
- Worktree isolation: child agents can run in their own git worktree, cleaned up by default
- Governance: launch approval, child approval policies, blocked toolsets, and runaway guards on agent count and time
- Persistence and history: scripts and transcripts stored in state.db, browsable with /workflows
- Live dashboard: a separately installed hermes-workflows console for watching runs
