1. What’s Wrong with Ordinary Agents?
Anyone who has worked with LLM Agents knows the feeling: ask it a simple question or call an API — works great. But the moment the task gets complex — “research our competitors, organize the findings into a report, and save it to a file” — things start to fall apart.
The root problem is that traditional Agents are shallow. Their core architecture is a ReAct loop: think → call a tool → think again → call another tool. That loop handles quick, simple tasks just fine. But for work that requires multi-step planning, managing large amounts of context, and breaking problems into sub-tasks, it gets lost — forgetting what it was doing, drowning in a full context window, or stubbornly pursuing a single path without knowing how to decompose the problem.
Why are products like Deep Research, Manus, and Claude Code so powerful? Because on top of the ReAct loop, they implement four critical capabilities: task planning and decomposition, file-system context management, sub-agent delegation, and long-term memory.
LangChain’s team has now abstracted these four patterns into a ready-to-use open-source framework — Deep Agents.
2. What Is Deep Agents?
Deep Agents is an Agent framework officially released by LangChain, built on top of LangChain + LangGraph. The inspiration comes directly from Claude Code — the official README explicitly states that the project “was originally largely an attempt to understand what makes Claude Code so general, and to try to make it more general.”
Its positioning is an Agent harness — not another chatbot wrapper, but a production-ready foundation that lets developers quickly build Agent applications capable of handling complex, long-horizon tasks.
Core Capabilities at a Glance
Planning Tool
Before executing a task, the Agent performs structured planning, breaking complex work into a TODO list with status tracking (pending / in_progress / completed), preventing it from losing its way mid-execution.
Filesystem Backend
The Agent can read and write files, persisting intermediate results to break through context window limitations. The filesystem backend is swappable: in-memory, local disk, cloud persistent storage, or sandboxed environments can all be plugged in.
Subagent Spawning
The main Agent can delegate sub-tasks to independent child Agents that run concurrently, enabling isolated, parallel task processing and dramatically improving throughput on complex workflows.
Long-term Memory
Cross-session memory management so the Agent no longer suffers from amnesia between conversations.
Provider Agnostic
Compatible with Claude, OpenAI, Google, and every other model LangChain supports — switch providers with a single line of code.
Production-Grade Runtime
Built on LangGraph, with native support for streaming output, persistence, checkpointing (resume from breakpoints), and human-in-the-loop approval.

3. How to Use It
3.1 Installation
pip install deepagents
# or with uv (recommended)
uv add deepagents
3.2 The Simplest Way — Up and Running in 5 Lines
from deepagents import create_deep_agent
agent = create_deep_agent()
result = agent.invoke({
"messages": [{"role": "user", "content": "Research LangGraph and write a summary"}]
})
The Agent automatically handles planning, file I/O, and context management — no manual intervention required.
3.3 Custom Model, Tools, and System Prompt
from langchain.chat_models import init_chat_model
from deepagents import create_deep_agent
agent = create_deep_agent(
model=init_chat_model("openai:gpt-4o"), # swap in any supported model
tools=[my_custom_tool], # inject custom tools
system_prompt="You are a professional research assistant.",
)
3.4 MCP Tool Integration
Deep Agents supports the MCP (Model Context Protocol) via langchain-mcp-adapters, allowing you to plug in tools from any MCP Server directly and significantly expand the Agent’s capability boundary.
3.5 CLI Coding Agent
If you’d rather not write code, Deep Agents also ships a ready-to-use terminal Agent with an experience similar to Claude Code or Cursor:
# One-line install (OpenAI by default)
curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash
# With Anthropic and Groq support
DEEPAGENTS_EXTRAS="anthropic,groq" curl -LsSf \
https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash
The CLI version adds: session resumption, web search, remote sandboxes (Modal / Runloop / Daytona), persistent memory, custom skills, and human-in-the-loop approval.
3.6 Observability (Recommended)
Pair with LangSmith to get full trace visibility into every Agent step — great for debugging and evaluation:
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=your_key_here
4. Project Structure and Ecosystem
Deep Agents is not a single library but a growing ecosystem:
| Sub-project | Description |
|---|---|
deepagents (Python SDK) | Core Agent framework — the foundation for building complex Agents |
deepagents-cli | Terminal coding Agent, comparable to Claude Code |
deepagentsjs | TypeScript version for frontend / full-stack developers |
deep-agents-ui | Open-source Web UI for interacting with Deep Agents |
deep-agents-from-scratch | Teaching repo for understanding Deep Agent internals from first principles (5 progressive Notebooks) |
5. Summary
Deep Agents does something genuinely practical: it distills the common patterns behind “deep Agents” like Claude Code and Deep Research, and makes them available to every developer in an open, extensible form.
Its core value lies in four areas:
Lower barrier to building complex Agents — planning, filesystem management, and sub-Agent orchestration are all built in; no need to wire them up from scratch.
Production-ready — the LangGraph foundation provides streaming, persistence, and checkpoint/resume as first-class features.
Highly customizable — models, tools, and backends are all swappable; no lock-in to any specific vendor.
Complete ecosystem — from SDK to CLI, from Python to TypeScript, from debugging tools to learning materials, the surrounding infrastructure is solid.
If you are building AI applications that need to handle complex, multi-step tasks, Deep Agents is worth evaluating as your go-to framework.
Repository: https://github.com/langchain-ai/deepagents
Official Docs: https://docs.langchain.com/oss/python/deepagents/overview