| Name | Type | Description |
|---|---|---|
host | str | Default: _DEFAULT_HOSTHost to bind the server to. |
port | int | Default: _EPHEMERAL_PORTInitial port to bind the server to. Defaults to
An explicit port is honored, but |
config_dir | str | Path | None | Default: None |
owns_config_dir | bool | Default: False |
scaffold | Callable[[Path], None] | None | Default: None |
Manages a langgraph dev server subprocess.
Focuses on subprocess lifecycle (start, stop, restart) and health checking.
Env-var management for restarts (e.g. configuration changes requiring a full
restart) is handled by _scoped_env_overrides, keeping this class focused
on process management.
Directory containing langgraph.json.
When True, the server will delete config_dir
on stop().
Optional callable that (re)generates the working
directory's langgraph.json and supporting files. When the
config is missing at start() (e.g. the temp dir was purged
between the initial boot and a later /restart), it is invoked
to rebuild the workspace instead of failing.