Deep Agents package.
Primary graph assembly module for Deep Agents.
Adapter for langchain_core's private deprecation helpers.
Middleware for the Deep Agents agent.
Middleware for providing subagents to an agent via a task tool.
Middleware for loading agent memory/context from AGENTS.md files.
Summarization middleware for automatic and tool-based conversation compaction.
Skills middleware for loading and exposing agent skills to the system prompt.
Middleware for async subagents running on remote Agent Protocol servers.
Backward-compatible re-export for filesystem permissions.
Middleware to patch dangling tool calls in the messages history.
Rubric middleware for self-evaluated agent iteration.
Middleware for providing filesystem tools to an agent.
Public beta APIs for model and harness profiles.
Provider profile package: ProviderProfile API and built-in providers.
Beta APIs for configuring model-construction behavior.
Harness profile package: HarnessProfile API and built-in registrations.
Beta APIs for configuring deep agent runtime behavior.
Memory backends for pluggable file storage.
StoreBackend: Adapter for LangGraph's BaseStore (persistent, cross-thread).
StateBackend: Store files in LangGraph agent state (ephemeral).
Shared utility functions for memory backend implementations.
Protocol definition for pluggable memory backends.
LocalShellBackend: Filesystem backend with unrestricted local shell execution.
Base sandbox implementation.
FilesystemBackend: Read and write files directly from the filesystem.
Composite backend that routes file operations by path prefix.
LangSmith sandbox backend implementation.
ContextHubBackend: Store files in a LangSmith Hub agent repo (persistent).
Middleware for async subagents running on remote Agent Protocol servers.
Compute default summarization settings based on model profile.
Return fields annotated with PrivateStateAttr across state schemas.
Looking for the JS/TS version? Check out Deep Agents.js.
To help you ship LangChain apps to production faster, check out LangSmith. LangSmith is a unified developer platform for building, testing, and monitoring LLM applications.
uv add deepagents
Deep Agents is an open source agent harness — an opinionated agent that runs out of the box. Extend, override, or replace any piece.
Principles:
Features include:
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": "Research LangGraph and write a summary"})
The agent can plan, read/write files, and manage its own context. Add your own tools, swap models, customize prompts, configure sub-agents, and more. For a full overview and quickstart of Deep Agents, the best resource is our docs.
Acknowledgements: This project was primarily inspired by Claude Code, and initially was largely an attempt to see what made Claude Code general purpose, and make it even more so.
LangGraph is the graph runtime. LangChain's create_agent is a minimal agent harness on top of it. Deep Agents is a more opinionated harness on top of create_agent — same building blocks, but with filesystem, sub-agents, context management, and skills bundled in. For how the three relate, see the LangChain ecosystem overview.
Yes. Any model that supports tool calling works — frontier APIs (OpenAI, Anthropic, Google), open-weight models hosted on providers like Baseten or Fireworks, and self-hosted models via Ollama, vLLM, or llama.cpp. Use any LangChain chat model.
Yes! Deep Agents is built on LangGraph, designed for production agent deployments. Pair it with LangSmith for tracing, evaluation, and monitoring. See Going to production for the full guide.
All three are layers in the same stack — see the LangChain ecosystem overview for how they relate. Use Deep Agents when you want the full harness — planning, context management, delegation — out of the box. Use LangChain's create_agent when you want a lighter harness without the bundled middleware. Drop to LangGraph when the agent loop itself isn't the right shape and you need a custom graph.
The layers compose: any LangGraph CompiledStateGraph can be passed in as a sub-agent to a Deep Agent, so custom orchestration plugs in alongside the harness's defaults.
See our Releases and Versioning policies.
Deep Agents follows a "trust the LLM" model. The agent can do anything its tools allow. Enforce boundaries at the tool/sandbox level, not by expecting the model to self-police. See the security policy for more information.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For detailed information on how to contribute, see the Contributing Guide.