All Tools
LangGraph logo

LangGraph

LangGraph is a free, open-source framework for building stateful, graph-based AI agents with fine-grained control over every step.

What is LangGraph?

LangGraph is a free, open-source framework for building stateful, graph-based AI agents. Where LangChain gives you high-level patterns for getting started fast, LangGraph gives you low-level control over exactly how an agent thinks, branches, loops, and remembers. You define your agent as a graph: nodes represent steps (calling a model, running a tool, making a decision), and edges define which step comes next. The framework ships with built-in persistence, cross-session memory, real-time streaming, and human-in-the-loop checkpoints. Companies like LinkedIn, Klarna, and Lyft run LangGraph in production. For developers building agents that need to handle complex, branching workflows without unpredictable behavior, LangGraph is the industry’s go-to runtime.

How LangGraph works

LangGraph models every agent as a directed graph. You write Python (or JavaScript), define what each node does, and specify the edges between them. The runtime handles state, execution order, persistence, and streaming automatically.

  • Nodes: Each node is a Python function that does one thing: call an LLM, run a tool, classify an input, write to memory. Nodes keep logic isolated and testable.
  • Edges: Edges connect nodes and define what happens next. A conditional edge checks the current state and routes execution to one of several possible next nodes, giving you branching and looping without complex if/else chains.
  • State: State is a shared data structure that every node can read from and write to. LangGraph tracks state across every step of the workflow, so you always know what the agent knows and what it has done. State also persists across sessions, giving agents long-term memory.
  • Checkpoints: LangGraph saves a checkpoint at every node transition. You can pause execution, inspect the checkpoint, rewind to an earlier point, or inject human feedback before the agent continues. This is the core of its human-in-the-loop capability.
  • Streaming: LangGraph streams tokens and agent actions to the client in real time as the workflow runs. Users see output as it generates rather than waiting for the full response.
  • Multi-agent support: You can wire multiple agent subgraphs together into a supervisor graph, where a top-level agent routes tasks to specialist agents. This is the same architecture LinkedIn published in its engineering blog on AI-powered hiring workflows.

What you can build with LangGraph

  • Customer support agent with escalation logic: Build a support agent that handles common queries autonomously, routes edge cases to a specialist sub-agent, and pauses for human approval before issuing refunds or account changes. Conditional edges handle the routing; checkpoints handle the human handoff.
  • Deep research agent: Build a multi-step research pipeline where one node generates search queries, another fetches and reads sources, another evaluates relevance, and a final node synthesizes a report. The graph loops back if the agent decides it needs more sources before concluding.
  • Document processing pipeline: Route incoming documents to specialized extraction nodes based on document type, then run parallel extraction nodes for different fields before a final merge node. LangGraph’s fan-out and fan-in edge patterns make this architecture clean and easy to extend.
  • Multi-agent coding assistant: Build a supervisor agent that receives a feature request, delegates coding to a code-writing agent, delegates review to a linting agent, and delegates testing to a test-running agent. Each sub-agent operates as its own graph, and the supervisor coordinates the overall flow.
  • Personalized tutoring system: Build a tutoring agent that stores each student’s learning history in LangGraph’s persistent state, adapts its explanations based on past misconceptions, and pauses at key checkpoints to ask the student to confirm understanding before moving on.
  • Approval workflow agent: Build a procurement or compliance agent that collects required information autonomously, then pauses at a human-in-the-loop checkpoint so a manager can approve or reject the agent’s proposed action before it executes.

Key Features

  • Graph-based control flow with nodes and edges for any agent architecture
  • Built-in state persistence and cross-session memory
  • Human-in-the-loop checkpoints to pause, review, and approve agent actions
  • First-class token-by-token streaming for real-time UX
  • Supports single-agent, multi-agent, and hierarchical agent patterns

FAQ

Is LangGraph free to use? +

LangGraph is free and MIT-licensed. You install it as a Python or JavaScript package and run it in your own environment, so there are no usage fees or rate limits. The LangSmith platform, which adds deployment, tracing, and evaluation on top of LangGraph, has its own pricing with a free tier and paid plans.

What is the difference between LangGraph and LangChain? +

LangChain is a higher-level framework that provides pre-built agent patterns and integrations for getting started fast. LangGraph is the lower-level runtime LangChain runs on top of, giving you direct control over state, branching, and cycle logic. Use LangChain to move quickly; switch to LangGraph when you need fine-grained control over how your agent behaves.

Does LangGraph slow down my application? +

LangGraph adds no overhead to your application code. The framework is designed specifically with streaming workflows in mind, so agent actions and tokens can stream to users in real time. The only latency you add is what your model, tools, or external API calls introduce, not LangGraph itself.

Explore Similar AI Tools

Newsletter

The Twice-Monthly AI Briefing

Updates from the AI world — what shipped, what we’re using in production, and what’s worth your attention. Two emails a month, no spam.