delegate_task vs execute_code
People think delegate_task and execute_code both just run work side by side. In fact, they solve two quite different problems. delegate_task starts new agents that think for themselves and send back a summary. execute_code runs one Python script that calls tools in a set order and prints a result. Hand off work when each part needs thought. Use a script when you know the steps.
delegate_task Tool
The Hermes tool that gives work to helper agents and gets back short notes.
delegate_task is the Hermes Agent tool that starts child agents to do work on their own. Each child gets a fresh context, its own terminal and the parent's tools. Only its final summary comes back into the parent's chat. Up to 10 children can run at once by default. The parent can keep talking while they work, and gets their results as a new message.
execute_code Tool
The Hermes tool that runs one script to call many tools at once.
execute_code is the Hermes Agent tool that lets the agent write a Python script that calls its other tools. The script gets them from a hermes_tools module. It runs on the agent's own machine, in a process of its own. Many tool calls happen inside one turn. Only what the script prints comes back to the model, so the steps in between never fill the context.
In one line
- delegate_task Tool
- The Hermes tool that gives work to helper agents and gets back short notes.
- execute_code Tool
- The Hermes tool that runs one script to call many tools at once.