LangGraph
Framework for building stateful, multi-actor applications with LLMs.
3. Used by agents' projects
Dependency in 78 public GitHub projects set up for AI coding agents that we scanned (1.2%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
docs.langchain.com/llms.txtFrom the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What LangGraph does
LangGraph is a deliberately low-level runtime. You wire an agent as a graph that mixes hand-coded deterministic steps with LLM-driven ones, and LangGraph handles durable state, so runs can pause, resume and pick up after failures.
LangGraph popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How LangGraph is used
- LangGraph is a dependency in 78 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (4.8% of the 1,623 Python ones), #5 of 192 in agent, mcp and tool libraries.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,035; those are left out of every share on this page.
- The most used alternative in our scan is LangChain (127 projects).
- Projects that use it most often also use LangChain (87.2%), Pydantic (71.8%), python-dotenv (70.5%).
By coding agent
Often used with
LangGraph in practice
Strengths
The docs name this as one of LangGraph's core strengths. Some parts of a workflow can be plain code that is predictable and auditable. Other parts can let the model decide.
The README describes durable execution: agents that keep going through failures, run for long periods, and resume where they stopped.
Qodo passed a <code>PostgresSaver</code> checkpointer to <code>compile()</code>. The post says this saved the agent's whole workflow state with no custom infrastructure. It also mentions SQLite and in-memory checkpointers, and says checkpoints and branch points let you undo and replay changes.
The docs list human-in-the-loop as a built-in benefit: you can look at the agent's state and change it at any point.
Watch out for
The docs call LangGraph "very low-level". For people just starting with agents, they recommend LangChain's prebuilt agents instead.
In its post, Qodo says the framework was moving fast and the docs were sometimes incomplete or out of date. For newer, niche features, Qodo had to ask the maintainers directly. This is one team's experience when the post was written, not a statement about the docs today.
Qodo's engineer says his team relied on manual testing more than it wanted to. He writes that he hopes LangGraph will build mocking and testing infrastructure over time. This is his view at the time of the post.
Hello world graph (spacing as on the docs page)
from langgraph . graph import StateGraph , MessagesState , START , END
def mock_llm ( state : MessagesState ):
return { "messages" : [{ "role" : "ai" , "content" : "hello world" }]}
graph = StateGraph ( MessagesState )
graph . add_node ( mock_llm )
graph . add_edge ( START , "mock_llm" )
graph . add_edge ( "mock_llm" , END )
graph = graph . compile ()
graph . invoke ({ "messages" : [{ "role" : "user" , "content" : "hi!" }]})More about LangGraph
Agent Skills for it
- langgraph: Expert in LangGraph - the production-grade framework for building stateful, multi-actor AI applications. Covers graph construction, state ma
- langgraph-checkpoint: LangGraph checkpoint and persistence configuration for stateful workflow management
Head to head
- LangChain vs LangGraph used together in 68 projects
Packages around it
- langchain: Model and tool integrations
- python-dotenv: .env file loading
- pydantic: Data validation
- fastapi: Web API framework
- uvicorn: ASGI server
- pydantic-settings: Settings from env vars
Alternatives
LangGraph This page
Framework for composing applications with LLMs through chains and agents.
AI agent framework built with Pydantic for structured, typed agent development.
Barebones library for building agents that write Python code to call tools.
Microsoft SDK for integrating LLMs with traditional code for AI applications.
Get started
Install it.
pip install langgraphRules for your agent
## LangGraph
- Install with `pip install -U langgraph` or `uv add langgraph`. For JS/TS projects, the README points to the equivalent library, LangGraph.js.
- Build a `StateGraph`, add nodes and edges from `START` to `END`, and call `compile()` before `invoke()`.
- Use deterministic steps where you need reliability and predictability, and LLM-driven steps where you need flexibility.
- Do not add LangChain just to use LangGraph; it is optional. For a simple model and tool-calling loop, the docs recommend LangChain's prebuilt agents.
- To trace runs, set `LANGSMITH_TRACING=true` and a LangSmith API key.
- To find doc pages, start from `/llms.txt` and follow each `/_llms/` index recursively.