Long-running agents often need durable execution, branching, streaming, or human checkpoints rather than a single model call. LangGraph provides the low-level graph runtime and a Python Graph API without requiring a model provider or API key.
The package is published on PyPI as langgraph and requires Python 3.10 or newer. An isolated .venv keeps its dependencies out of the system Python installation and makes the active interpreter unambiguous.
The base install is enough to import StateGraph and build model-free graphs. Model providers and higher-level LangChain agent components use separate packages, so install them only when a project needs them.
Related: Build a state graph in LangGraph
$ python3 --version Python 3.14.4
$ python3 -m venv .venv
$ source .venv/bin/activate
$ python -m pip install --upgrade langgraph
The --upgrade option installs LangGraph when it is absent and updates an older copy in the active environment.
$ python -m pip show langgraph Name: langgraph Version: 1.2.9 Summary: Building stateful, multi-actor applications with LLMs ##### snipped ##### Location: /home/alex/project/.venv/lib/python3.14/site-packages Requires: langchain-core, langgraph-checkpoint, langgraph-prebuilt, langgraph-sdk, pydantic, xxhash
The version and Python directory change over time. The Location value should point inside the project's .venv directory.
$ python -c "from langgraph.graph import StateGraph; print(StateGraph)" <class 'langgraph.graph.state.StateGraph'>