What makes an agent deep?
Most agents are a loop: call the LLM, run a tool, repeat. That works for short tasks and falls apart on long ones — the context window fills up, the model loses the plan, and quality degrades step by step.
DeepAgents is LangChain's answer: an open source agent harness built on LangGraph that ships the machinery long-horizon work needs — a planning tool, a virtual filesystem, subagent delegation, and system prompts tuned for multi-step tasks. You bring the model and the domain tools; the harness handles the rest.
DeepAgents turns a bare LLM loop into a long-horizon worker with a plan, a workspace, and a team.
A plain agent is a contractor with a phone and a hammer. DeepAgents gives that contractor a project plan, a filing cabinet, and the ability to call in specialists — same person, much bigger jobs.
The four pillars
DeepAgents is opinionated about what long-running agents need. Four built-in capabilities do the heavy lifting, and all of them exist for one reason: context engineering — keeping the model's working memory small and relevant as the task grows.
Why does this matter?
These are the same patterns behind Claude Code and other production agents. DeepAgents packages them as a library, so you get the architecture without rebuilding it — and it works with any tool-calling model: frontier APIs, hosted open-weight models, or local ones via Ollama and vLLM.
DeepAgents follows a trust-the-model philosophy: enforce boundaries at the tool and sandbox level — file permissions, isolated execution — not by expecting the LLM to police itself.
What ships in the box
One call to create_deep_agent gets you the full suite. Your custom tools merge with the built-ins.
First-class planning tool. The agent writes a structured checklist before executing and updates it as it works.
Read, write, edit, and search files. Declarative permission rules control which paths agents can touch.
Spawn general-purpose or specialized subagents for context isolation; async ones run long jobs in parallel.
Older messages get condensed and large outputs offload to files, so context stays useful over long sessions.
Reusable workflow packages — domain knowledge and custom instructions the agent loads on demand.
Interrupt and approval workflows for sensitive operations, plus streaming and checkpointing via LangGraph.
deepagentsjs is the TypeScript port, and Deep Agents Code is a pre-built terminal coding agent — Claude Code-style, powered by any LLM.
Code Examples
A research agent in ~20 lines. You supply one search tool; planning, filesystem, and subagents come built in.
create_deep_agent merges your internet_search tool with the built-ins: write_todos, filesystem tools, and task.
The agent plans first — it writes a todo list, searches, and offloads long results to virtual files instead of bloating context.
For big subtasks it can spawn subagents via task, then assembles the final report from its workspace.