deepagents README

The project's README from github.com/langchain-ai/deepagents. As one markdown file: README.md.

Deep Agents Logo

The batteries-included agent harness.

PyPI - License PyPI - Downloads Version Twitter / X

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:

Deep Agents is available as a JavaScript/TypeScript library — see deepagents.js.

[!NOTE] Deep Agents Code — a pre-built coding agent in your terminal, similar to Claude Code or Cursor, powered by any LLM. Install with curl -LsSf https://langch.in/dcode | bash. See the documentation for the full feature set.

Quickstart

uv add deepagents
from deepagents import create_deep_agent

agent = create_deep_agent(
    model="openai:gpt-6-astra",
    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. See the documentation for full details.

[!TIP] For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.

FAQ

How is this different from LangGraph or LangChain?

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.

Does this work with open-weight or local models?

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.

Can I use this in production?

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.

When should I use Deep Agents vs. LangChain or LangGraph directly?

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.


Resources


Acknowledgements

Inspired by Claude Code: an attempt to identify what makes it general-purpose, and push that further.

Security

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.

deepagents (langchain-ai/deepagents)

long-term-memory
Searching Database…

What is this?Deep Agents is an open source, batteries-included agent harness from LangChain: an opinionated agent that runs out of the box with sub-agents, a filesystem, context management, and skills bundled in — and every piece can be extended, overridden, or replaced without forking.
Is this a library I build into my own code, or a finished app?A library: Python here, with deepagents.js as the JavaScript/TypeScript version. Under the hood it runs on the LangGraph runtime, which gives it streaming, persistence, and checkpointing for production deployments.
How do I get my first agent running?Follow the README quickstart: a freshly created Deep Agent can already plan, read and write files, and manage its own context. From there you add tools, swap models, customize prompts, and configure sub-agents per the docs.
Do I need an OpenAI or Anthropic key, or will any model do?Any model that supports tool calling works — frontier APIs like OpenAI, Anthropic, and Google, hosted open-weight models on providers such as Baseten or Fireworks, or self-hosted ones via Ollama, vLLM, and llama.cpp. Use any LangChain chat model.
It can run shell commands and edit files — what stops it from doing damage?Nothing by default: Deep Agents follows a 'trust the LLM' model, so the agent can do anything its tools allow. Enforce boundaries at the tool or sandbox level, and use the built-in human-in-the-loop mode to approve tool calls before they run.
So do I need to write code to use it?Yes — it's aimed at developers composing agents in Python or TypeScript with their own tools and models. If you're starting out, the repo has working examples, and the LangChain team runs free LangChain Academy courses.
What comes bundled out of the box?Sub-agents with isolated context windows, a pluggable filesystem (local, sandboxed, or remote backends), context management that summarizes long threads and offloads tool outputs to disk, shell access, persistent memory across sessions, human-in-the-loop approvals, loadable skills, and any MCP server as a tool.
How is it different from LangChain or LangGraph?They're layers of one stack: LangGraph is the graph runtime, LangChain's create_agent is a minimal harness, and Deep Agents is the opinionated full harness on top with planning, context management, and delegation included. The layers compose — any LangGraph graph can be passed in as a sub-agent to a Deep Agent.
What is Deep Agents Code?A pre-built coding agent for your terminal, similar to Claude Code or Cursor, but powered by any LLM you point it at. It installs with: curl -LsSf | bash.
Why build this when Claude Code exists?That's the stated inspiration: Deep Agents is an attempt to identify what makes Claude Code general-purpose and push it further — as an open source harness that works with any LLM and lets you override any piece.
Size
348.2 MB
Stars
30.4K
Age
1y
Commits · 90 Days