Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jeremylongshore/langchain-deep-agents
Build a LangGraph 1.0 Deep Agent — planner + subagents + virtual filesystem + reflection loop — without the state-growth and prompt-inheritance traps.
Passed 20 of 22 test cases with the skill, and 14 of 22 without it.
and 5 more in the full report
6 fixed14 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
To prevent infinite execution loops when subagents fail to complete tasks, what maximum depth cap should be placed on the reflection node, and what action is taken when exceeded?
| Checked | Without skill | With skill |
|---|---|---|
| Caps reflection depth at 5 rounds | Missed | Passed |
| Outputs an escalate decision when max reflection depth is reached | Passed | Passed |
The instructions your model reads when the skill loads.
Two pains bite every team reproducing LangChain's late-2025 Deep Agents blueprint.
Virtual-FS state grows unboundedly (P51). The planner and every subagent
write plans, scratch notes, intermediate drafts, and tool outputs into
state["files"]. Nothing ever evicts them. After 50 tool calls, the checkpointed
state is 8 MB; every MemorySaver.put() takes 400 ms; a run that started
at 1.2 s per node visit ends at 2.5 s per node visit. The LangSmith trace viewer
times out loading the thread. The user sees latency doubling over the run with
no obvious tool-level culprit.
Subagent persona leak (P52). The naive prompt-composition inside the
blueprint APPENDS the subagent role message to the parent's system message
instead of replacing it. The research-specialist subagent receives:
"You are a senior planner coordinating subagents..." + "You are a research specialist..." — and responds as the planner. It produces generic task
decomposition instead of the specific lookup you asked for. The bug is invisible
in unit tests because both messages "sound right" to a reviewer.
This skill pins to langgraph 1.0.x + langchain-core 1.0.x and walks through
the four-component Deep Agent pattern — planner, subagent pool of 3-8
role-specialized workers, virtual filesystem with eviction, reflection
node with bounded depth 3-5 — and shows exactly how to avoid P51 (cleanup
node + checkpoint-on-boundary) and P52 (explicit SystemMessage(override=True)
for every subagent). Pain-catalog anchors: P51, P52.
langgraph >= 1.0, < 2.0 and langchain-core >= 1.0, < 2.0pip install langchain-anthropic or langchain-openailangchain-langgraph-agents (L26) — you already know create_react_agent,
tool schemas, recursion limitslangchain-langgraph-subgraphs (L30) — subagent ≈ subgraph with a bounded
contract; if L30 is not yet installed, the subagent construction in Step 3
is self-containedtest cases passed, vs 14 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.