Moving from Synchronous to Asynchronous Delegation

Previously, the Hermes Agent's delegate_task tool was strictly synchronous. When a parent agent spawned a subagent, the parent chat would freeze, waiting for the child to complete its task. This design prevented users from performing other operations or steering the agent while long-running tasks were in progress.

Nous Research has addressed this by introducing an asynchronous delegation toolset (via issue #5586). This update allows the parent agent to spawn background subagents that run as in-process threads, returning a task_id immediately so the main chat remains interactive.

Managing the Subagent Lifecycle

The new async toolset provides a full lifecycle management suite for background tasks:

  • delegate_task_async: Spawns a subagent and returns a task_id without blocking.
  • check_task: Monitors the status of a running subagent.
  • steer_task: Allows the user or parent agent to provide mid-flight guidance to a child agent.
  • collect_task: Retrieves the final summary once the subagent finishes.
  • cancel_task: Terminates a running subagent.

Architectural Constraints and Benefits

Subagents remain strictly isolated from the parent. Each child operates in its own conversation, terminal session, and toolset, ensuring the parent's context window stays lean. Only the final summary is returned to the parent agent. While subagents inherit the parent's API keys and credential pool, they can be configured to use different models via config.yaml to optimize for cost or performance.

This approach enables more complex workflows, such as running multiple research tasks in parallel or offloading long-running processes without interrupting the user's interaction with the primary agent.