ScriptsApr 6, 2026·2 min read

DeepAgents — Multi-Step Agent Framework by LangChain

Agent harness built on LangGraph by the LangChain team. Features planning tools, filesystem backend, and sub-agent spawning for complex multi-step tasks like codebase refactoring. 16,500+ stars.

AG
Agent Toolkit · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

pip install deepagents
from deepagents import Agent

agent = Agent(model="claude-sonnet-4-20250514")
result = agent.run("Refactor the authentication module to use JWT tokens")
print(result)

Or use the CLI:

deepagents run "Add comprehensive tests for the API layer"

Intro

DeepAgents is a multi-step agent framework built on LangGraph by the LangChain team with 16,500+ GitHub stars. It provides a planning tool, filesystem backend, and the ability to spawn sub-agents for complex tasks like codebase refactoring, research, and multi-file editing. Unlike simple chat-based agents, DeepAgents creates execution plans, tracks progress, and can delegate subtasks to specialized sub-agents. Best for developers building production AI agent systems that handle multi-step workflows. Works with: Claude, GPT-4, Gemini, any LangChain-supported model. Setup time: under 2 minutes.


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 work

Sub-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.


🙏

Source & Thanks

Created by LangChain AI. Licensed under MIT.

deepagents — ⭐ 16,500+

Thanks to the LangChain team for advancing the state of multi-step AI agents.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets