Deploy
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: 29 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 debugging video moves its tool-calling graph into agent.py, where make_tool_graph() builds and compiles it and the variable tool_agent holds the result. Next to it goes a langgraph.json that points at tool_agent as "./agent.py:tool_agent", with env set to "../.env", the keys file one folder up. langgraph dev, from langgraph-cli[inmem], run in that folder, starts a local server and opens the graph in LangGraph Studio, where you can send a message, watch each node run, and pause the run at a node. The same server lists its API routes on a docs page. Below, the same file is built one field at a time for the support graph.
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 required. 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.
tool_agent in the video: usually the compiled graph the file exposes.Related
- Previous: Integrations
- Next: LangSmith
- 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.