delegation-tuning
Tune Hermes delegation for parallel subagent execution.
- License 许可
- MIT
- 所属仓库
- zapabob/Skills
- 最近更新
- 2026-10-26
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- delegation-tuning
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- platforms
- [ "linux", "macos", "windows" ]
- description
- Tune Hermes delegation for parallel subagent execution.
- metadata.hermes.config
- { "delegation.model": "string", "delegation.provider": "string", "delegation.max_spawn_depth": "int", "delegation.orchestrator_enabled": "bool", "delegation.child_timeout_seconds": "int or null", "delegation.subagent_auto_approve": "bool", "delegation.max_concurrent_children": "int" }
- metadata.hermes.category
- devops
02 资源文件 5
- 资产文件assets/module-help.csv112 B
- 资产文件assets/module.yaml96 B
- 脚本scripts/cleanup-legacy.py7.6 KB
- 脚本scripts/merge-config.py13.8 KB
- 脚本scripts/merge-help-csv.py6.5 KB
03 SKILL.md 正文
When to Use
Use this skill when you need to run multiple subagents in parallel via delegate_task and want to optimize throughput, reduce latency, or avoid hitting provider rate limits. Typical scenarios include:
- Running independent research tasks concurrently.
- Parallel code review or linting across multiple files.
- Batch processing of data where each chunk can be handled by a subagent.
Prerequisites
- Hermes Agent v0.19.0 or later.
- A working LLM provider configured for subagents (see
delegation.provideranddelegation.model). - Sufficient quota/rate limits on the chosen provider to handle increased concurrent requests.
How to Run
Adjust the delegation settings in ~/.hermes/config.yaml (or via hermes config set) then run your delegated task as usual. No special command is needed; the settings apply automatically to any delegate_task call.
Procedure
-
Set concurrency level Increase
delegation.max_concurrent_childrento the desired number of parallel subagents (default 3). Example:hermes config set delegation.max_concurrent_children 4 -
Choose provider and model for subagents By default subagents inherit the parent's provider/model. To override, set:
delegation.provider(e.g.,openai,nous,anthropic)delegation.model(e.g.,qwen3,gpt-4o-mini) Leave blank to inherit.
-
Control nesting depth Set
delegation.max_spawn_depthto allow orchestrator subagents to spawn their own workers.1(default): flat tree – only the parent can spawn workers.2or higher: enables nested orchestration.
-
Enable orchestrator role Ensure
delegation.orchestrator_enabledistrue(default) if you plan to userole: orchestratorin your delegation calls. -
Optionally allow auto‑approval of dangerous commands in subagents Set
delegation.subagent_auto_approve: trueonly if you trust the subagent's actions and want to skip approval prompts (use with caution). -
Set a wall‑clock timeout per subagent (optional) Configure
delegation.child_timeout_seconds(seconds) to kill stalled subagents. Set tonullor0to disable (default). -
Test the configuration Run a simple parallel delegation to verify behavior, e.g.:
hermes -z "Use delegate_task to run four tasks in parallel: each should echo its number (1‑4) and sleep 1 second. Return the results as a list."Observe that total time approximates the longest child runtime (≈1 s + overhead) rather than the sum.
Verification
- Check that the number of concurrent subagent processes matches
delegation.max_concurrent_children(visible viahermes process listor the delegation spinner in the TUI). - Confirm that child agent logs show the expected provider/model (if overridden).
- Ensure that increasing
max_concurrent_childrenreduces overall wall‑time for embarrassingly parallel workloads, up to the point of provider rate‑limit or resource saturation. - If you see frequent
child_timeouterrors, increasechild_timeout_secondsor investigate the subagent's workload for stalls.
Pitfalls
- Raising
max_concurrent_childrentoo high can cause provider‑side rate‑limit errors (HTTP 429). Monitor logs and back off if needed. - Setting
delegation.modelto a model not supported by the chosen provider will cause fallback errors; verify compatibility. - Enabling
subagent_auto_approvecan let subagents run destructive commands without oversight; only enable in trusted, sandboxed contexts. - Nested delegation (
max_spawn_depth> 1) increases API usage multiplicatively; plan quotas accordingly. - Delegation capture failure: If you see repeated
Delegation owner exited before recording a terminal result; outcome unknownerrors across multiple jobs, the delegation layer may be broken. In this case, bypass delegation entirely by running scripts directly in foreground mode usingterminal(command="py -3 script.py", workdir="path/to/script")to capture full output and exit codes.
Debugging Delegation Failures
When delegation consistently fails to capture results (showing status=unknown or Delegation owner exited before recording a terminal result):
-
Pause affected cron jobs to stop the delegation loop:
cronjob action=pause job_id=<job_id> -
Run the script directly in foreground mode to capture actual output:
terminal command="py -3 C:\\path\\to\\script.py" timeout=180 workdir="C:\\path\\to\\script\\dir" -
Examine the script directly to identify failure points:
read_file path="C:\\path\\to\\script.py" -
Fix identified issues (OAuth tokens, locks, timeouts, etc.) then resume the cron job.
This approach bypasses the broken delegation capture mechanism and provides reliable debugging visibility.
Quick Reference
| Setting | Example | Effect |
|---|---|---|
delegation.max_concurrent_children |
4 |
Number of subagents that can run in parallel per delegation call. |
delegation.provider |
openai |
LLM provider used by subagents (blank = inherit). |
delegation.model |
qwen3 |
Model name used by subagents (blank = inherit). |
delegation.max_spawn_depth |
2 |
Allows orchestrator subagents to spawn their own workers. |
delegation.orchestrator_enabled |
true |
Enables the orchestrator role for subagents. |
delegation.subagent_auto_approve |
false |
When true, skips dangerous‑command prompts in subagents. |
delegation.child_timeout_seconds |
120 |
Hard wall‑clock limit per subagent (seconds); null disables. |
04 同仓库更多 Skills
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
writing-plans
Write implementation plans: bite-sized tasks, paths, code.
whisper
OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.
weights-and-biases
W&B: log ML experiments, sweeps, model registry, dashboards.
watchers
Poll RSS, JSON APIs, and GitHub with watermark dedup.
serving-llms-vllm
vLLM: high-throughput LLM serving, OpenAI API, quantization.