LangGraph
A low-level library for building stateful, controllable agents as graphs, with checkpointing and human-in-the-loop.
LangGraph models an agent as an explicit state graph of nodes and edges, trading some abstraction for control. Its built-in persistence (checkpointing), human-in-the-loop interrupts, and streaming make it a common choice for production agents that need to be debuggable and resumable.
LangGraph is a low-level orchestration library for building agents as explicit state graphs: you define nodes (steps), edges (transitions), and a shared state object, and the agent's control flow becomes something you can see, test, and resume. It trades the one-line convenience of higher-level frameworks for control — which is exactly what production agents tend to need once they outgrow a demo.
It is aimed at engineers building durable, multi-step or multi-agent systems where you care about persistence, branching logic, and being able to pause for human input. Despite the name, LangGraph does not require the rest of LangChain.
Highlights
- Graph-based control flow — model loops, branches, and multi-agent handoffs as explicit nodes and edges instead of opaque prompt chains.
- Persistence / checkpointing — save and restore agent state, so runs are resumable and crash-safe.
- Human-in-the-loop — interrupt the graph for approval or input, then resume from the exact point.
- Streaming — stream tokens and intermediate steps for responsive UIs and debugging.
- Deployable — pairs with LangGraph Platform for hosted deployment, plus LangSmith for tracing.
In an AI-assisted workflow
from langgraph.graph import StateGraph, START, END
g = StateGraph(State)
g.add_node("retrieve", retrieve)
g.add_node("generate", generate)
g.add_edge(START, "retrieve"); g.add_edge("retrieve", "generate"); g.add_edge("generate", END)
app = g.compile(checkpointer=checkpointer) # resumable, interruptibleTIP
Reach for LangGraph when you need control and durability (checkpoints, HITL, branching). For quick role-based multi-agent setups, a higher-level framework like CrewAI is faster to start — see the framework comparison.
Good to know
LangGraph is open source (MIT) and free to self-host; the optional LangGraph Platform (hosted deployment) and LangSmith (observability) are commercial. It's lower-level than role-based frameworks, so expect to write more wiring in exchange for more control.
Related
- CrewAIA Python framework for orchestrating role-playing AI agents as collaborating 'crews', plus event-driven flows.
- OpenAI Agents SDKOpenAI's lightweight, open-source framework for agents — handoffs, guardrails, sessions, and built-in tracing.
- AutoGen (AG2)A multi-agent conversation framework where agents collaborate via message-passing, with group chat and code execution.
- Which Agent Framework in 2026? LangGraph vs CrewAI vs AutoGen vs OpenAI Agents SDK vs Claude Agent SDKA decision guide to the major AI agent frameworks — control vs. abstraction, multi-agent models, state and durability, and which fits your project.
- Mem0A memory layer for AI agents and apps — persistent, personalized long-term memory across sessions.
- Agent Tool Integration EngineerUse this agent to wire tools and function-calling into an agent loop reliably — clean tool schemas, errors fed back as observations, retries with limits, idempotency, and parallel calls. Examples — "connect our APIs as agent tools", "our agent calls tools wrong / ignores tool errors", "add function-calling with proper error recovery to our agent".
- Agent Memory Architecture: Short-Term, Long-Term, and When to Use EachHow AI agents remember — working memory vs. persistent long-term memory, what to store, how to retrieve it, and how to keep context small.