langchain-ai / deepagents
- вторник, 17 марта 2026 г. в 00:00:02
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.
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:
write_todos for task breakdown and progress trackingread_file, write_file, edit_file, ls, glob, grep for reading and writing contextexecute for running commands (with sandboxing)task for delegating work with isolated context windowsNote
Looking for the JS/TS library? Check out deepagents.js.
pip install deepagents
# or
uv add deepagentsfrom 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.
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.
curl -LsSf https://raw.githubusercontent.com/langchain-ai/deepagents/main/libs/cli/scripts/install.sh | bashWeb search, remote sandboxes, persistent memory, human-in-the-loop approval, and more. See the CLI README for the full feature set.
create_deep_agent returns a compiled LangGraph graph. Use it with streaming, Studio, checkpointers, or any LangGraph feature.
uv add deepagents and you have a working agentDiscussions: Visit the LangChain Forum to connect with the community and share all of your technical questions, ideas, and feedback.
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.
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.