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
pip install "langgraph-cli[inmem]"
langgraph dev # starts a local server with hot reloadThe dev server reads a langgraph.json file to find your graph. Build that file up one field at a time.
The graphs field
{
"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
{
"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
{
"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.
{
"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
graphsmaps a name to a pointer of the form"./file.py:variable", wherevariableis the compiled graph the server imports.dependencieslists the packages and local folders to install.envpoints at a.envfile for keys and settings.
Required vs optional fields
| Field | Needed | What it is |
|---|---|---|
graphs | Yes | Name to file.py:variable pointer |
dependencies | Yes | Packages and local folders to install |
env | Optional | Path to a .env file, or inline values |
python_version | Optional | 3.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.
Related
- Previous: Integrations: swapping in real backends
- Next: LangSmith: see what a run did
- Reference: Application structure
- Write a
langgraph.jsonpointing at one of your compiled graphs. - Run
langgraph devand open the local server it prints.
Little by little, you're building something great.