Delegation Configuration¶
Delegation Configuration refers to the specific settings within the Hermes Agent system that control the behavior, scope, and hierarchy of spawned subagents. By tuning these parameters, users can manage task parallelism, prevent recursive runaway, enforce isolation boundaries, and optimize resource usage during multi-agent workflows^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md].
Core Settings¶
These are the primary configuration options available in the delegation block^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]:
- max_concurrent_children: Defines the maximum number of subagents allowed to run simultaneously^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. The default value is 5.
- max_spawn_depth: Controls the maximum nesting level of subagent hierarchy (valid range typically 1-3)^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md].
1: Single layer only; the agent cannot spawn further subagents.2: Two layers (Parent -> Child -> Grandchild).- Caution: Deeper nesting increases token consumption and API costs linearly^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md].
- **orchestrator_enabled
: A global boolean switch^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. If set tofalse`, all agents with the "orchestrator" role are downgraded to "leaf" agents, effectively disabling recursive delegation regardless of depth settings. - **subagent_auto_approve
: Determines whether dangerous commands executed by subagents require manual approval^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. The default isfalse` (manual approval required) to maintain safety. - model
&provider`: Optional settings to assign specific LLM models or API providers to subagents^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. This is commonly used to route subagent tasks to more cost-effective models (e.g., GPT-4o-mini) while keeping the main agent on a more powerful model.
Role Hierarchy¶
Delegation configuration interacts directly with agent roles to determine capabilities^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]:
- Leaf Agent: The default role. Capable of independent execution but strictly forbidden from using the
delegate_tasktool. It represents the "worker" tier. - Orchestrator Agent: Enabled by configuration, this role can use
delegate_taskto spawn further subagents, creating hierarchical trees for complex task decomposition.
Tool Isolation¶
To ensure stability and prevent recursive loops, specific tools are restricted within the delegation context^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]:
- Blocked for Leaves:
delegate_task,clarify,memory,send_message, andexecute_codeare typically disabled for standard leaf agents to force step-by-step reasoning and prevent side effects. - Orchestrator Privileges: When an agent is configured as an
orchestrator, thedelegate_tasktool is re-enabled to allow task breakdown, while other restricted tools generally remain blocked to maintain control.
Best Practices¶
- Start Small: When testing parallel workflows, begin with
max_concurrent_childrenset to 3 to avoid OOM (Out of Memory) errors or API rate limits^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. - Limit Depth: Keep
max_spawn_depthat 2 or lower unless absolutely necessary, as deep nesting dramatically increases token usage and latency^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. - Context Matters: When spawning agents, provide specific file paths or constraints in the
contextparameter to prevent agents from working on overlapping areas and causing file conflicts^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md]. - Cost Control: Use the
modelconfiguration to assign cheaper models to subagents performing routine tasks (like data collection or simple linting), reserving expensive models for the orchestrator or final synthesis^[001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md].
Related Concepts¶
- [[Orchestrator]]
- FileStateRegistry
- Multi-Agent Orchestration
- [[Hermes Agent v0.11]]
Sources¶
001-TODO__Hermes_Agent_v0.11_-_结构升级与实战工作流解读.md