Core Architecture
Planning Tool
Before executing, DeepAgents creates a structured plan:
agent = Agent(model="claude-sonnet-4-20250514", planning=True)
result = agent.run("Migrate the codebase from Express to Fastify")
# Agent creates a plan:
# 1. Analyze current Express routes and middleware
# 2. Create Fastify equivalents
# 3. Migrate route handlers
# 4. Update tests
# 5. Verify all endpoints workSub-Agent Spawning
Complex tasks get broken into subtasks, each handled by a specialized sub-agent:
from deepagents import Agent, SubAgent
researcher = SubAgent(role="researcher", model="claude-sonnet-4-20250514")
coder = SubAgent(role="coder", model="claude-sonnet-4-20250514")
reviewer = SubAgent(role="reviewer", model="gpt-4o")
agent = Agent(
sub_agents=[researcher, coder, reviewer],
workflow="research -> code -> review"
)
result = agent.run("Build a rate limiting middleware")Filesystem Backend
Persistent state across runs — agents remember previous work:
agent = Agent(
model="claude-sonnet-4-20250514",
backend="filesystem",
workspace="./agent-workspace"
)NVIDIA OpenShell Integration
Secure code execution in sandboxed containers for untrusted operations.
Key Stats
- 16,500+ GitHub stars
- Built on LangGraph by LangChain team
- Sub-agent spawning for complex tasks
- Filesystem persistence across runs
- TypeScript version available (deepagentsjs)
FAQ
Q: What is DeepAgents? A: DeepAgents is a multi-step agent framework by the LangChain team that uses planning, sub-agent delegation, and persistent state to handle complex development tasks beyond simple chat-based interactions.
Q: Is DeepAgents free? A: Yes, open-source under MIT license.
Q: How is DeepAgents different from LangChain? A: LangChain is a general LLM framework. DeepAgents is specifically designed for multi-step agentic tasks with built-in planning, sub-agent orchestration, and filesystem persistence.