How to Install LangGraph in Python with uv
LangGraph is a Python library for building workflows and agents as graphs: steps that share data, joined by edges that say which step runs next. One uv command installs it with everything it needs. This guide installs LangGraph 1.2.25 into a new project on Python 3.14, checks the version, and runs a one-node graph to prove it works.
Syntax
uv add langgraph
| Part | What it means |
|---|---|
uv add | Adds a package to the project in the current folder, installs it into the project's .venv, and records it in pyproject.toml and uv.lock |
langgraph | The LangGraph library. uv installs the packages it needs along with it |
The LangGraph overview installs it with this command, or with pip install -U langgraph, and calls LangGraph "a low-level orchestration framework and runtime for long-running, stateful agents."
The Example
A new project, hello-langgraph, gets LangGraph. Then a graph with a single step, greet, turns the name Ada into a greeting. Nothing in it calls an AI model, so this guide needs no API key.
Prerequisites
- uv. This guide uses uv 0.13.10. It downloads Python 3.14 for you if your computer doesn't have it.
Step 1: Create the Project on Python 3.14
In a terminal, in the folder where you keep your projects, create the project and move into it:
uv init --python 3.14 --no-package hello-langgraph
cd hello-langgraph
Initialized project `hello-langgraph` at `/Users/you/source/hello-langgraph`

--python 3.14 picks the Python version, and --no-package makes a plain project with a main.py at the top, which is all a script needs. How to Create a Python Project with uv shows the files uv init creates and what its other options change.
Why 3.14 and not the newer 3.15? One package that LangGraph installs has no ready-built version for Python 3.15 yet, so on 3.15 it has to be compiled on your computer. The FAQ below has the details.
Step 2: Add LangGraph
uv add langgraph
Using CPython 3.14.10
Creating virtual environment at: .venv
Resolved 40 packages in 703ms
Installed 38 packages in 103ms
+ annotated-types==0.8.0
+ anyio==4.16.0
+ certifi==2026.11.20
+ charset-normalizer==3.5.3
+ distro==1.9.0
+ h11==0.16.0
+ httpcore==1.0.9
+ httpcore2==2.17.0
+ httpx==0.29.0
+ httpx2==2.17.0
+ idna==3.20
+ jsonpatch==1.48
+ jsonpointer==3.12
+ langchain-core==1.8.5
+ langchain-protocol==0.0.22
+ langgraph==1.2.25
+ langgraph-checkpoint==4.3.2
+ langgraph-prebuilt==1.1.3
+ langgraph-sdk==0.4.14
+ langsmith==0.16.5
+ orjson==3.13.0
+ ormsgpack==1.13.1
+ packaging==26.4
+ pydantic==2.14.4
+ pydantic-core==2.50.5
+ pyyaml==6.0.4
+ requests==2.34.2
+ requests-toolbelt==1.0.0
+ sniffio==1.3.1
+ tenacity==9.2.1
+ truststore==0.10.5
+ typing-extensions==4.16.0
+ typing-inspection==0.4.5
+ urllib3==2.8.0
+ uuid-utils==0.20.0
+ websockets==17.4
+ xxhash==4.1.0
+ zstandard==0.25.0

uv created the project's virtual environment, .venv, and installed LangGraph with everything it needs. Every package came as a wheel, a ready-built file, so nothing had to be compiled: a package built from source would show up as a Built line. These are the ones that belong to LangGraph and LangChain:
| Package | What it is |
|---|---|
langgraph | LangGraph itself: graphs, nodes, edges and the runtime that runs them |
langgraph-checkpoint | The base for saving a graph's state as it runs. LangGraph's checkpointer guide says that it "Includes in-memory checkpointer implementation (InMemorySaver) for experimentation" and that "LangGraph comes with langgraph-checkpoint included" |
langgraph-prebuilt | Ready-made parts for agents. Its PyPI summary: "Library with high-level APIs for creating and executing LangGraph agents and tools." |
langgraph-sdk | A client for a LangGraph server, which its PyPI summary calls an "SDK for interacting with LangGraph API" |
langchain-core | LangChain's core package, which LangGraph builds on |
langsmith | The client library for LangSmith, LangChain's platform for tracing and evaluation. langchain-core needs it |
Step 3: Check the Installed Version
uv pip show langgraph
Name: langgraph
Version: 1.2.25
Location: /Users/you/source/hello-langgraph/.venv/lib/python3.14/site-packages
Requires: langchain-core, langgraph-checkpoint, langgraph-prebuilt, langgraph-sdk, pydantic, xxhash
Required-by:

