Skip to main content

Module task

Module task 

Source
Expand description

Task Tool for Spawning Subagents

The Task tool allows the main agent to delegate specialized tasks to focused child agents (subagents). Each subagent runs in an isolated child session with restricted permissions.

§Usage

{
  "agent": "explore",
  "description": "Find authentication code",
  "prompt": "Search for files related to user authentication..."
}

Structs§

ParallelTaskParams
Parameters for parallel task execution
ParallelTaskTool
ParallelTaskTool allows the LLM to fan-out multiple subagent tasks concurrently.
TaskExecutor
Task executor for running subagent tasks
TaskParams
Task tool parameters
TaskResult
Task tool result
TaskTool
TaskTool wraps TaskExecutor as a Tool for registration in ToolExecutor. This allows the LLM to delegate tasks to subagents via the standard tool interface.

Functions§

parallel_task_params_schema
Get the JSON schema for ParallelTaskParams
task_params_schema
Get the JSON schema for TaskParams