What Is LangGraph?
LangGraph is an open-source library, for Python and JavaScript, for building applications that work through a task in steps, where some steps ask an AI model and others are ordinary code. You describe the application as a graph: the data it works on, the steps that read and update that data, and the arrows that say which step runs next. LangGraph runs it, and it can save the run after every step, pause it for a person, and pick it up again after a crash. This page explains those pieces, shows a small graph that mixes a Claude step with a Python step, and maps every concept of LangGraph to the tutorial in this track that teaches it.
What LangGraph Does
An application built on an AI model rarely makes a single call. It reads something, asks the model, checks the answer in code, maybe asks again, and saves the result. Some steps can run at the same time, some need a person's approval, and a long run can fail halfway. You can write all of that by hand, but then you also write the saving, the resuming and the pausing yourself.
LangGraph's overview describes what it takes over: LangGraph is a low-level orchestration framework and runtime for long-running, stateful agents. You define workflows as graphs of shared state, nodes, and edges, and can mix deterministic steps with LLM-driven steps in the same graph. An LLM, a large language model, is the kind of AI model behind Claude. A deterministic step is ordinary code, which gives the same result every time.
What you get from the runtime, in the overview's words:
- Deterministic and agentic steps: Combine hand-coded nodes with model-driven nodes in one graph.
- Persistence: Checkpoint state and resume after failures or pauses.
- Human-in-the-loop: Pause execution, inspect or edit state, then continue.
- Memory: Short-term thread state and longer-term memory across sessions.
- Streaming: Stream tokens, state updates, and other events as the graph runs.
What you don't get is just as deliberate: LangGraph does not prescribe prompts or agent architecture. You write the prompts and decide what each step does, and LangGraph runs the steps in the order the graph describes.
Where It Comes From
LangGraph is one of LangChain's products, next to the LangChain framework and LangSmith. Its first release on PyPI, the Python package index, came out in January 2024, and version 1.0 in October 2025. It runs graphs in the style of Google's Pregel system, a design for processing large graphs in rounds, which is where its super-steps come from.
- Languages: Python and JavaScript. This track uses Python 3.14.
- License: open source under the MIT license, and free.
- Version: this track uses
langgraph1.2.25, released on December 1, 2026.
State, Nodes and Edges
LangGraph's Graph API overview names the three parts of every graph:
- State: A shared snapshot of the application. Usually a typed schema. In Python, it can be a
TypedDict, a dataclass or a Pydantic model. This track starts withTypedDict: a class that lists the keys the state has and the type of each value. - Nodes: Functions that read state, do work, and return updates. A node is an ordinary Python function. It receives the state and returns only the keys it changes.
- Edges: Fixed or conditional transitions that determine the next node. A fixed edge always leads to the same node. A conditional edge calls a function that picks the next node at run time.
Or, as the same page puts it: nodes do the work; edges decide what runs next. Two special names mark where a run begins and ends: START and END.
You build a graph with StateGraph, add nodes and edges to it, and then compile it. The Graph API overview says that Compilation checks the graph structure (for example for orphaned nodes), and that You must compile the graph before you invoke or stream it. invoke runs the compiled graph from a starting state and returns the final one.
A Graph in a Few Lines of Python
Here's a complete graph: a proofreader. It has two nodes. proofread sends a sentence to Claude Opus 5.5 and keeps the corrected version. compare is plain Python: it lists the words that changed. You'll build graphs yourself, step by step, starting in the next tutorial. For now, read the code and look at what it prints.
from typing import TypedDict
from dotenv import load_dotenv
from langchain_anthropic import ChatAnthropic
from langgraph.graph import END, START, StateGraph
load_dotenv() # Reads ANTHROPIC_API_KEY from the .env file.
claude = ChatAnthropic(model="claude-opus-5-5", effort="low")
# The state: the data every step of the graph reads and updates.
class State(TypedDict):
text: str
corrected: str
changed_words: list[str]
# A step that asks Claude.
def proofread(state: State) -> dict:
reply = claude.invoke(
"Correct the spelling and grammar of this sentence. "
"Reply with the corrected sentence only.\n\n" + state["text"]
)
return {"corrected": reply.text}
# A step in plain Python.
def compare(state: State) -> dict:
original = state["text"].split()
changed = [word for word in state["corrected"].split() if word not in original]
return {"changed_words": changed}
# The graph: START -> proofread -> compare -> END.
builder = StateGraph(State)
builder.add_node("proofread", proofread)
builder.add_node("compare", compare)
builder.add_edge(START, "proofread")
builder.add_edge("proofread", "compare")
builder.add_edge("compare", END)
graph = builder.compile()
result = graph.invoke({"text": "Their going too the libary tomorow."})
for key, value in result.items():
print(f"{key}: {value}")

