langchain-ai/deep-agents
Build batteries-included agents with planning, context management, subagent delegation, and sandboxed execution. Use for complex, multi-step tasks that need built-in capabilities.
npx skills add https://github.com/langchain-ai/docs --skill deep-agents
Deep Agents is the easiest way to start building agents powered by LLMs—with built-in capabilities for task planning, file systems for context management, subagent delegation, and long-term memory. It is an "agent harness" built on LangChain core building blocks and the LangGraph runtime.
Use Deep Agents when you need to:
# Python
pip install deepagents
# JavaScript/TypeScript
npm install deepagents langchain @langchain/core
# pip install deepagents langchain-anthropic
from deepagents import create_deep_agent
def get_weather(city: str) -> str:
"""Get weather for a given city."""
return f"It's always sunny in {city}!"
agent = create_deep_agent(
model="anthropic:claude-sonnet-4-6",
tools=[get_weather],
system_prompt="You are a helpful assistant",
)
result = agent.invoke(
{"messages": [{"role": "user", "content": "What is the weather in SF?"}]}
)
# Install Deep Agents Code
pip install deepagents-code
# Run an interactive terminal agent
deepagents
| Capability | Description |
|-----------|-------------|
| Planning | Automatic task decomposition for complex requests |
| File system | Virtual filesystem for reading, writing, and managing context |
| Subagents | Spawn child agents for parallel subtask execution |
| Context management | Automatic context compression for long conversations |
| Sandboxed execution | Run code in isolated environments (Modal, Runloop, Daytona) |
| Protocols | ACP, MCP, and A2A support for interoperability |
For SDK class and method details, use the LangChain API Reference site:
https://reference.langchain.com/mcpTake langchain-ai/deep-agents from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference pip, npm.
Without those the skill loads but fails at the first command.