LangChain's premier framework for creating "deep agents" - sophisticated agents that do complex, open-ended tasks over longer time horizons.
Break down complex tasks with write_todos
read_file, write_file, ls, edit_file, grep_search
Delegate specialized tasks to focused subagents
State, Store, Filesystem, Composite backends
Large result eviction, conversation summarization
Automatic tool call repair
Perfect for: Complex research, code generation, chatbots, multi-step workflows, and production systems.
Read more: LangChain Blog - Doubling Down on DeepAgents →Choose where agent files are stored - transforms DeepAgents into a production-ready agent harness
Persistence: Thread only
Use Case: Scratch space (default)
Persistence: Forever
Use Case: Long-term memory, chatbots
Persistence: Forever
Use Case: Real project files, code analysis
Persistence: Mixed
Use Case: Hybrid strategies (best of all)
# Install SuperOptiX with DeepAgents support uv tool install superoptix --with "superoptix[frameworks-deepagents]" # REQUIRED: Install Gemini integration (or your preferred LLM provider) uv pip install langchain-google-genai # For Gemini (FREE!) # uv pip install langchain-anthropic # For Claude # uv pip install langchain-openai # For GPT-4
Note: Ollama models are NOT supported by DeepAgents (LangChain limitation). Use Gemini (FREE!), Claude, or GPT-4. For Ollama, use DSPy framework instead.
Get started with DeepAgents using FREE Gemini API
# Get FREE API key from https://aistudio.google.com/app/apikey export GOOGLE_API_KEY="your-gemini-api-key"
super agent pull research_agent_deepagents
super agent compile research_agent_deepagents --framework deepagents super agent run research_agent_deepagents --goal "What is LangGraph?" super agent evaluate research_agent_deepagents super agent compile research_agent_deepagents --framework deepagents --optimize super agent optimize research_agent_deepagents --auto light --framework deepagents --reflection-lm ollama:llama3.1:8b # Done! Agent optimized with local Ollama
SuperOptiX includes demo agents showcasing different backends
Basic research (ephemeral)
super agent pull research_agent_deepagents
Persistent chatbot with memory
super agent pull chatbot_persistent
Real file access for code review
super agent pull code_reviewer
Hybrid storage for complex agents
super agent pull researcher_hybrid
The main instruction to the agent - GEPA automatically analyzes performance, generates variations, tests each, and selects the best.
Key Innovation: GEPA optimizes DeepAgents agents even though they're not DSPy!
"You are an expert researcher.""You are an expert researcher. When answering questions:
1. Use write_todos to plan your research steps
2. Save findings to research_notes.md
3. Synthesize information before responding..."| Feature | DeepAgents | DSPy |
|---|---|---|
| Framework | LangGraph | DSPy |
| Strength | Complex multi-step tasks | Prompt optimization |
| Planning | Built-in write_todos | Manual implementation |
| Filesystem | Built-in tools | Manual implementation |
| Subagents | Native support | Manual composition |
| Ollama Support | ⚠️ Blocked (LangChain issue) | Full support |
| GEPA Optimization | system_prompt | All signatures (10+) |
DeepAgents shine with detailed instructions for role, goal, and backstory
Always include write_todos in tools for complex tasks
For long outputs, instruct agent to save to files
Get baseline working, then run GEPA to improve performance