Skip to main content

Usage

DeepAgent can spawn subagents to handle complex, multi-step independent tasks with isolated context. The task tool is automatically available.

Tool Signature

Available Subagent Types

  1. general-purpose: Automatically available, created with same model as parent
  2. Custom agents: Agents provided in the subagents parameter

When to Use Subagents

  • Complex independent tasks that can be fully delegated
  • Parallel processing of multiple related tasks
  • Specialized expertise requiring focused knowledge
  • Context isolation for heavy token usage

Basic Example

Custom Subagents Example

Parallel Subagents Example

Adding Subagents Dynamically

Key Points

  • Subagents execute autonomously and return a single result
  • Subagents have isolated context (no memory sharing)
  • Each subagent must have a name attribute
  • Use parallel subagents for independent tasks