Configuration File
Thelanggraph.json file in your project root defines your deployment configuration:
langgraph.json
Configuration Options
array
required
List of dependency sources. Use
["."] to include current directory, or specify paths to local packages.Example: "dependencies": [".", "../shared-libs"]object
required
Map of graph names to their module paths. Format:
"name": "path/to/file.py:variable"Example: "graphs": { "agent": "./langgraph/agent.py:graph", "assistant": "./langgraph/assistant.py:assistant_graph" }The variable name (after :) must be a compiled LangGraph graph.object
Environment variables for your deployment. Never put actual API keys here - use LangSmith secrets instead.Example:
"env": { "MODEL_NAME": "claude-sonnet-4-5-20250929", "LANGSMITH_TRACING": "true" }string
Python version:
"3.10", "3.11", or "3.12". Default: "3.11"array
Custom Dockerfile commands to run during build.Example:
"dockerfile_lines": ["RUN apt-get update && apt-get install -y curl", "RUN uv pip install custom-package"]Graph Definition
Your graph must be defined in a Python module and exported as a variable:langgraph/agent.py
Dependencies
Dependencies are specified inlanggraph/requirements.txt:
langgraph/requirements.txt
Environment Variables
Setting Variables
Set environment variables in two ways:- langgraph.json - For non-sensitive config
- LangSmith Secrets - For API keys and sensitive data
Available at Runtime
Access environment variables in your code:Multiple Environments
Create separate deployments for each environment:- Development
- Staging
- Production