Skip to main content

Overview

DeepAgent extends the base Agent with advanced capabilities for handling complex, multi-step tasks. It automatically manages todo lists, provides a virtual filesystem, and can spawn subagents for focused work.

Key Features

  • Planning and Todo Management: Break down multi-step objectives with automatic status tracking
  • Virtual Filesystem: Create, read, edit files in an isolated environment
  • Subagent System: Spawn specialized agents for focused tasks
  • Automatic Completion Loop: Ensures all todos are completed (up to 10 iterations)
  • Persistent Memory: Maintains context and files across workflows

Example

from upsonic import DeepAgent, Task

# Create a deep agent
agent = DeepAgent("openai/gpt-4o")

# Create a complex task
task = Task(
    description="Research Python web frameworks and create a comparison report"
)

# Execute - agent will automatically create todos and manage the workflow
result = agent.do(task)
print(result)