Graphs, AI agents, and LangGraph
LangChain introduced LangGraph in 2024, so it is still relatively new. It is an extension built on top of LangChain Expression Language (LCEL) to create composable and customizable agentic workloads. LangGraph leans heavily on graph theory concepts, such as nodes and edges (described earlier), but with a focus on using them to manage your AI agents. While an older way to manage agents, the AgentExecutor
class, still exists, LangGraph is now the recommended way to build agents in LangChain.
LangGraph adds two important components for supporting agents:
- The ability to easily define cycles (cyclical graphs)
- Built-in memory
It provides a pre-built object equivalent to AgentExecutor
, allowing developers to orchestrate agents using a graph-based approach.
Over the past couple of years, numerous papers, concepts, and approaches have emerged for building agents into RAG applications, such as orchestration agents, ReAct agents, self...