Configuration Reference
Thelanggraph.json file is the central configuration for your LangGraph application, defining dependencies, graphs, environment settings, and deployment options.
Schema
You can enable IntelliSense and validation in your editor by adding the schema reference:Configuration Structure
Minimal Configuration
At minimum, you need to specify dependencies and graphs:Complete Example
Core Fields
dependencies
Type: string[]Required: Yes (for Python projects) List of Python packages to install. Can include:
- PyPI packages:
"langchain-openai" - Local packages:
"."or"./my_package" - Git repositories:
"git+https://github.com/org/repo.git"
The
"." dependency tells the CLI to install your local package (looks for pyproject.toml, setup.py, or requirements.txt).graphs
Type: Record<string, string | GraphDef>Required: Yes Maps graph IDs to their import paths. Each graph must point to a compiled graph object or a context manager that returns one. Format:
"path/to/file.py:variable_name"
Simple format:
StateGraphinstancesCompiledGraphinstances- Functions decorated with
@entrypoint - Any
Pregelobject - Context managers that yield a graph:
env
Type: string | Record<string, string>Required: No Environment variables for your application. As a file path:
Python Configuration
python_version
Type: stringDefault:
"3.11"Format:
"major.minor" (e.g., "3.11", "3.12", "3.13")
Python version for Docker deployment. Must be 3.11 or higher.
Patch versions cannot be specified. The latest patch version of the specified minor version is used.
pip_config_file
Type: stringRequired: No Path to a pip configuration file for custom package indices or authentication.
pip.conf:
pip_installer
Type: "auto" | "pip" | "uv"Default:
"auto"
Choose which package installer to use:
"auto": Useuvif base image supports it, otherwisepip"pip": Force use of pip"uv": Force use of uv (faster, but requires compatible base image)
keep_pkg_tools
Type: boolean | string[]Default:
false
Control whether to keep packaging tools (pip, setuptools, wheel) in the final image.
Node.js Configuration
node_version
Type: stringRequired: For JavaScript/TypeScript graphs
Format: Major version only (e.g.,
"20")
Node.js version for JavaScript/TypeScript projects. Must be 20 or higher.
If your graphs use
.ts, .js, .mts, or .cts extensions, Node.js support is automatically enabled.Docker Configuration
base_image
Type: stringDefault:
"langchain/langgraph-api" (Python) or "langchain/langgraphjs-api" (Node.js)
Base Docker image for your deployment.
api_version
Type: stringRequired: No API server version to use. Alternative to specifying version in
base_image.
image_distro
Type: "debian" | "wolfi" | "bookworm"Default:
"debian"
Linux distribution for the base image.
"debian": Standard Debian-based image"wolfi": Minimal, security-focused distribution"bookworm": Debian 12 (Bookworm)
dockerfile_lines
Type: string[]Required: No Custom Dockerfile instructions to append after the base image.
Store Configuration
store
Type: StoreConfigRequired: No Configuration for the built-in long-term memory store with semantic search.
store.index
Semantic search configuration.
Required fields:
embed: Embedding model identifierdims: Embedding dimension
fields: JSON fields to embed (default:["$"]- entire object)
store.ttl
Time-to-live configuration for automatic data expiration.
refresh_on_read: Refresh TTL on read operations (default:true)default_ttl: Default TTL in minutes for new itemssweep_interval_minutes: Interval between TTL sweep iterations
Checkpointer Configuration
checkpointer
Type: CheckpointerConfigRequired: No Configuration for custom checkpointer implementations.
checkpointer.path
Import path to an async context manager that yields a BaseCheckpointSaver instance.
checkpointer.ttl
Thread TTL configuration:
strategy:"delete"(remove thread) or"keep_latest"(keep latest state)default_ttl: Default TTL in minutessweep_interval_minutes: Interval between sweeps (default: ~5 minutes)sweep_limit: Max threads per sweep (default: 1000)
checkpointer.serde
Serialization/deserialization configuration:
Authentication Configuration
auth
Type: AuthConfigRequired: No Custom authentication configuration.
Encryption Configuration
encryption
Type: EncryptionConfigRequired: No Custom at-rest encryption for sensitive data.
HTTP Server Configuration
http
Type: HttpConfigRequired: No Configuration for the built-in HTTP server.
Endpoint Control
Disable specific endpoint groups:CORS Configuration
Webhooks Configuration
webhooks
Type: WebhooksConfigRequired: No Configuration for outbound webhook delivery.
UI Configuration
ui
Type: Record<string, string>Required: No Named UI components emitted by your agent.
ui_config
Type: objectRequired: No Additional UI configuration.
Complete Example
Here’s a comprehensive configuration example:Validation
The CLI validates your configuration when running any command. Common errors:Missing Required Fields
Invalid Python Version
Invalid Graph Path
"./agent.py:graph"
Reserved Package Names
Next Steps
- Learn about CLI commands
- Explore deployment guide
- Read about building graphs