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: 20 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 (9 months ago)
- Default Branch: main
- Last Pushed: 2026-04-02T01:30:31.000Z (29 days ago)
- Last Synced: 2026-04-02T05:03:30.333Z (29 days 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-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)
- awesome-github-projects - 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. ⭐22,012 `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-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-data-analysis - deepagents - LangChain framework for building sophisticated multi-agent systems. (🧠 AI Applications & Platforms / Tools)
- awesome-openclaw-skills - langchain-ai/deepagents
- my-awesome - langchain-ai/deepagents - 04 star:20.8k fork:2.9k 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. (Python)
- 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)
README
The batteries-included agent harness.
Deep Agents is an agent harness. An opinionated, ready-to-run agent out of the box. Instead of wiring up prompts, tools, and context management yourself, you get a working agent immediately and customize what you need.
**What's included:**
- **Planning** — `write_todos` for task breakdown and progress tracking
- **Filesystem** — `read_file`, `write_file`, `edit_file`, `ls`, `glob`, `grep` for reading and writing context
- **Shell access** — `execute` for running commands (with sandboxing)
- **Sub-agents** — `task` for delegating work with isolated context windows
- **Smart defaults** — Prompts that teach the model how to use these tools effectively
- **Context management** — Auto-summarization when conversations get long, large outputs saved to files
> [!NOTE]
> Looking for the JS/TS library? Check out [deepagents.js](https://github.com/langchain-ai/deepagentsjs).
## Quickstart
```bash
pip install deepagents
# or
uv add deepagents
```
```python
from deepagents import create_deep_agent
agent = create_deep_agent()
result = agent.invoke({"messages": [{"role": "user", "content": "Research LangGraph and write a summary"}]})
```
The agent can plan, read/write files, and manage its own context. Add tools, customize prompts, or swap models as needed.
> [!TIP]
> For developing, debugging, and deploying AI agents and LLM applications, see [LangSmith](https://docs.langchain.com/langsmith/home).
## Customization
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.
```python
from langchain.chat_models import init_chat_model
agent = create_deep_agent(
model=init_chat_model("openai:gpt-4o"),
tools=[my_custom_tool],
system_prompt="You are a research assistant.",
)
```
MCP is supported via [`langchain-mcp-adapters`](https://github.com/langchain-ai/langchain-mcp-adapters).
## Deep Agents CLI
A pre-built coding agent in your terminal — similar to Claude Code or Cursor — powered by any LLM. One install command and you're up and running.
```bash
curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bash
```
**Highlights:**
- **Interactive TUI** — rich terminal interface with streaming responses
- **Web search** — ground responses in live information
- **Headless mode** — run non-interactively for scripting and CI
- Plus all SDK features out of the box — remote sandboxes, persistent memory, custom skills, and human-in-the-loop approval
See the [CLI documentation](https://docs.langchain.com/oss/python/deepagents/cli/overview) for the full feature set.
## LangGraph Native
`create_deep_agent` returns a compiled [LangGraph](https://docs.langchain.com/oss/python/langgraph/overview) graph. Use it with streaming, Studio, checkpointers, or any LangGraph feature.
## FAQ
### Why should I use this?
- **100% open source** — MIT licensed, fully extensible
- **Provider agnostic** — Works with any Large Language Model that supports tool calling, including both frontier and open models
- **Built on LangGraph** — Production-ready runtime with streaming, persistence, and checkpointing
- **Batteries included** — Planning, file access, sub-agents, and context management work out of the box
- **Get started in seconds** — `uv add deepagents` and you have a working agent
- **Customize in minutes** — Add tools, swap models, tune prompts when you need to
---
## Documentation
- [docs.langchain.com](https://docs.langchain.com/oss/python/deepagents/overview) – Comprehensive documentation, including conceptual overviews and guides
- [reference.langchain.com/python](https://reference.langchain.com/python/deepagents/) – API reference docs for Deep Agents packages
- [Chat LangChain](https://chat.langchain.com/) – Chat with the LangChain documentation and get answers to your questions
**Discussions**: Visit the [LangChain Forum](https://forum.langchain.com) to connect with the community and share all of your technical questions, ideas, and feedback.
## Additional resources
- **[Examples](examples/)** — Working agents and patterns
- [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview) – Learn how to contribute to LangChain projects and find good first issues.
- [Code of Conduct](https://github.com/langchain-ai/langchain/?tab=coc-ov-file) – Our community guidelines and standards for participation.
---
## 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.
## 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.