https://github.com/langchain-ai/deepagents
Agent harness built with LangChain and LangGraph. Equipped with a planning tool, a filesystem backend, and the ability to spawn subagents - well-equipped to handle complex agentic tasks.
https://github.com/langchain-ai/deepagents
ai deepagents langchain langgraph
Last synced: 2 days ago
JSON representation
Agent harness built with LangChain and LangGraph. Equipped with a planning tool, a filesystem backend, and the ability to spawn subagents - well-equipped to handle complex agentic tasks.
- Host: GitHub
- URL: https://github.com/langchain-ai/deepagents
- Owner: langchain-ai
- License: mit
- Created: 2025-07-27T23:07:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-04-02T01:30:31.000Z (2 months ago)
- Last Synced: 2026-04-02T05:03:30.333Z (2 months ago)
- Topics: ai, deepagents, langchain, langgraph
- Language: Python
- Homepage: https://docs.langchain.com/deepagents
- Size: 60.6 MB
- Stars: 18,641
- Watchers: 107
- Forks: 2,598
- Open Issues: 210
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-github-projects - deepagents - The batteries-included agent harness. ⭐22,829 `Python` 🔥 (🤖 AI & Machine Learning)
- awesome-agent-skills - LangChain Deep Agents - Framework: Agent harness with a skills-oriented workflow. (Phase 3: Build and Integrate / Developer Tools)
- awesome-harness-engineering - langchain-ai/deepagents - included agent harness (released April 2026) with built-in planning, filesystem tools, shell access, sub-agents, and auto-summarization. The clearest open-source demonstration of how a general-purpose coding agent harness can be made ready-to-run out of the box while remaining fully extensible.  (Reference Implementations / Demo Harnesses)
- awesome-agent-harness - Deep Agents - 07 | LangChain | Yes | (Agent Harness 🚀 / 5. The Convergence: Harness-as-a-Service (HaaS))
- awesome-LangGraph - `deepagents`
- awesome-production-agentic-systems - deepagents - ai/deepagents.svg?cacheSeconds=86400) - deepagents is a Python package that implements these in a general purpose way so that you can easily create a Deep Agent for your application. (Agentic Frameworks)
- awesome-prompts - langchain-ai/deepagents
- my-awesome - langchain-ai/deepagents - 05 star:22.8k fork:3.2k Agent harness built with LangChain and LangGraph. (Python)
- awesome-data-analysis - deepagents - LangChain framework for building sophisticated multi-agent systems. (🧠 AI Applications & Platforms / Tools)
- awesome-openclaw-skills - langchain-ai/deepagents
- AiTreasureBox - langchain-ai/deepagents - 04-07_19620_99](https://img.shields.io/github/stars/langchain-ai/deepagents.svg)|Agent harness built with LangChain and LangGraph. Equipped with a planning tool, a filesystem backend, and the ability to spawn subagents - well-equipped to handle complex agentic tasks.| (Repos)
- awesome-side-quests - langchain-ai/deepagents - based agent harness with planning tools, filesystem access, and web browsing (AI & LLM / Agents & Orchestration)
- awesome-ai-agents - langchain-ai/deepagents - Deep Agents is an open-source agent harness built on LangChain and LangGraph that enables AI agents to plan, execute, and delegate complex long-horizon tasks using customizable tools, subagents, and human-in-the-loop workflows. (Personal Assistants & Conversational Agents / Chatbots)
README
The batteries-included agent harness.
Deep Agents is an open source agent harness — an opinionated agent that runs out of the box. Extend, override, or replace any piece.
**Principles:**
- **Opinionated** — defaults tuned for long-horizon, multi-step work
- **Extensible** — override or replace any piece without forking
- **Model-agnostic** — works with any LLM that supports tool calling: frontier, open-weight, or local
- **Production-ready** — built on LangGraph (streaming, persistence, checkpointing) with first-class tracing, evaluation, and deployment via LangSmith
**Features include:**
- **Sub-agents** — delegate tasks to agents with isolated context windows
- **Filesystem** — read, write, edit, or search over pluggable local, sandboxed, or remote backends
- **Context management** — summarize long threads and offload tool outputs to disk
- **Shell access** — run commands in your sandbox of choice
- **Persistent memory** — pluggable state and store backends for cross-session recall
- **Human-in-the-loop** — approve, edit, or reject tool calls before they run
- **Skills** — reusable behaviors the agent can load on demand
- **Tools** — bring your own functions or any MCP server
> [!NOTE]
> Deep Agents is available as a JavaScript/TypeScript library — see [deepagents.js](https://github.com/langchain-ai/deepagentsjs).
## Quickstart
```bash
uv add deepagents
```
```python
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. See the [documentation](https://docs.langchain.com/oss/python/deepagents/overview) for full details.
> [!TIP]
> For developing, debugging, and deploying AI agents and LLM applications, see [LangSmith](https://docs.langchain.com/langsmith/home).
> [!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](https://docs.langchain.com/deepagents-code) for the full feature set.
## 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](https://docs.langchain.com/oss/python/concepts/products).
### 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](https://docs.langchain.com/oss/python/langchain/models).
### Can I use this in production?
Yes! Deep Agents is built on LangGraph, designed for production agent deployments. Pair it with [LangSmith](https://docs.langchain.com/langsmith/home) for tracing, evaluation, and monitoring. See [Going to production](https://docs.langchain.com/oss/python/deepagents/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](https://docs.langchain.com/oss/python/concepts/products) 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`**](https://docs.langchain.com/oss/python/langchain/agents) when you want a lighter harness without the bundled middleware. Drop to [**LangGraph**](https://docs.langchain.com/oss/python/langgraph/overview) 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
- [Examples](examples/) — working agents and patterns
- [Documentation](https://docs.langchain.com/oss/python/deepagents/overview) — conceptual overviews and guides
- [LangChain ecosystem overview](https://docs.langchain.com/oss/python/concepts/products) — how Deep Agents, LangChain, LangGraph, and LangSmith fit together
- [API reference](https://reference.langchain.com/python/deepagents/) — complete reference for all public classes, functions, and types
- [Discussions](https://forum.langchain.com/c/oss-product-help-lc-and-lg/deep-agents/18) — community forum for technical questions, ideas, and feedback
- [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview) — how to contribute and find good first issues
- [Code of Conduct](https://github.com/langchain-ai/langchain/?tab=coc-ov-file) — community guidelines and standards
---
## 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](https://github.com/langchain-ai/deepagents?tab=security-ov-file) for more information.