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.
Install / Use
/learn @langchain-ai/DeepagentsREADME
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_todosfor task breakdown and progress tracking - Filesystem —
read_file,write_file,edit_file,ls,glob,grepfor reading and writing context - Shell access —
executefor running commands (with sandboxing) - Sub-agents —
taskfor 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.
Quickstart
pip install deepagents
# or
uv add deepagents
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.
Customization
Add your own tools, swap models, customize prompts, configure sub-agents, and more. See the documentation for full details.
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.
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.
<p align="center"> <img src="libs/cli/images/cli.png" alt="Deep Agents CLI" width="600"/> </p>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 for the full feature set.
LangGraph Native
create_deep_agent returns a compiled LangGraph 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 deepagentsand you have a working agent - Customize in minutes — Add tools, swap models, tune prompts when you need to
Documentation
- docs.langchain.com – Comprehensive documentation, including conceptual overviews and guides
- reference.langchain.com/python – API reference docs for Deep Agents packages
- Chat LangChain – Chat with the LangChain documentation and get answers to your questions
Discussions: Visit the LangChain Forum to connect with the community and share all of your technical questions, ideas, and feedback.
Additional resources
- Examples — Working agents and patterns
- Contributing Guide – Learn how to contribute to LangChain projects and find good first issues.
- Code of Conduct – 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 for more information.
Related Skills
node-connect
337.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.3kCommit, push, and open a PR
