LangChain's ready-to-run agent harness with planning, a virtual filesystem, and subagents built in.
GitHub Stars
29.9K
Contributors
160
npm / Week
424.9K
6%PyPI / Month
5.6M
7%Deep Agents is an open source AI agent framework created by LangChain Inc. in 2025 to solve a clear engineering bottleneck: the complexity of building and stabilizing long-running, multi-step agent loops. While raw execution graph engines provide the base primitives for step-by-step execution, developers traditionally spend weeks manually implementing file systems, token-budget management, thread summarization, context eviction, and subagent delegation. The Deep Agents framework delivers these capabilities in an opinionated, batteries-included harness running directly on top of the LangGraph execution engine.
Occupying the agent runtime and orchestration space, Deep Agents bridges the gap between low-level graph orchestration and rigid agent frameworks. Rather than inventing another bespoke runtime, LangChain Inc. packaged Deep Agents as a specialized application harness over their existing infrastructure. It serves engineers who need a production-grade execution harness for complex workflows without having to hand-wire checkpoints, streaming protocols, or isolated subagent contexts from scratch. With an MIT license and nearly 30,000 GitHub stars, it has quickly become a notable contender among teams building autonomous systems.
The core philosophy of this Python agent framework is composability over lock-in. Deep Agents provides opinionated defaults optimized for deep work: task planning, pluggable filesystems, isolated subagent environments, and human approval gates. At the same time, it preserves the ability to swap, extend, or override any underlying component. If an engineering team wants to build agents with Deep Agents, they can start with the defaults on day one and progressively tailor the middleware, model providers, and backend stores as requirements scale.
The Deep Agents architecture relies on a clear, three-tier separation of concerns:
1Deep Agents -> Opinionated harness: planning, filesystem, profiles, subagents2LangChain -> Agent abstraction: models, tools, schemas, middleware3LangGraph -> Execution runtime: state graphs, checkpoints, streaming, interrupts
Developers interact with the framework through a code-first, imperative Python API centered on the create_deep_agent() factory function. Rather than declaring agents via rigid YAML or configuration files, developers assemble agents programmatically by passing LLM instances, tool lists, environment backends, and subagent graphs directly into the constructor.
When invoked, create_deep_agent() normalizes system prompts, mounts virtual filesystems, registers task delegation tools, and compiles the agent into an executable LangGraph instance. Control flow inside the loop follows a dynamic tool-calling pattern. If a tool call produces an exceptionally large output (such as raw database dumps, large code files, or web scrapes), the harness diverts that data to disk or a virtual backend instead of bloating the model context window. Subagents operate as isolated child graphs: they receive a delegated subtask, execute in their own ephemeral context, and return only the synthesized outcome back to the parent agent.
Deep Agents provides a concrete set of tools specifically designed to prevent context exhaustion and state degradation across long-horizon workloads.
The architectural design of Deep Agents targets scenarios that require sustained, multi-turn reasoning and environment interaction.
Teams use Deep Agents to build automated research analysts that decompose open-ended queries into structured research plans. The primary agent assigns specific questions to subagents, which query search engines, parse dense technical PDFs, and write intermediate notes to the virtual filesystem. The parent agent then inspects the accumulated files to draft comprehensive, cited reports without losing context midway through the run.
Because Deep Agents provides shell access and filesystem manipulation on remote or containerized backends, it serves as an effective harness for coding assistants. Developers deploy it within CI/CD pipelines or local terminal wrappers where the agent inspects repositories, applies multi-file code diffs, runs test suites, interprets tracebacks, and iterates until builds pass. Using local models via Ollama or vLLM makes it possible to run these coding agents entirely on-premise.
For multi-step document verification, regulatory filings, or reconciliation workflows, Deep Agents manages processes that exceed the capacity of a single context window. The agent can ingest batches of contracts, store structured extracts in persistent storage, and pause execution at critical decision gates to await human approval before committing updates to an external database.
Deep Agents is over-engineered for basic, single-turn interactions. If your application only requires a simple RAG query, a classification pipeline, or a low-latency chat interface with sub-second response requirements, the middleware and tool surface introduce unnecessary prompt overhead and token latency.
To install the Deep Agents Python agent framework, install the package from PyPI:
1pip install deepagents langchain-openai
The following Deep Agents tutorial snippet demonstrates how to configure an agent with a custom tool, planning capabilities, and the built-in virtual filesystem:
1import os2from deepagents import create_deep_agent3from langchain_openai import ChatOpenAI45# 1. Initialize the tool-calling model6model = ChatOpenAI(model="gpt-4o", temperature=0)78# 2. Define custom domain tools9def query_database(query: str) -> str:10 """Execute a read-only query against the analytics database."""11 return f"Result for: {query} -> 42 active enterprise accounts."1213# 3. Create the deep agent harness14agent = create_deep_agent(15 model=model,16 tools=[query_database],17 system_prompt="You are a data operations agent. Use the filesystem to organize complex tasks."18)1920# 4. Execute the agent graph21inputs = {"messages": [("user", "Analyze enterprise account growth and write a summary to report.txt")]}22for chunk in agent.stream(inputs, stream_mode="values"):23 latest_message = chunk["messages"][-1]24 latest_message.pretty_print()
To take this implementation to production, you will need:
Full API references and integration guides are maintained in the official LangChain documentation and the public langchain-ai/deepagents GitHub repository.
Selecting the right framework depends on whether you need a fully autonomous out-of-the-box system or granular graph control.
A frequent question is Deep Agents vs LangChain. LangChain is an foundational SDK containing broad model connectors, retrievers, and prompt abstractions. Deep Agents is an opinionated application harness built on top of LangChain. LangChain gives you the raw components, while Deep Agents wires those components into a pre-configured architecture with filesystems, planning, and subagent delegation already operational.
When evaluating Deep Agents vs CrewAI, the main difference lies in orchestration strategy. CrewAI organizes agents around role-playing personas, assigned tasks, and collaborative workflows. Deep Agents takes a systems-first approach rooted in LangGraph: subagents are isolated context instances rather than conversational role-players, and state management relies on explicit checkpoints and filesystems. Teams with complex, multi-step engineering tasks often prefer Deep Agents for its deterministic control, while CrewAI remains popular for rapid role-based ideation.
Is Deep Agents production ready? The underlying runtime (LangGraph) is widely deployed in enterprise production, providing mature checkpointing, streaming, and observability through LangSmith. However, the Deep Agents harness itself is still iterating rapidly in its pre-1.0 lifecycle on PyPI. While the architectural foundation is exceptionally strong, practitioners evaluating Deep Agents alternatives should expect occasional API refinements as the harness matures into the best agent orchestration framework for complex, long-running agent workloads.
What the framework gives you out of the box, in plain language.
Agents read, write, edit, and search files on local, sandboxed, or remote backends, and offload large tool results to disk.
Delegate tasks to general or specialist subagents that each run in their own context window. Any compiled LangGraph graph can also be a subagent.
Load reusable skills on demand and keep memory across sessions through pluggable state and store backends.
The jobs this framework is best suited for.
Agents that split a question into sub-tasks, send them to subagents, and write the findings to files before drafting a report.
Terminal or CI coding agents with shell access in a sandbox, using open-weight or local models instead of a single vendor.
Multi-step document and data tasks that outgrow one context window, with human approval before sensitive tool calls.

Side-by-Side
Add a second or third framework and see stars, downloads, and capabilities lined up next to each other.
An agent framework is the code your team uses to wire large language models into tools, memory, and human checkpoints. It is the connective tissue between an LLM call and a real task, like answering a support ticket or running a multi-step research workflow.
Deep Agents ships under the MIT license. The source code lives on GitHub, so you can read it, fork it, and run it on your own infrastructure if your team prefers self-hosting.
Deep Agents is primarily a Python project. Pick a framework that matches the language your team already ships in. The cost of a stack switch is almost always higher than the difference between two frameworks.