framework-selection
Framework selection guide for LangChain, LangGraph, and Deep Agents layered architecture.
- Layered frameworks where LangChain provides foundation primitives, LangGraph adds orchestration and control flow, and Deep Agents adds planning, memory, file management, and skill delegation
- Decision table guides framework choice based on task complexity: LangChain for single-purpose agents, LangGraph for custom control flow and loops, Deep Agents for multi-step planning and persistent sessions
- Deep Agents includes six built-in middleware modules (todo lists, filesystem, subagents, skills, memory, human-in-the-loop) that can be configured or extended
- Frameworks can be mixed in the same project; LangGraph graphs can be registered as subagents within Deep Agents, and LangChain primitives work across all layers
┌─────────────────────────────────────────┐
│ Deep Agents │ ← highest level: batteries included
│ (planning, memory, skills, files) │
├─────────────────────────────────────────┤
│ LangGraph │ ← orchestration: graphs, loops, state
│ (nodes, edges, state, persistence) │
├─────────────────────────────────────────┤
│ LangChain │ ← foundation: models, tools, chains
│ (models, tools, prompts, RAG) │
└─────────────────────────────────────────┘
Picking a higher layer does not cut you off from lower layers — you can use LangGraph graphs inside Deep Agents, and LangChain primitives inside both.
This skill should be loaded at the top of any project before selecting other skills or writing agent code. The framework you choose dictates which other skills to invoke next.
More from langchain-ai/langchain-skills
deep-agents-memory
INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.
7.7Klanggraph-fundamentals
INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
7.1Klangchain-fundamentals
Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.
6.7Klangchain-rag
INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).
6.6Klanggraph-persistence
INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.
6.6Klanggraph-human-in-the-loop
INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.
6.4K