Skip to main content

What is Deep Agent?

Deep Agent extends the base Agent with powerful capabilities for handling complex, multi-step tasks that require planning, file management, and task delegation. It provides:
  • Planning and Todo Management - Break down multi-step objectives into manageable todos with status tracking
  • Virtual Filesystem - Create, read, edit, and organize files in an isolated filesystem
  • Subagent System - Spawn specialized agents for focused, isolated work
  • Automatic Completion Loop - Ensures all todos are completed before finishing (up to 10 iterations)
  • Persistent Memory - Maintains context and files across complex workflows using InMemoryStorage

How Deep Agent Works

Deep Agent operates with an automatic completion loop that ensures all tasks are finished: Before Each Task:
  1. Sets up todo management tools (write_todos)
  2. Initializes virtual filesystem (ls, read_file, write_file, edit_file)
  3. Prepares subagent delegation system (task tool)
  4. Loads any existing state from DeepAgentState
During Task Execution:
  1. Agent creates todos for complex tasks using write_todos
  2. Works through todos systematically
  3. Uses virtual files to organize work
  4. Delegates to subagents when beneficial
  5. Updates todo status in real-time (pending → in_progress → completed)
After Task Execution:
  1. Checks if all todos are completed
  2. If incomplete, creates continuation tasks automatically
  3. Repeats until all work is finished (max 10 iterations)
  4. Ensures all deliverables are created