LangGraphLangGraph 1.2 · Python 3.10+
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
38 small wins to finish your pathNext lesson →

Deploy: langgraph dev and langgraph.json

langgraph dev runs your graph as a local server. A langgraph.json file tells it where your graph is and what it depends on.

Last updated: 27 Sep, 2026 · LangGraph Platform

Once a graph works, you serve it so a UI or another service can call it. The dev server needs no Docker and reloads as you edit.

The langgraph dev command

python
pip install "langgraph-cli[inmem]"
langgraph dev            # starts a local server with hot reload

The dev server reads a langgraph.json file to find your graph. Build that file up one field at a time.

The graphs field

python
{
  "graphs": { "support": "./your_package/agent.py:graph" }
}

graphs is the one required field. It maps a name to a pointer of the form "./file.py:variable". Here the server imports the graph variable from agent.py and serves it under the name support.

The dependencies field

python
{
  "graphs": { "support": "./your_package/agent.py:graph" },
  "dependencies": ["langchain", "./your_package"]
}

dependencies lists what to install: packages by name, such as "langchain", and your own code as a local path, such as "./your_package".

The env field

python
{
  "graphs": { "support": "./your_package/agent.py:graph" },
  "dependencies": ["langchain", "./your_package"],
  "env": "./.env"
}

env points at a .env file so the server can read your keys and settings. This field is optional.

The complete config file

All three fields together, saved next to your code.

python
{
  "dependencies": ["langchain", "./your_package"],
  "graphs": { "support": "./your_package/agent.py:graph" },
  "env": "./.env"
}

With this file in place, run langgraph dev and the server loads the support graph.

What each field does

  • graphs maps a name to a pointer of the form "./file.py:variable", where variable is the compiled graph the server imports.
  • dependencies lists the packages and local folders to install.
  • env points at a .env file for keys and settings.

Required vs optional fields

FieldNeededWhat it is
graphsYesName to file.py:variable pointer
dependenciesYesPackages and local folders to install
envOptionalPath to a .env file, or inline values
python_versionOptional3.11, 3.12 or 3.13

When to serve a graph

  • Running your agent behind an endpoint a UI can call.
  • The step between a script on your machine and a served service.
Watch out. The pointer after the colon is a variable name, not a function call: it must name a compiled graph the file exposes.
Try it yourself
  • Write a langgraph.json pointing at one of your compiled graphs.
  • Run langgraph dev and open the local server it prints.

Little by little, you're building something great.