LangChain vs. LangGraph vs. Deep Agents: When to Use Each One
Summary
This video compares three open-source agent frameworks—LangGraph, LangChain, and Deep Agents—explaining their respective roles in the agent development stack. LangGraph provides the fundamental, durable runtime for building complex workflows using nodes and edges. LangChain builds abstractions on top of LangGraph, offering the popular ReAct agent architecture (a simple tool-calling loop) that can be customized via middleware. Deep Agents is a specialized, out-of-the-box harness built on LangChain, pre-integrating features like summarization, file system access, and sandboxes for long-running tasks. The choice between them depends on the required level of control versus ease of setup. Finally, LangSmith is introduced as the tool for managing the agent development lifecycle from prototype to production.
Key takeaways
-
LangGraph: The Durable Runtime
0:27
LangGraph is designed as a durable runtime for agents, managing workflows through nodes of compute and connecting edges. It is necessary for handling complex requirements like human-in-the-loop steps and streaming outputs, ensuring that job failures (e.g., at step 50) do not require restarting from scratch. (0:27)
-
LangChain: Abstraction and Customization
0:58
LangChain provides abstractions on top of LangGraph, most notably the ReAct agent architecture. ReAct is a simple tool-calling loop where the agent reasons about an action, reasons about the result, and acts again. This process can be highly customized using LangChain middleware to insert logic like summarization or human approval. (0:58, 1:23)
-
Deep Agents: Batteries Included
2:15
Deep Agents is a specialized LangChain ReAct agent that includes necessary components for long-running tasks out-of-the-box, such as summarization, file system access, sandboxes, and skills, reducing the need for custom implementation. (1:35)
-
Deployment and Monitoring
Beyond the framework choice, LangSmith is recommended for managing the entire agent development life cycle, helping teams move agents from prototype to production by addressing testing, deploying, and monitoring challenges. (2:24)
More digests on Agent Frameworks
Technical details
-
Agent Architecture Stack
0s
The LangChain ecosystem is structured bottom-up: LangGraph (durable runtime) $\rightarrow$ LangChain (abstractions/ReAct agent) $\rightarrow$ Deep Agents (pre-built harness).
-
LangGraph Workflow Control
27s
LangGraph manages agents via 'nodes of compute' and 'edges connecting them,' providing complete control over agent operation and durability. (0:27)
-
ReAct Agent Loop
58s
The ReAct agent architecture is a simple tool-calling loop where the agent follows a cycle of 'Reason $\rightarrow$ Act $\rightarrow$ Reason' to determine the next action. (0:58)
-
Middleware Customization
123s
LangChain allows customization of agents using middleware, enabling the insertion of logic such as summarization after a set number of messages or requiring human approval before tool use. (1:23)
Mentioned resources
- LangGraph
- LangChain
- Deep Agents
- LangSmith
Channel & topics
Watch on YouTube · Back to latest
This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.