Deep Agents Documentation (LangChain)
by LangChain
LangChain's opinionated agent harness — planning, subagents, a virtual filesystem and permissions, assembled for you.
Overview
Deep Agents is described in its own README as "the batteries-included agent harness": an opinionated library that packages the patterns long-horizon agents keep reinventing. The documentation organises capability into four areas. Execution environment covers tools, a virtual filesystem with pluggable backends, declarative filesystem permission rules, and code execution via sandboxes and interpreters. Context management covers Skills for domain knowledge, memory backed by AGENTS.md files, automatic summarisation and context offloading, and prompt caching that is on by default for Anthropic and Bedrock Claude or Nova models. Delegation covers an opt-in write_todos planning tool and a task tool that spawns ephemeral subagents with fresh, isolated context windows that run to completion and return one consolidated result. Steering covers human-in-the-loop approval through LangGraph interrupts. The core API is create_deep_agent(model, tools, system_prompt, ...), with behaviour assembled from a middleware stack — FilesystemMiddleware, TodoListMiddleware, SubAgentMiddleware and provider-specific caching middleware. Filesystem backends include StateBackend for in-memory state, FilesystemBackend for local disk, StoreBackend for the LangGraph store, a composite router and sandbox backends, all exposing ls, read_file, write_file, edit_file, delete, glob, grep and, for sandboxes, execute. Nav pages run Overview, Quickstart, Customization, Tools, Backends, Permissions, Skills, Memory, Context Engineering, Multimodal, Subagents, Task Planning, Human-in-the-Loop, Sandboxes, Interpreters, Event Streaming, Profiles, Going to Production, ACP and a direct comparison against the Claude Agent SDK. The MIT-licensed repository has roughly 28.3k stars, with a separate deepagentsjs port for TypeScript.
At a Glance
- Topic
- Agentic
- Level
- Intermediate
- Format
- Documentation
- Cost
- Free
- Duration
- ~1 hour quickstart; ~6-8 hours to work through the full documentation
- Provider
- LangChain
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Assemble a long-horizon agent with create_deep_agent instead of hand-rolling the loop
- ✓Isolate context by delegating subtasks to ephemeral subagents via the task tool
- ✓Choose between state, filesystem, store, composite and sandbox backends for agent files
- ✓Constrain what an agent can touch using declarative filesystem permission rules
- ✓Add planning with the opt-in write_todos tool and read the resulting trace
- ✓Insert human approval steps using LangGraph interrupts for irreversible actions
- ✓Package reusable domain knowledge as Skills and persistent memory as AGENTS.md
- ✓Decide when deepagents is the right harness versus the Claude Agent SDK
Highlights
- •The four hard parts of agent engineering — planning, delegation, files, steering — are already wired together
- •Runs on the LangGraph runtime, so you inherit durable execution, streaming and interrupts for free
- •Pluggable filesystem backends mean the same agent code works in memory, on disk or in a sandbox
- •Ships an explicit, non-defensive comparison page against Anthropic's Claude Agent SDK
- •MIT licensed with ~28.3k GitHub stars and a maintained TypeScript port
Who It’s For
Best For
- ✓Python engineers who have outgrown a single tool-calling loop
- ✓Teams building research, migration or coding agents that run for many steps
- ✓LangGraph users who want the harness patterns without writing the graph themselves
Prerequisites
- •Comfortable Python and experience calling an LLM with tools
- •Basic familiarity with LangChain or LangGraph concepts
- •Understanding of why context window management matters for agents
FAQ
What is Deep Agents Documentation (LangChain)?
Documentation for deepagents, an opinionated harness for long-horizon agents built on LangChain and running on the LangGraph runtime. Instead of assembling a planner, a subagent mechanism, a filesystem and human-in-the-loop approvals yourself, you call create_deep_agent and configure middleware. Aimed at engineers who have already outgrown a simple tool-calling loop and need context isolation, durable execution and file-backed state.
Is Deep Agents Documentation (LangChain) free?
Deep Agents Documentation (LangChain) is free to access.
What level is Deep Agents Documentation (LangChain) for?
Deep Agents Documentation (LangChain) is aimed at a intermediate audience. Recommended background: Comfortable Python and experience calling an LLM with tools, Basic familiarity with LangChain or LangGraph concepts, Understanding of why context window management matters for agents.
How long does Deep Agents Documentation (LangChain) take?
Expect roughly ~1 hour quickstart; ~6-8 hours to work through the full documentation. Most learners work through it at their own pace.
What will I learn from Deep Agents Documentation (LangChain)?
You'll learn: Assemble a long-horizon agent with create_deep_agent instead of hand-rolling the loop; Isolate context by delegating subtasks to ephemeral subagents via the task tool; Choose between state, filesystem, store, composite and sandbox backends for agent files; Constrain what an agent can touch using declarative filesystem permission rules; Add planning with the opt-in write_todos tool and read the resulting trace; Insert human approval steps using LangGraph interrupts for irreversible actions; Package reusable domain knowledge as Skills and persistent memory as AGENTS.md; Decide when deepagents is the right harness versus the Claude Agent SDK.
Topics
Sources
This page was written from 3 sources, 2 on domains other than docs.langchain.com.