If you have ever built an AI agent, you know the pattern. You wire up a tool-calling loop, add a few functions, write a prompt, and it works beautifully on the demo. Then a real task arrives that needs ten steps, three tool results too big for the context window, and one action you would never let it take without a human signing off. You end up rebuilding the same scaffolding every time: a planner, a way to offload big results, a way to delegate, an approval gate.
Deep Agents is LangChain’s answer to that problem. It is an open-source, batteries-included agent harness — a working autonomous agent you get out of the box, with all the reliability scaffolding baked in. Over 26,000 GitHub stars and counting, MIT-licensed, and model-agnostic. Here is what it actually does, how it works, and when you should reach for it.
What Is Deep Agents?
Deep Agents sits on top of LangGraph, which is LangChain’s graph runtime for building agents. But where LangGraph gives you low-level primitives to build agents from scratch, and LangChain’s create_agent gives you a minimal harness, Deep Agents goes further. It is an opinionated, fully wired agent loop with planning, filesystem access, sub-agents, context management, and human-in-the-loop — all enabled by default.
Think of it like the difference between Express.js and a full web framework. LangGraph gives you the primitives. Deep Agents gives you a working application with sensible defaults.
The key distinction is that Deep Agents is not locked into any specific model or cloud provider. You can run it with GPT-5, Claude, Gemini, DeepSeek, Llama, or any other model that supports tool calling — frontier, open-weight, or local. Since it returns a compiled LangGraph graph, you get streaming, persistence, and checkpointing for free.
Core Features
Planning With a Todo List
Deep Agents ships with a built-in write_todos tool. The agent breaks a complex request into discrete steps, tracks progress, and adapts the plan as it learns new information. This is the difference between an agent that charges off in one direction and one that thinks before it acts and course-corrects when things change.
Sub-Agents for Delegation
The harness includes a built-in task tool that lets the main agent spawn ephemeral sub-agents for isolated, long-running, or parallel tasks. Each sub-agent gets its own fresh context window, runs independently, and returns a single clean report to the parent.
This is a big deal for complex work. When a subtask would flood the main agent with intermediate noise — like searching a help center or analyzing a large dataset — the main agent hands it to a subagent. The subagent does all the messy work and returns only the result. The parent never sees the noise.
Deep Agents v0.5 added async sub-agents, which run on remote servers in the background while the main agent keeps working. This is an architecture-level shift that enables heterogeneous deployments where different agents run on different hardware with different models.
Virtual Filesystem
Instead of carrying giant search results or tool outputs in the conversation, the agent writes them to files and keeps only a reference. The context stays lean and the agent stays sharp across long runs. The filesystem is pluggable — you can back it with in-memory state, local disk, a remote sandbox, or a custom backend.
Operations include ls, read_file, write_file, edit_file, delete, glob, grep, and execute (with sandbox backends). It supports multimodal files too — PDFs, images, video, and audio can be stored and referenced.
Context Management
On top of the filesystem, the harness compresses conversation history automatically. Large tool results get offloaded to disk and replaced with lightweight references. Older messages get summarized. This prevents the context window overflow that kills most agents on long tasks.
For Anthropic models, prompt caching is enabled by default, reducing latency and cost on the static sections of the system prompt.
Human-in-the-Loop
You can mark specific tools as requiring approval. When the agent tries to call one, it pauses and hands control back to you to approve, edit, or reject before anything happens. This is what makes it safe to give an agent real powers like issuing refunds or modifying production data.
Skills and Memory
Skills are reusable bundles of specialized instructions, domain knowledge, and workflows the agent loads on demand. Think of them as plug-in behaviors. Unlike the system prompt, skills are not always in context — they are loaded only when relevant, which saves tokens.
Long-term memory uses LangGraph’s memory store, letting the agent remember across sessions instead of starting from zero every time.
How It Works Under the Hood
Deep Agents is built on a stacked middleware design. When you call create_deep_agent(), it composes a LangGraph agent with middleware modules for planning, filesystem access, sub-agents, summarization, caching, and more.
from deepagents import create_deep_agent
agent = create_deep_agent(
model="openai:gpt-5.5",
tools=[my_custom_tool],
system_prompt="You are a research assistant.",
)
result = agent.invoke(
{"messages": [{"role": "user", "content": "Research LangGraph and write a summary"}]}
)
That is the entire setup. The agent can plan, read and write files, manage its own context, and delegate to sub-agents. You can swap models, customize prompts, add your own tools, connect MCP servers, and override any piece of the middleware stack without forking the project.
Deep Agents vs Claude Code vs Codex CLI
The coding agent space has three main contenders right now. Here is how they compare:
| Feature | Deep Agents | Claude Code | Codex CLI |
|---|---|---|---|
| License | MIT (open-source) | Proprietary | Apache 2.0 (open-source) |
| Model Support | Any LLM | Claude only | OpenAI only |
| Sub-agents | Sync + Async | No | No |
| Context Management | Auto-summarize + offload | Proprietary | Basic |
| MCP Support | Yes | Yes | Yes (via config) |
| Virtual Filesystem | Pluggable backends | Direct filesystem | Direct filesystem |
| Deployment | Anywhere | Anthropic ecosystem | OpenAI ecosystem |
| Customizable | Fully | Limited | Limited |
| TerminalBench 2.0 | ~42.65% (Sonnet 4.5) | ~42% (same model) | ~38% |
| Price | Free (BYOK) | $17-200/month | $20-200/month |
The critical difference is model flexibility. Claude Code needs Anthropic models. Codex needs OpenAI models. Deep Agents lets you swap models per task — use a cheap model for routine sub-agent work, a capable model for the planner, and a local model for sensitive code.
Deep Agents scored roughly on par with Claude Code on TerminalBench 2.0 when both used the same underlying model. That is a significant result: it means the harness architecture itself — the planning, sub-agents, context management — is competitive with purpose-built proprietary agents.
However, Claude Code still has the more polished terminal experience, and Codex has stronger OS-level sandboxing. Deep Agents is more of a developer framework than a daily-driver coding assistant.
Deep Agents vs Hermes
Hermes takes a different approach — it is a personal AI agent that operates across your entire desktop, with skills, plugins, and multi-provider model routing built in. Deep Agents is more narrowly focused on building autonomous agents for developers and production systems.
If you are building agent-powered products or services, Deep Agents is the better fit. If you want a personal AI assistant that integrates with your daily workflow, Hermes is the play.
Installation and Getting Started
Install with pip or uv:
uv add deepagents
Or for the terminal coding agent specifically:
curl -LsSf https://langch.in/dcode | bash
For MCP server integration:
pip install langchain-mcp-adapters
The Python SDK is the primary interface. A JavaScript/TypeScript version is also available as deepagents.js.
When to Use Deep Agents
Reach for Deep Agents when:
- You want model flexibility and need to switch between providers
- The task is genuinely complex — multi-step, long-running, needs delegation
- You need human approval gates on sensitive operations
- You are building agent-powered products, not just using agents as tools
- You want production-ready infrastructure with tracing and deployment built in
- You are already in the LangChain ecosystem
Skip Deep Agents when:
- You just want the best single-agent coding experience and are committed to Claude — use Claude Code instead
- The task is simple enough for a plain agent loop with a few tools
- You prefer lighter frameworks without the LangChain dependency
- You need the most polished terminal UI for daily coding work
Auto Mode Is Now Generally Available
The biggest change in Deep Agents right now is that Auto mode went GA in deepagents-code 0.1.46 (July 24, 2026). If you have been following the project, Auto mode was previously an experimental feature. Now it is the recommended default for most workflows.
Here is what Auto mode does and why it matters.
When you give Deep Agents a task, it normally needs your approval before running commands, editing files, or taking any action that could change your system. Every action pops up a prompt asking you to confirm. For simple tasks this is fine. For complex, multi-step tasks — refactor an entire module, migrate a database schema, fix a flaky test suite — approving every single action becomes tedious. You end up clicking “yes” dozens of times for routine work you would have let the agent do anyway.
Auto mode solves this by letting the agent decide for itself which actions are safe to run without asking. It uses a classifier to evaluate each proposed action against your active goals and rubric directives. If the action aligns with what you told the agent to do, it runs automatically. If the action is outside the scope or looks risky, it asks for your approval.
The key improvements in the GA release:
- Configurable goal-criteria acceptance. You control how strictly the agent interprets your goals. Want it to ask for approval on anything ambiguous? Set strict mode. Want it to run freely as long as it stays on-topic? Set a looser threshold.
- Reduced approval fatigue. The agent now authorizes routine actions that fall within your stated goal or rubric directives, cutting the number of prompts you see during a typical session.
- Better failure reporting. When the classifier times out or hits an error, you see the actual reason in the transcript instead of a generic failure message. This makes it easier to tune your settings.
- Deduplicated notices. The “Auto mode enabled” notice now shows only the first time you turn it on per session, not on every model switch.
Alongside Auto mode, version 0.1.47 added YOLO mode to the Shift+Tab approval cycle. YOLO mode skips all approval prompts — the agent runs everything without asking. It is useful for tasks you fully trust the agent to handle, or for unattended background runs. The Shift+Tab shortcut now cycles through three approval modes: normal (ask on every action), Auto (classify and ask only when needed), and YOLO (never ask). You pick the mode that fits the current task.
These changes also shipped in the same window:
- Hooks v2 with capability snapshots and session transcripts. Hooks are the extension points where you inject custom logic into the agent loop. Hooks v2 adds a snapshot of the agent’s capabilities at hook time, plus full session transcripts you can inspect after the run.
- Agent recursion limit raised to 2,000. Previously the agent stopped after a fixed number of recursive steps. Now it can run up to 2,000 steps by default, and you can configure the limit. This matters for long-running tasks that need many iterations.
- Rubric grader improvements. The rubric grader — the component that scores the agent’s output against your criteria — can now inspect files in your working directory. It also shows defaults and has better help text.
Why Auto mode GA matters for the coding agent landscape: Claude Code has /permissions with auto-approve tiers. Codex has YOLO mode. Cursor has auto-accept for file edits. Deep Agents now has a third option that sits between “ask every time” and “never ask” — a classifier-driven approval system that adapts to your goals. For teams running agents in production, where the cost of approval fatigue is measured in developer hours, this kind of intelligent gating is a meaningful improvement.
The Bigger Picture
LangChain is not a startup building a single product. They are the most widely-used LLM framework, and Deep Agents is their opinionated take on what a production agent should look like, built on years of seeing what works and what does not in real deployments.
The project launched in mid-2025 and has grown rapidly — 223 releases, 140 contributors, and over 26,000 GitHub stars. The latest releases (0.1.46–0.1.47, July 24) made Auto mode the recommended approval strategy and added YOLO mode for fully unattended runs.
Deep Agents will not replace custom-built agents or even pure LangGraph workflows when you need precise control over the agent graph. But for the very common case of “I want an autonomous agent that can handle a complex, multi-step task without me writing a hundred lines of state management,” it dramatically lowers the barrier.
If you are building anything serious with AI agents, Deep Agents deserves a look. It is the most complete open-source agent harness available right now, and it fills a gap that nothing else does: a model-agnostic, embeddable, production-ready framework with real architectural depth.
Deep Agents is MIT-licensed and available at github.com/langchain-ai/deepagents. Documentation at docs.langchain.com/deepagents.