DeepAgent - Multi-Agent Orchestration
DeepAgent extends OmniCoreAgent with autonomous multi-agent orchestration. It automatically breaks down complex tasks and delegates them to specialized subagents running in parallel.Quick Start
How It Works
DeepAgent extends OmniCoreAgent with two specialized tools:1. spawn_subagent
Spawns a single focused subagent.
2. spawn_parallel_subagents
Spawns multiple subagents that run in parallel.
Architecture
Memory-First Workflow
Why subagents write to memory instead of returning results:- Survives context resets - Findings persist even if the lead agentβs context is truncated
- Parallel execution - Multiple subagents can write concurrently without conflicts
- Incremental progress - Lead agent can read partial results before all subagents finish
- Token efficiency - Avoids bloating context with large intermediate outputs
DeepAgent vs OmniCoreAgent
| Feature | OmniCoreAgent | DeepAgent |
|---|---|---|
| Domain | User-defined | User-defined (same) |
| Tools | User-provided | User-provided + orchestration tools |
| Memory Backend | Optional | Always "local" (enforcement) |
| Orchestration | No | Automatic subagent spawning |
| Config Inheritance | N/A | Subagents inherit parent config |
| Best For | Single-agent tasks | Complex multi-step research/analysis |
Configuration
DeepAgent uses smart defaults optimized for multi-agent orchestration:Key Config Notes
memory_tool_backend: Always"local"(required for orchestration) - cannot be overriddenmax_steps: Increased to50to allow for multi-agent coordinationtool_call_timeout: Set to600sbecause subagents may do research, API calls, etc.
Full API
Use Cases
1. π¬ Multi-Domain Research
A DeepAgent can spawn subagents for different research angles:- Technical feasibility
- Market analysis
- Competitive landscape
- Cost projections
2. ποΈ Software Architecture Review
Spawn subagents to analyze different aspects:- Performance bottlenecks
- Security vulnerabilities
- Scalability concerns
- Code quality metrics
3. π Investment Due Diligence
Parallelize analysis of:- Financial health
- Market opportunity
- Team & execution
- Regulatory risks
4. π§ͺ Hypothesis Testing
Spawn subagents to:- Gather supporting evidence
- Find counterexamples
- Analyze edge cases
- Synthesize conclusions
Best Practices
β DO
- Use for complex tasks - DeepAgent shines when tasks have multiple independent subtasks
- Leverage memory - Design your task paths (
/memories/project_name/) for organization - Trust the LLM - Let the lead agent decide when to spawn subagents
- Check
max_steps- Increase if your orchestration needs many steps
β DONβT
- Override
memory_tool_backend- DeepAgent requires"local"memory for orchestration - Use for simple tasks - For single-step tasks, use OmniCoreAgent instead
- Hardcode subagent specs - Let the lead agent decide what specialists to spawn based on the query
Advanced Example: Custom Tools + DeepAgent
Cookbook Examples
- Basic:
cookbook/getting_started/first_deep_agent.py- Simple orchestration - Advanced:
cookbook/deep_agent/vula_due_diligence/- Full investment due diligence system
FAQ
Q: When should I use DeepAgent vs OmniCoreAgent? A: Use DeepAgent when your task has multiple independent subtasks that can benefit from parallel execution. Use OmniCoreAgent for single-agent workflows. Q: Can I nest DeepAgents? A: Technically yes (subagents are OmniCoreAgents), but itβs rarely needed. The lead DeepAgent is usually sufficient for 2-3 levels of delegation. Q: What if I want to use Redis memory? A: DeepAgent enforces"local" memory backend for orchestration. If you need Redis for session persistence, use OmniCoreAgent instead or implement custom memory logic.
Q: How do I monitor subagent progress?
A: Enable event streaming and filter for sub_agent_started, sub_agent_result, and sub_agent_error events.