# LangChain vs. LangGraph vs. Deep Agents: When to Use Each One

## Executive 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: 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: 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: 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)

## Technical details

- Agent Architecture Stack: The LangChain ecosystem is structured bottom-up: LangGraph (durable runtime) $\rightarrow$ LangChain (abstractions/ReAct agent) $\rightarrow$ Deep Agents (pre-built harness).
- LangGraph Workflow Control: LangGraph manages agents via 'nodes of compute' and 'edges connecting them,' providing complete control over agent operation and durability. (0:27)
- ReAct Agent Loop: 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: 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)

## Practical implications

- If maximum control and durability are required, use LangGraph.
- If a customizable, abstract layer is needed, use LangChain's ReAct agent with middleware.
- If rapid development of long-running tasks with standard features (file system, sandboxes) is the goal, use Deep Agents.
- For moving agents into production, monitoring, and testing, LangSmith is the recommended tool.

## Topics

Agent Frameworks, Workflow Orchestration, AI Agents, LangChain Ecosystem, Software Architecture, LangGraph, LangChain, Deep Agents, LangSmith

Source: https://www.youtube.com/watch?v=ty8i2zl9q2c