load_dotenv()reads your Claude API key,ANTHROPIC_API_KEY, from a.envfile next to the code, so the key never appears in the code itself. If the script can't find that file, the call to Claude fails with a misleadingConnection error., as Fixed: "AnthropicConnectionError: Connection error." When a LangGraph Node Calls Claude explains.ChatAnthropicis the Claude model, from thelangchain-anthropicpackage.effort="low"asks Claude to work quickly: proofreading one sentence is a small job.Statelists the three keys of the state. The input fills in onlytext, and the two nodes add the other keys as the graph runs.proofreadis a node. It readstextfrom the state, asks Claude, and returns{"corrected": …}: only the key it changes.compareis a node too, with no AI in it. It splits both sentences into words and keeps the corrected words that weren't in the original.builderputs the graph together: two nodes, and three fixed edges fromSTARTthroughproofreadandcomparetoEND.compile()turns it into a graph you can run.graph.invokeruns it with a starting state and returns the final state, which the loop prints key by key.
When I ran it with uv run main.py, it printed:
text: Their going too the libary tomorow.
corrected: They're going to the library tomorrow.
changed_words: ["They're", 'to', 'library', 'tomorrow.']

The final state holds all three keys. text is the input, corrected came from Claude through proofread, and changed_words came from compare. 'tomorrow.' keeps its full stop because split() splits only at spaces. I ran the graph three times and got the same sentence each time, but Claude writes every reply fresh, so yours can be worded differently.
The input {"text": …} leaves out two keys that State lists. Python doesn't mind, and the graph ran. A type checker such as mypy does mind, and Fixed: No overload variant of "stream" of "Pregel" matches argument types shows the two ways to tell it which keys the input needs.
What Happens During a Run
LangGraph runs one node at a time here, because each node has only one edge leading out of it. Each node gets the state as it stands, and LangGraph merges what the node returns into the state before the next node runs:
To see each step for real, I streamed the run's updates with graph.stream(..., stream_mode="updates"), as How to See What Each Node Returns in a LangGraph Graph in Python shows. It printed one line per node, with what that node returned:
{'proofread': {'corrected': "They're going to the library tomorrow."}}
{'compare': {'changed_words': ["They're", 'to', 'library', 'tomorrow.']}}
Each node returned only its own key, and LangGraph kept the rest of the state. That's the default for every key: The default reducer replaces the left value with the right. Nodes return partial updates, not the full state. A reducer decides how an update merges into a key, and other reducers can, for example, add to a list instead of replacing it. In LangGraph's terms, each node ran in its own super-step, because Nodes that run in sequence use separate super-steps. Nodes that run in parallel share one.
If you copy that loop, spell the mode updates, with an s. A misspelled mode doesn't raise an error: the loop prints nothing at all, as Fixed: LangGraph graph.stream() Prints Nothing and Raises No Error shows.
The Graph as a Diagram
LangGraph can draw a compiled graph: graph.get_graph().draw_mermaid() returns the graph as a Mermaid diagram, in text, and drawing it never calls Claude. How to Draw a LangChain Agent as a Mermaid Diagram in Python uses the same call. This is the proofreader, redrawn from what draw_mermaid() printed for it:
A straight line: __start__ and __end__ are how LangGraph writes START and END. Later graphs in this track branch, loop and run nodes in parallel, and the same call draws those too. If you show the diagram on a page with a dark theme, its labels can be nearly invisible, as Fixed: LangChain draw_mermaid() Diagram Labels Unreadable in Dark Mode explains.
How LangGraph Relates to LangChain, Deep Agents and LangSmith
LangGraph is one of several products from the same company. LangGraph's overview describes how they fit together:
| Product | What LangChain says it is | In this track |
|---|---|---|
| LangGraph | The orchestration runtime: durable execution, streaming, human-in-the-loop, and persistence | Everything: the graph and its runtime |
| LangChain | The agent framework: abstractions and integrations for models, tools, and agent loops | The Claude model inside the nodes, through langchain-anthropic |
| Deep Agents | An agent harness: planning, subagents, filesystem tools, and context management on top of LangGraph | Not covered here |
| LangSmith | The platform for tracing, evaluation, prompts, and deployment across frameworks | Not used. Every graph in this track runs on your computer |
LangChain's agents run on LangGraph: an agent made with LangChain's create_agent is a compiled LangGraph graph. LangGraph doesn't need LangChain, though: Docs examples often use LangChain for those integrations, but LangGraph does not require LangChain. A node is a Python function, so it can call any model library, or none at all.
So which one should you use? LangGraph's overview answers: If you want a higher-level agent loop first, use Deep Agents or LangChain agents. Use LangGraph when you need explicit control over state and control flow. With LangGraph, you decide every step and every path, which suits applications whose steps you know in advance, such as read, classify, check and save. When you just want a model that calls tools until it has an answer, LangChain's create_agent gives you that loop ready-made, and the LangChain tutorials teach it.
The Model in a Node
This track uses Claude Opus 5.5 (claude-opus-5-5) in every node that needs a model, through ChatAnthropic from langchain-anthropic. Its main setting is effort: how hard Claude works on each request. Anthropic's effort guide says that Claude Opus 5.5 supports all five effort levels, and medium is the default, and describes low as Most efficient. Significant token savings with some capability reduction.
Effort also steers Claude's thinking, the reasoning it can do before it answers. At low, Anthropic's guide to thinking says, Claude minimizes thinking. Skips thinking for simple tasks where speed matters most. That's what happened in the proofreader: its call to Claude used no thinking tokens at all. Each node can use its own effort, so a graph can spend more on its hard steps and less on its easy ones.
The Packages
LangGraph comes as a set of packages. A project adds the ones it uses, and each brings the packages it needs. These are the ones this track uses:
| Package | What it gives you | Version |
|---|---|---|
langgraph | StateGraph, nodes, edges and the runtime that runs them | 1.2.25 |
langgraph-checkpoint | The base for saving a graph's state, with an in-memory saver. Comes with langgraph | 4.3.2 |
langgraph-prebuilt | Ready-made parts for agents, such as a node that runs tools. Comes with langgraph | 1.1.3 |
langgraph-sdk | A Python client for a LangGraph server. Comes with langgraph | 0.4.14 |
langchain-core | The building blocks LangGraph and the model packages share, such as messages. Comes with langgraph | 1.8.5 |
langchain-anthropic | Claude models | 1.7.13 |
langgraph-checkpoint-sqlite | Saving a graph's state in a SQLite file | 3.1.3 |
langgraph-cli | Running a graph as a local server | 0.4.45 |
python-dotenv | Loading the API key from a .env file | 1.2.4 |
The proofreader needed three of them: uv add langgraph langchain-anthropic python-dotenv. In a new project on Python 3.14, that installed 44 packages, every one of them ready-built, with nothing to compile. How to Install LangGraph in Python with uv installs LangGraph on its own, checks the version and explains the packages it brings.
Why Python 3.14
Python 3.15 is out, but one package that every LangGraph project installs isn't ready for it yet: zstandard. LangGraph needs langchain-core, which needs langsmith, which needs zstandard, and the newest zstandard, 0.25.0, has no ready-built package (a wheel) for Python 3.15. On 3.15, it has to be compiled from source, which needs a C compiler on your computer. On Python 3.14, everything installs from wheels. Every project in this track starts with uv init --python 3.14.
Every Concept, and Where This Track Teaches It
This track teaches LangGraph one concept at a time, in the order below. Each tutorial has its own small example, like the proofreader on this page, and builds only on the tutorials before it. They're published one at a time, and each concept becomes a link here when its tutorial is out. The last three columns show which of the product lines below will use each concept.
| Concept | What it lets you do | Where you'll learn it | Feedback Analyzer | Invoice Approval | Content Studio |
|---|---|---|---|---|---|
| What LangGraph is | Know what state, nodes and edges are, what happens during a run, and when to choose LangGraph | This page | ✓ | ✓ | ✓ |
| Your first graph | Install LangGraph, build a graph step by step, add a Claude node and draw the graph | Coming soon | ✓ | ✓ | ✓ |
| How a graph runs | Follow state updates through a run, one super-step at a time, and stream them | Coming soon | ✓ | ✓ | ✓ |
| Reducers | Decide how an update merges into the state, such as adding to a list | Coming soon | ✓ | ✓ | ✓ |
| Messages in graph state | Keep a conversation in the state, with a Claude chat node | Coming soon | ✓ | ||
| Input, output and private state | Control what goes into a graph, what comes out, and what stays between nodes | Coming soon | |||
| Conditional edges | Choose the next node while the graph runs | Coming soon | |||
| Loops and the recursion limit | Repeat steps, and stop a graph that runs too long | Coming soon | |||
| Parallel branches | Run nodes at the same time and join their results | Coming soon | ✓ | ||
| Map-reduce with Send | Run a node once for every item of a list, in parallel | Coming soon | ✓ | ✓ | |
| Command | Update the state and choose the next node in one return value | Coming soon | ✓ | ||
| Claude in a graph node | Set effort, output length, prompt caching and refusal handling for each call | Coming soon | ✓ | ✓ | ✓ |
| Tools and the agent loop | Let Claude call your functions, in a loop you build yourself | Coming soon | |||
| Structured output and routing | Get typed results from Claude, and route on them | Coming soon | ✓ | ✓ | |
| Workflow patterns | Build chains, routers, orchestrator-workers and evaluator-optimizers | Coming soon | |||
| Runtime context and configuration | Pass settings and connections into your nodes | Coming soon | ✓ | ||
| Checkpointers and threads | Save the state after every step, and pick a run up later | Coming soon | ✓ | ✓ | |
| Durable execution with SQLite | Resume a crashed run from its last saved step | Coming soon | ✓ | ✓ | |
| Human-in-the-loop with interrupt() | Pause a graph for a person's answer, then continue | Coming soon | ✓ | ✓ | |
| Approve, edit, reject and validate | Use the common approval patterns | Coming soon | ✓ | ||
| Time travel | Replay a run from an earlier step, or fork it with a change | Coming soon | ✓ | ||
| Short-term memory | Keep conversations within their limits, safely with Claude | Coming soon | ✓ | ||
| Long-term memory with stores | Remember facts across conversations | Coming soon | ✓ | ||
| Streaming | Show tokens, updates and progress while a graph runs | Coming soon | ✓ | ✓ | |
| Event streaming | Follow typed events for messages, state and subgraphs | Coming soon | |||
| Subgraphs | Build a graph from smaller graphs | Coming soon | ✓ | ||
| Multi-agent graphs and handoffs | Make several agents work together in one graph | Coming soon | |||
| Retries, timeouts and errors | Recover from steps that fail | Coming soon | ✓ | ✓ | |
| Node caching | Skip work a node has already done for the same input | Coming soon | ✓ | ||
| The Functional API | Write a workflow as plain functions with @entrypoint and @task | Coming soon | ✓ | ||
| A local server | Serve a graph over HTTP on your computer, and call it from Python | Coming soon | ✓ | ||
| Application structure and safe changes | Lay out a project, and change a graph without breaking runs in progress | Coming soon | |||
| The LangGraph runtime | See how Pregel, channels and super-steps run every graph | Coming soon |
The Product Lines
Below the Fundamentals in the sidebar, three product lines will put the concepts together in complete applications, each built from an empty folder to a finished product, one part at a time. Where a part uses a concept, it links the concept's tutorial and spends its own words on what's specific to the product. All three are coming soon:
- Customer Feedback Analyzer reads a file of customer reviews, sorts them by topic and mood with Claude in parallel batches, and drafts a report of the main themes that a person approves before it's saved. A long run that crashes resumes where it stopped, without paying again for the batches it finished.
- Invoice Approval Workflow reads invoices, checks them against a database of vendors and purchase orders, and asks a person to approve each one. When an invoice was read wrongly, you can go back to that step, fix it and run on from there.
- Content Repurposing Studio turns a Markdown blog post into drafts for LinkedIn, X and a newsletter, keeps your brand voice between sessions, and lets you revise the drafts in a chat.
What It Costs
- LangGraph: nothing. It's open source under the MIT license.
- Claude: you pay Anthropic for the tokens your graphs send and receive. Claude Opus 5.5 costs $4 per million input tokens and $20 per million output tokens. There's no free tier: Anthropic's pricing page says The Claude API has no free tier or self-serve trial, and new accounts don't include free credits, and the smallest credit purchase is $5. How to Get a Claude API Key shows how to buy credit and create a key.
- LangSmith: not needed. The graphs in this track run without a LangSmith account or API key.
To see what that means in practice, I measured the proofreader's call to Claude, as How to Get the Token Usage and Cost of a LangChain Agent Run in Python measures an agent. One run used 51 input tokens and 14 output tokens, and no thinking tokens. That's about $0.0005, so a dollar pays for about 2,000 runs. The compare node costs nothing, because it's plain Python.
Tools You'll Use
| Tool | What it's for |
|---|---|
| uv | Creates Python 3.14 projects, installs packages and runs your code |
| A code editor, such as Visual Studio Code | Writing the code |
| A Claude API key with credit | The model in the nodes that need one |
The next tutorial, Install LangGraph and Build Your First Graph, creates a project with LangGraph and builds a graph one step at a time.
Frequently Asked Questions
Is LangGraph free?
Yes. LangGraph is open source under the MIT license, and its packages are free. You pay for the services your nodes use, such as an AI model.
Do I need LangChain to use LangGraph?
No. LangGraph's overview says it does not require LangChain. When you install langgraph, it brings langchain-core with it, but not the langchain package. This track adds langchain-anthropic only because its nodes talk to Claude through it. A node can just as well call Anthropic's own SDK, or no model at all.
What's the difference between LangGraph and LangChain's agents?
A LangChain agent is a ready-made graph: a model node and a tools node, with a loop between them. LangGraph lets you build any graph you like, with your own nodes, your own state and your own paths. Use LangChain's agents when that ready-made loop is what you need, and LangGraph when you need to decide the steps yourself.
Do I need LangSmith?
No. The proofreader ran with no LangSmith account, and no graph in this track uses one. LangSmith shows you what each run did, and it's useful once your graphs grow, but nothing here depends on it.
Can I use another model instead of Claude?
Yes. A node is a Python function, so it can call any model, through LangChain's integrations or the provider's own library. Different models behave differently, though, so this track uses Claude throughout, and every output on these pages comes from Claude Opus 5.5.
Can I use JavaScript instead of Python?
Yes. LangGraph has a JavaScript version, @langchain/langgraph, with its own documentation. This track uses Python throughout, so every example, command and output here is Python.
Conclusion
LangGraph runs applications that are built as graphs: a state that holds the data, nodes that do the work, and edges that decide what runs next. The proofreader showed both kinds of node in one graph, Claude correcting a sentence and plain Python comparing the words, for about a twentieth of a cent per run. The rest of LangGraph builds on those three parts: saving the state after every step, pausing for a person, running nodes in parallel and picking a crashed run up where it stopped.
Next: Install LangGraph and Build Your First Graph (coming soon) creates a Python 3.14 project with LangGraph, builds a graph one node and one edge at a time, adds a Claude node and draws the result.
Additional Resources
- LangGraph overview — what LangGraph is, its capabilities, and how the LangChain products fit together.
- Graph API overview — state, nodes, edges, reducers and super-steps.
- Streaming — the stream modes, including
updates. - ChatAnthropic — Claude models in LangChain, including effort.
- Effort — Claude's effort levels and their defaults.
- Claude pricing — what each Claude model costs per token.
- langgraph on PyPI — releases, supported Python versions and the license.