docker --version
).langgraph --help
or npx @langchain/langgraph-cli --help
to confirm that the CLI is working correctly.Key | Description |
---|---|
dependencies | Required. Array of dependencies for LangGraph Platform API server. Dependencies can be one of the following:
|
graphs | Required. Mapping from graph ID to path where the compiled graph or a function that makes a graph is defined. Example:
|
auth | (Added in v0.0.11) Auth configuration containing the path to your authentication handler. Example: ./your_package/auth.py:auth , where auth is an instance of langgraph_sdk.Auth . See authentication guide for details. |
base_image | Optional. Base image to use for the LangGraph API server. Defaults to langchain/langgraph-api or langchain/langgraphjs-api . Use this to pin your builds to a particular version of the langgraph API, such as "langchain/langgraph-server:0.2" . See https://hub.docker.com/r/langchain/langgraph-server/tags for more details. (added in langgraph-cli==0.2.8 ) |
image_distro | Optional. Linux distribution for the base image. Must be either "debian" or "wolfi" . If omitted, defaults to "debian" . Available in langgraph-cli>=0.2.11 . |
env | Path to .env file or a mapping from environment variable to its value. |
store | Configuration for adding semantic search and/or time-to-live (TTL) to the BaseStore. Contains the following fields:
|
ui | Optional. Named definitions of UI components emitted by the agent, each pointing to a JS/TS file. (added in langgraph-cli==0.1.84 ) |
python_version | 3.11 , 3.12 , or 3.13 . Defaults to 3.11 . |
node_version | Specify node_version: 20 to use LangGraph.js. |
pip_config_file | Path to pip config file. |
pip_installer | (Added in v0.3) Optional. Python package installer selector. It can be set to "auto" , "pip" , or "uv" . From version 0.3 onward the default strategy is to run uv pip , which typically delivers faster builds while remaining a drop-in replacement. In the uncommon situation where uv cannot handle your dependency graph or the structure of your pyproject.toml , specify "pip" here to revert to the earlier behaviour. |
keep_pkg_tools | (Added in v0.3.4) Optional. Control whether to retain Python packaging tools (pip , setuptools , wheel ) in the final image. Accepted values:
|
dockerfile_lines | Array of additional lines to add to Dockerfile following the import from parent image. |
checkpointer | Configuration for the checkpointer. Contains a ttl field which is an object with the following keys:
|
http | HTTP server configuration with the following fields:
|
image_distro
field. Valid options are debian
or wolfi
. Wolfi is the recommended option as it provides smaller and more secure images. This is available in langgraph-cli>=0.2.11
.langgraph.json
will enable semantic search within the BaseStore of your deployment.The index.fields
configuration determines which parts of your documents to embed:["$"]
, the entire document will be embedded["metadata.title", "content.text"]
put
time using the index
parameteropenai:text-embedding-3-large
: 3072openai:text-embedding-3-small
: 1536openai:text-embedding-ada-002
: 1536cohere:embed-english-v3.0
: 1024cohere:embed-english-light-v3.0
: 384cohere:embed-multilingual-v3.0
: 1024cohere:embed-multilingual-light-v3.0
: 384embed
field in store configuration can reference a custom function that takes a list of strings and returns a list of embeddings. Example implementation:store.ttl
key. This determines how long items are retained after they are last accessed (with reads potentially refreshing the timer based on refresh_on_read
). Note that these defaults can be overwritten on a per-call basis by modifying the corresponding arguments in get
, search
, etc.The ttl
configuration is an object containing optional fields:refresh_on_read
: If true
(the default), accessing an item via get
or search
resets its expiration timer. Set to false
to only refresh TTL on writes (put
).default_ttl
: The default lifespan of an item in minutes. If not set, items do not expire by default.sweep_interval_minutes
: How frequently (in minutes) the system should run a background process to delete expired items. If not set, sweeping does not occur automatically.checkpointer
key. This determines how long checkpoint data is retained before being automatically handled according to the specified strategy (e.g., deletion). The ttl
configuration is an object containing:strategy
: The action to take on expired checkpoints (currently "delete"
is the only accepted option).sweep_interval_minutes
: How frequently (in minutes) the system checks for expired checkpoints.default_ttl
: The default lifespan of a checkpoint in minutes.langgraph
.dev
Option | Default | Description |
---|---|---|
-c, --config FILE | langgraph.json | Path to configuration file declaring dependencies, graphs and environment variables |
--host TEXT | 127.0.0.1 | Host to bind the server to |
--port INTEGER | 2024 | Port to bind the server to |
--no-reload | Disable auto-reload | |
--n-jobs-per-worker INTEGER | Number of jobs per worker. Default is 10 | |
--debug-port INTEGER | Port for debugger to listen on | |
--wait-for-client | False | Wait for a debugger client to connect to the debug port before starting the server |
--no-browser | Skip automatically opening the browser when the server starts | |
--studio-url TEXT | URL of the LangGraph Studio instance to connect to. Defaults to https://smith.langchain.com | |
--allow-blocking | False | Do not raise errors for synchronous I/O blocking operations in your code (added in 0.2.6 ) |
--tunnel | False | Expose the local server via a public tunnel (Cloudflare) for remote frontend access. This avoids issues with browsers like Safari or networks blocking localhost connections |
--help | Display command documentation |
build
Option | Default | Description |
---|---|---|
--platform TEXT | Target platform(s) to build the Docker image for. Example: langgraph build --platform linux/amd64,linux/arm64 | |
-t, --tag TEXT | Required. Tag for the Docker image. Example: langgraph build -t my-image | |
--pull / --no-pull | --pull | Build with latest remote Docker image. Use --no-pull for running the LangGraph Platform API server with locally built images. |
-c, --config FILE | langgraph.json | Path to configuration file declaring dependencies, graphs and environment variables. |
--help | Display command documentation. |
up
Option | Default | Description |
---|---|---|
--wait | Wait for services to start before returning. Implies —detach | |
--base-image TEXT | langchain/langgraph-api | Base image to use for the LangGraph API server. Pin to specific versions using version tags. |
--image TEXT | Docker image to use for the langgraph-api service. If specified, skips building and uses this image directly. | |
--postgres-uri TEXT | Local database | Postgres URI to use for the database. |
--watch | Restart on file changes | |
--debugger-base-url TEXT | http://127.0.0.1:[PORT] | URL used by the debugger to access LangGraph API. |
--debugger-port INTEGER | Pull the debugger image locally and serve the UI on specified port | |
--verbose | Show more output from the server logs. | |
-c, --config FILE | langgraph.json | Path to configuration file declaring dependencies, graphs and environment variables. |
-d, --docker-compose FILE | Path to docker-compose.yml file with additional services to launch. | |
-p, --port INTEGER | 8123 | Port to expose. Example: langgraph up --port 8000 |
--pull / --no-pull | pull | Pull latest images. Use --no-pull for running the server with locally-built images. Example: langgraph up --no-pull |
--recreate / --no-recreate | no-recreate | Recreate containers even if their configuration and image haven’t changed |
--help | Display command documentation. |
dockerfile
Option | Default | Description |
---|---|---|
-c, --config FILE | langgraph.json | Path to the configuration file declaring dependencies, graphs and environment variables. |
--help | Show this message and exit. |
langgraph dockerfile
command translates all the configuration in your langgraph.json
file into Dockerfile commands. When using this command, you will have to re-run it whenever you update your langgraph.json
file. Otherwise, your changes will not be reflected when you build or run the dockerfile.