Overview
Deep Agent extends the base Agent with powerful capabilities for handling complex, multi-step tasks that require planning, file management, and task delegation. Without Deep Agent, complex tasks can become overwhelming and disorganized. With Deep Agent, your agents can:- Plan complex tasks - Break down multi-step objectives into manageable todos
- Manage virtual files - Create, read, edit, and organize files in an isolated filesystem
- Delegate to subagents - Spawn specialized agents for focused, isolated work
- Track progress - Maintain todo lists and ensure all tasks are completed
- Persist state - Maintain context and files across complex workflows
Three Core Capabilities
Choose the capabilities that fit your needs:Capability | What It Does | Best For |
---|---|---|
Todo Management | Creates and tracks structured task lists | Complex multi-step projects, planning workflows |
Virtual Filesystem | Manages files in an isolated environment | File-based tasks, document creation, code projects |
Subagent System | Spawns specialized agents for focused work | Parallel processing, specialized expertise, context isolation |
Quick Start
Your First Deep Agent
Planning Complex Tasks
Working with Files
Using Subagents
Configuration Guide
Basic Deep Agent Setup
With Custom Instructions
With Specialized Subagents
File Management
How Deep Agent Works
Deep Agent operates with an automatic completion loop that ensures all tasks are finished:Before Each Task
- Sets up todo management tools
- Initializes virtual filesystem
- Prepares subagent delegation system
- Loads any existing state
During Task Execution
- Agent creates todos for complex tasks
- Works through todos systematically
- Uses virtual files to organize work
- Delegates to subagents when beneficial
- Updates todo status in real-time
After Task Execution
- Checks if all todos are completed
- If incomplete, creates continuation tasks
- Repeats until all work is finished
- Ensures all deliverables are created
Todo Management
When Deep Agent Creates Todos
Deep Agent automatically creates todos for:- Complex multi-step tasks (3+ distinct steps)
- Non-trivial projects requiring careful planning
- User-requested planning when explicitly asked
- Multiple related tasks provided by the user
- Projects requiring revision based on intermediate results
Todo States
State | Description | When to Use |
---|---|---|
pending | Task not yet started | Initial state for planned tasks |
in_progress | Currently working on | Mark before starting work |
completed | Task finished successfully | Mark immediately after completion |
Todo Management Rules
- Update constantly - Mark todos as “in_progress” before starting, “completed” after finishing
- Never stop until complete - Continue working until ALL todos show “completed”
- Create deliverables - Use virtual files to create requested outputs
- Verify completion - Check that all todos are done before finishing
Virtual Filesystem
File Operations
File Management Best Practices
- Use absolute paths - Always specify full file paths
- Read before editing - Always read files before making changes
- Preserve formatting - Maintain exact indentation and structure
- Organize logically - Use clear directory structures
Subagent System
Available Subagent Types
Type | Description | Best For |
---|---|---|
general-purpose | Full-featured agent with all tools | Research, analysis, complex tasks |
Custom agents | Specialized agents you define | Specific expertise, focused work |
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
- Quality assurance with review and validation
Subagent Lifecycle
- Spawn - Provide clear role, instructions, and expected output
- Run - Subagent completes task autonomously
- Return - Subagent provides single structured result
- Reconcile - Main agent incorporates results
Real-World Examples
Software Development Project
Research and Analysis
Content Creation Workflow
Tips and Best Practices
Choosing Deep Agent
- Use for complex tasks requiring 3+ steps or careful planning
- Use for file-based work where organization matters
- Use for parallel processing with multiple specialized agents
- Use for quality assurance with review and validation workflows
Planning and Organization
- Start with clear objectives - Define what success looks like
- Break down complex tasks - Use todos to track progress
- Use virtual files - Organize work in logical file structures
- Delegate appropriately - Use subagents for specialized work
Performance Optimization
- Parallelize when possible - Run independent tasks simultaneously
- Use appropriate models - Choose models that fit your task complexity
- Monitor progress - Check todo status regularly
- Complete thoroughly - Ensure all deliverables are created
Quality Assurance
- Review subagent work - Validate results from delegated tasks
- Test implementations - Verify code and solutions work
- Document thoroughly - Include clear explanations and comments
- Iterate and improve - Refine based on intermediate results