Sub-agent
A sub-agent is an agent that receives a subtask from a harness and works with its own context, and often its own sandbox.
A sub-agent is an agent that a parent agent or harness starts to handle one part of a larger task. It receives a description of the subtask and runs its own agent loop. It works with its own context, separate from the context of the parent. When it finishes, it returns a result to the parent.
Sub-agents appear in multi-agent designs. In such a design, the harness splits a task into subtasks, hands them to sub-agents, and merges their results. This keeps the context of each agent short and focused on its own work. It also lets independent subtasks run at the same time.
Each sub-agent often gets its own sandbox, so that its file changes and processes do not interfere with the others. The parent decides which tools and permissions each sub-agent receives. Running many sub-agents at once multiplies the demand for compute and for model calls. The results of sub-agents still need review, because the parent sees only the summaries they return.
Related terms