Version is the release you got, and Location shows that it sits in the project's own .venv. Requires lists the packages LangGraph needs directly, and Required-by is empty because no other installed package needs LangGraph. How to Check the Installed Version of a Python Package with uv shows other ways to check, such as uv tree.
Step 4: Run a One-Node Graph
To prove that the install works, build the smallest graph that does something: one node that turns a name into a greeting. Replace everything in main.py with:
from typing import TypedDict
from langgraph.graph import END, START, StateGraph
class State(TypedDict):
name: str
greeting: str
def greet(state: State) -> dict:
return {"greeting": "Hello, " + state["name"] + "!"}
builder = StateGraph(State)
builder.add_node("greet", greet)
builder.add_edge(START, "greet")
builder.add_edge("greet", END)
graph = builder.compile()
print(graph.invoke({"name": "Ada"}))

Statelists the data the graph works with: anameand agreeting.greetis the node, a plain Python function. It receives the state and returns only what it changes, thegreeting.StateGraph(State)starts a graph.add_nodeadds the step, and the twoadd_edgelines lead fromSTARTtogreetand fromgreettoEND.compile()turns the description into a graph you can run. LangGraph's Graph API guide says: "You must compile the graph before you invoke or stream it."invokethen runs it with a starting state.
Run it:
uv run main.py
{'name': 'Ada', 'greeting': 'Hello, Ada!'}

The graph started with {'name': 'Ada'}, greet added the greeting, and invoke returned the whole state. LangGraph is installed and working. The commands in this guide work unchanged in PowerShell.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
Running the script with python3 main.py | ModuleNotFoundError: No module named 'langgraph': LangGraph is in the project's .venv, not in the Python that python3 starts | Run it with uv run main.py from the project folder |
Expecting uv add langgraph to bring a model library, such as the one for Claude | It doesn't: import langchain_anthropic failed with ModuleNotFoundError: No module named 'langchain_anthropic' | Add the model library your nodes use. LangGraph's quickstart adds langchain-anthropic for Claude |
FAQ
Why Python 3.14 and not 3.15?
LangGraph needs langchain-core, which needs langsmith, which needs zstandard, Python bindings for the Zstandard compression library that include a C extension. Its newest release, 0.25.0, has no wheels for Python 3.15 yet: of its 99 files on PyPI, 15 are wheels for CPython 3.14, none are for 3.15, and one is the source code. In a Python 3.15 project on the same Mac, uv add langgraph printed Built zstandard==0.25.0: uv compiled zstandard from its source code, which needs a C compiler on your computer. On Python 3.14, every package arrives ready-built, as Step 2 showed.
Do I need an API key?
Not to install or run LangGraph. The graph in this guide ran without a key, because its only node is plain Python. You need one when a node calls a model, such as Claude.
Is LangGraph free?
Yes. LangGraph is open source under the MIT license, the license its PyPI page lists. A model provider such as Anthropic charges for the model calls your nodes make, but LangGraph itself costs nothing.
Can I use pip instead of uv?
Yes. The LangGraph overview shows pip install -U langgraph next to uv add langgraph. uv adds a project, a lock file and a pinned Python version, which keep installs repeatable.
Conclusion
uv add langgraph installed LangGraph 1.2.25 and the packages it needs into a Python 3.14 project, every one of them as a ready-built wheel. uv pip show confirmed the version, and a one-node graph turned {'name': 'Ada'} into a state with the greeting Hello, Ada!.
Additional Resources
- LangGraph overview — what LangGraph is, with the install commands.
- langgraph on PyPI — its releases, the Python versions it supports and its license.
- uv add — every option of the command.
