Deep Agents = LangGraph + planning + file system + sub-agents + memory. One create_deep_agent() call. Production-ready out of the box.
# Shallow vs Deep
Claude Code, Manus, and Deep Research all use this pattern. Deep Agents packages it into a library.
# The 3-Layer Stack
Not a replacement for LangGraph. A layer on top. All three compose.
Deep Agents
Full harness. Planning + FS + sub-agents + memory. Start here.
create_agent
Minimal ReAct loop. Model + tools = working agent.
LangGraph
Raw graph runtime. Full control over everything.
# The 4 Superpowers
Auto-injected middleware. You get all four with zero config.
Planning
write_todos tool
Agent creates and checks off tasks. Stays focused across 50+ steps. Same pattern as Claude Code.
Virtual File System
read/write with permissions
Offloads large results. Stores artifacts. Context window never blows up.
Sub-Agents
isolated context workers
Delegate tasks to parallel workers. They run isolated, return results. Parent context stays clean.
Long-term Memory
LangGraph Store
Remembers preferences and decisions across sessions. Gets better with every use.
# .md Files Are the Brain
The real config layer isn't Python or YAML. It's plain markdown.
Change the markdown, change the agent. No redeployment. No code changes. Just edit a file.
Key insight: If you can write a README, you can program a production agent. The .md files are the agent.
# 5 Lines to Start
Everything else is handled by the harness.
from deepagents import create_deep_agent from langchain_openai import ChatOpenAI agent = create_deep_agent( model=ChatOpenAI(model="gpt-4o"), tools=[web_search, code_executor], system_prompt="You are a research expert.", ) # Planning, file system, sub-agents, memory - all built in. result = await agent.ainvoke({ "messages": [{"role": "user", "content": "Research quantum computing breakthroughs in 2026"}] })
# Pick Your Layer
Start at the top. Drop down only when needed.
| You need... | Use this |
|---|---|
| Quick chatbot, single tool | create_agent |
| Research, code gen, multi-step work | Deep Agents |
| Custom control flow, complex branching | LangGraph |
| Both: harness + custom sub-graph | Compose them |
Deep Agents is what happens when you package the Claude Code architecture into a library. Planning, file system, sub-agents, memory. One pip install. If you're building anything beyond a wrapper, this is your starting point in 2026.
Is Grep All You Need? Agent Harness Paper
A research team tested grep vs vector search inside AI agent loops. The harness matters more than retrieval.
Enjoyed this?
New episodes Mon, Thu, Sun.