Agent skill · software engineering · jeremylongshore

langchain-deep-agents

Build a LangGraph 1.0 Deep Agent \u2014 planner + subagents + virtual\

Why this skill is useful

Adds a complete implementation guide for building LangChain Deep Agents with executable patterns and specific configurations that aren't widely documented.

What it needs

Requires langchain-anthropic, langchain-core, langchain-openai, langgraph, python installed locally. Requires anthropic, openai account access. About 10k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

LangChain Deep Agents (Python) Overview 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. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/langchain-deep-agents--4cbd1e

View the source on GitHub

Browse the @skills marketplace