Subagents
What it is
Specialist agents coordinated by a main session for bounded research, coding, writing, or verification tasks.
In plain terms
Think of a photo lab accepting one envelope that contains three rolls of film: the rolls can be developed side by side, but the lab returns the completed envelope after all three are ready. A Hermes batch works that way. Separate envelopes — separate top-level calls — come back separately. The workers do not share a conversation, yet they can still reach the same project files, so give each one a distinct output path.
Why it matters
Delegating a bounded piece of work — research, coding, writing, verification — to a specialist agent instance, rather than trying to do everything in one continuous context, is what subagents are for. This is the mechanism behind agent team delegation as a workflow pattern: a coordinator breaks a task down and hands pieces to subagents, then integrates whatever comes back. Each subagent typically gets its own session, so the isolation sessions provide is what keeps exploratory subagent work from polluting the coordinator’s own context.
How it works
A delegate_task call spawns a child agent with a fresh conversation, its own task_id-scoped terminal session, and inherited parent toolsets with delegate_task, clarify, memory, send_message, execute_code, and cronjob removed for a leaf child (tools/delegate_tool.py). The model-facing schema does not expose per-child toolsets or max_iterations; those limits come from configuration. A child defaults to role=‘leaf’ and cannot spawn subagents unless explicitly given role=‘orchestrator’, while delegation.max_concurrent_children caps concurrency. Top-level single-task calls run in the background and later return one final message. A top-level batch also runs in the background, but the entire batch has one handle and returns one consolidated message after all children finish. Orchestrator-child calls and delivery fallbacks run synchronously. Conversation and terminal state are separate; filesystem access is not sandboxed between children.
A concrete example
A user asks Hermes to research three competing pricing pages and summarize each. Hermes calls delegate_task with three task entries in one batch, each with its own goal and background context, rather than researching each site in sequence. All three subagents run concurrently up to the configured limit while the main conversation remains available. When all three finish, Hermes delivers one consolidated message containing the three final summaries. To receive summaries independently, the coordinator must make three separate top-level calls instead. The tasks may share the same filesystem, so none should edit the same output file.
How it connects
This note belongs to the Interfaces family. Its closest neighboring concepts are: Live Preview, Hermes Desktop, Agent Runtime, Personal OS.
Source evidence
vendor/hermes-agent/tools/delegate_tool.py#<file>— Structural Source Map fallback for tools/delegate_tool.py. A core source file in the Tools, Toolsets, and MCP — Other Core Files structure within Tools, Toolsets, and MCP.
Workflows
- Agent Team Delegation
Related articles
- Mastering Hermes Desktop: From Local Chat App to an Always-On Agent Control Center
- Ten Hermes Workflows That Turn a Chatbot into a 24/7 Assistant
- Ten Underused Hermes Features That Reveal Its Real Power
