Deep Agents Architecture
Planning, subagent spawning, and filesystem tool loop
Planning
Subagents
Filesystem
User / Caller
invoke() or stream()
Messages In
LangGraph Agent Loop
Tool-calling cycle
Claude Sonnet 4.6 default
create_deep_agent()
write_todos
Task breakdown & tracking
Updates state.todos
Subagent Pool
task() tool spawns isolated
agents with own context
General
Custom
Filesystem Backend
read_file, write_file, edit_file
ls, glob, grep
Pluggable: State | Store | Local | Sandbox
execute
Shell commands
Sandbox optional
Middleware Stack
TodoList | Filesystem | Subagent
Summarization | PromptCaching
Composable Pipeline
Auto-Summarization
Context compaction
Planning Flow
Subagent Spawning
Filesystem I/O
Core Data Flow