Skip to main content

Environment variables

Pulse reads configuration from environment variables and an optional .env file via pydantic-settings. The base settings class is CoreSettings (okto-pulse-core/src/okto_pulse/core/infra/config.py:22); the community edition extends it with CommunitySettings (okto-pulse/src/okto_pulse/community/config.py:7). Both use:
Three rules follow from that config:
  1. Field name → env var name. Every field on CoreSettings and CommunitySettings accepts an env var equal to the field name uppercased. data_dirDATA_DIR, kg_base_dirKG_BASE_DIR, etc.
  2. Case-insensitive. DATA_DIR, data_dir, and Data_Dir are equivalent. We use uppercase throughout this page by convention.
  3. .env is loaded automatically from the working directory of okto-pulse serve. Useful for local development; production should set vars in the process environment.
A small set of variables outside CoreSettings are read directly by the CLI, the MCP server, or the Docker image — they are called out explicitly in their sections below. For runtime tuning rationale, see Server configuration. For the on-disk layout these variables control, see Storage paths. Source-of-truth for the table below is 80-pulse-feature-inventory.md:178–211.

CLI runtime control

These variables gate the CLI itself — they are read by okto-pulse serve and friends, not by CoreSettings.
OKTO_PULSE_PORT and OKTO_PULSE_MCP_PORT must be set before okto_pulse.community.main is imported — the module evaluates app = create_community_app() at import time and bakes the values into the Web UI’s /config.js. The CLI does this for you; if you embed Pulse in your own Python process, set both before any import okto_pulse.community.main.

Server

These map to CoreSettings fields (config.py:22–60, inventory:751–765).
See Server configuration for ports, bind hosts, CORS, and logging in depth.

Storage

These map to CoreSettings and CommunitySettings fields (inventory:185–189).
See Storage paths for the full directory tree, the unprefixed Docker volume gotcha, and backup/migration recipes.

Knowledge graph — embeddings

Configures the embedding backend used for KG semantic search. (inventory:191–193)
Changing KG_EMBEDDING_MODEL or KG_EMBEDDING_DIM after a board has been created will not re-embed existing nodes. New nodes will be embedded with the new model, but similarity search will mix vector spaces. If you need to switch models, run okto-pulse kg backfill <board_id> to recompute everything; if the dimension changed, drop and rebuild the graph.

Knowledge graph — runtime tuning

LadybugDB engine sizing. The legacy KUZU prefix is retained in env-var names because the underlying engine is the Kùzu-derived LadybugDB (Kuzu retired 2026-05-03). All three are validated by pydantic.Field with the ranges shown.

Knowledge graph — consolidation queue

The KG worker pool that drains the SQLite consolidation queue and writes nodes/edges into LadybugDB. All KG_QUEUE_* settings hot-reload via APScheduler with a 5-second debounce — no restart required. (inventory:790–793, config.py:80–87)
KG_MAX_QUEUE_DEPTH is deprecated and will be removed in v0.5.0. The settings_service maps the legacy value into KG_QUEUE_ALERT_THRESHOLD and emits a DeprecationWarning at startup. Source: config.py:67–70.

Knowledge graph — relevance decay

The decay tick recomputes node relevance scores so old, unread decisions sink. Hot-reloadable through PUT /settings/runtime — APScheduler reschedules the job in place. (inventory:206–208, config.py:90–95)

MCP tracing

Independent of standard logging, Pulse can record every MCP tool call as JSONL. Read at runtime by core/mcp/trace_middleware.py:49,56.

MCP authentication

Authentication for okto-pulse MCP tools is configured via MCPSettings (config.py:110–117) with env_prefix="MCP_" — these are the only Pulse env vars that take a prefix. For the auth flow itself — query-param vs. Bearer header vs. .mcp.json discovery — see MCP reference / Authentication.

Docker-image-only

Set inside the official ghcr.io/oktolabsai/okto-pulse image; not configurable from CoreSettings. Source: okto-pulse/Dockerfile:28–29.
Mounting a volume over /opt/hf-cache forces the container to re-download the embedding model on first run. The image is offline-capable only because the cache is pre-baked.

.env example

okto-pulse serve reads a .env file from its working directory. Useful for local development.
.env
Variables set in the process environment override values from .env. Production deployments should set vars in the systemd unit, the Docker --env/-e flag, or the orchestrator manifest — not check a .env into the repo.

Hot-reloadable vs. restart-required

Most settings are read once at startup. The KG_QUEUE_* and KG_DECAY_TICK_* families are an exception — they hot-reload while the process is running.

Server configuration

Ports, bind hosts, CORS, logging, and worker tuning in depth.

Storage paths

The on-disk layout the storage variables control, plus backup and migration.

MCP reference

The 216 MCP tools, including auth flow and the tracing knobs above.

Docker install

The pre-baked container that sets HOST, MCP_HOST, DATA_DIR, and HF_HOME for you.
Last modified on May 17, 2026