Skip to main content

Environment Variables

App Environment Variables (app.yaml)​

These variables are defined in app.yaml and injected into the app runtime. Placeholder values (e.g., __GSO_CATALOG__) are patched before deployment — by notebooks/install.py into its generated workspace source folder (recommended path), or in place by deploy.sh (local terminal path).

MLflow Tracing​

VariableValueDescription
MLFLOW_TRACKING_URIdatabricksMLflow tracking server (Databricks workspace)
MLFLOW_EXPERIMENT_ID__MLFLOW_EXPERIMENT_ID__Experiment for tracing LLM calls. Workspace-specific; validated at startup, cleared if invalid

LLM Model​

VariableValueDescription
LLM_MODEL__LLM_MODEL__Model for analysis and the create agent. On the gateway route a databricks-* name is sent as system.ai.*; on the classic route it is the serving endpoint name. Default: databricks-claude-sonnet-4-6
GENIE_LLM_ROUTE__GENIE_LLM_ROUTE__gateway (default) sends LLM and embedding calls through Unity AI Gateway (/ai-gateway/mlflow/v1) with cost-attribution tags; classic calls /serving-endpoints/{name}/invocations. Only an explicit classic selects classic: unset or unknown values use the gateway, with a warning for unknown values. Optimization runs receive the same value as the genie_llm_route job parameter
GENIE_BYOK_ENABLED__GENIE_BYOK_ENABLED__false (default). When true on the gateway route, a Unity Catalog model id (catalog.schema.model) is accepted as the model. App-only; not passed to the job

On the gateway route, databricks-<name> endpoints are called as system.ai.<name>. A custom serving endpoint that is not a databricks-* foundation model has no gateway name; use classic for it.

App Version and Release Check​

VariableValueDescription
UPDATE_CHECK_ENABLED__UPDATE_CHECK_ENABLED__Daily release update check. true / false = chosen at install (locked in the app); empty = users are asked on the Admin tab. Set from GENIE_UPDATE_CHECK or the notebook release_check widget
GWB_BUILD_COMMIT__GWB_BUILD_COMMIT__Commit the app was deployed from (-dirty when tracked files had local changes); empty for zip downloads. Shown in Admin -> Settings
GWB_DEPLOYED_AT__GWB_DEPLOYED_AT__UTC time of the deploy, stamped by the installer
GWB_INSTALL_METHOD__GWB_INSTALL_METHOD__cli (deploy.sh) or notebook (notebooks/install.py)

The installed version itself comes from the repo-root VERSION file, not an environment variable.

SQL Warehouse​

VariableSourceDescription
SQL_WAREHOUSE_IDvalueFrom: sql-warehouseSQL Warehouse ID, pulled from the app resource named sql-warehouse

Genie Agent Configuration​

VariableValueDescription
GENIE_TARGET_DIRECTORY/Shared/Where new Genie Agents are created. Override to a specific folder if needed

Local Development​

VariableValueDescription
DEV_USER_EMAIL(empty)User email for local dev auth. Only used when running outside Databricks Apps

Lakebase PostgreSQL​

VariableSourceDescription
LAKEBASE_HOSTvalueFrom: postgresHostname, injected from the postgres app resource
LAKEBASE_PORT5432PostgreSQL port
LAKEBASE_DATABASEdatabricks_postgresDatabase name (standard Lakebase default)
LAKEBASE_INSTANCE_NAME__LAKEBASE_INSTANCE__Lakebase Autoscaling project name (patched by deploy script)

Auto-Optimize (GSO Engine)​

VariableSourceDescription
GSO_CATALOG__GSO_CATALOG__Unity Catalog for optimizer state tables. Patched from .env.deploy
GSO_SCHEMAgenie_space_optimizerSchema within the catalog for GSO tables (fixed name)
GSO_JOB_ID__GSO_JOB_ID__Databricks Job ID for the optimization DAG. Patched from bundle deploy state
GSO_WAREHOUSE_IDvalueFrom: sql-warehouseSQL Warehouse for GSO queries

Deploy Configuration Variables (.env.deploy)​

These variables apply to the local terminal path only — they are read by deploy.sh and written by install.sh. They are not injected into the app runtime directly; the deploy scripts use them to patch app.yaml placeholders and configure resources.

On the recommended notebook path there is no .env.deploy file. The equivalent values come from notebooks/install.py widgets (app_name, catalog, warehouse_id, lakebase_mode, lakebase_project_name, llm_route, release_check). The notebook always sets GENIE_BYOK_ENABLED to false.

VariableRequiredDefaultDescription
GENIE_WAREHOUSE_IDYes—SQL Warehouse ID (hex string from warehouse URL or detail page)
GENIE_CATALOGYes—Unity Catalog name (you need CREATE SCHEMA permission)
GENIE_APP_NAMENogenie-workbenchDatabricks App name (must be unique in your workspace)
GENIE_DEPLOY_PROFILENoDEFAULTDatabricks CLI profile name
GENIE_LLM_MODELNodatabricks-claude-sonnet-4-6LLM model for analysis; fills LLM_MODEL
GENIE_LLM_ROUTENogatewaygateway or classic; fills GENIE_LLM_ROUTE and the job's genie_llm_route default
GENIE_BYOK_ENABLEDNofalsetrue or false; fills GENIE_BYOK_ENABLED
GENIE_UPDATE_CHECKNoemptytrue or false for the daily release check; fills UPDATE_CHECK_ENABLED. Empty: users are asked on the Admin tab. Set by install.sh
GENIE_LAKEBASE_INSTANCENo<app-name>Lakebase Autoscaling project name (auto-provisioned by deploy)

How Variables Flow​

  1. The installer collects values — notebook widgets on the notebook path, or install.sh writing .env.deploy on the terminal path
  2. The installer patches __PLACEHOLDER__ strings in app.yaml. The notebook path writes the patched copy into its generated workspace source folder and leaves the Git folder's app.yaml untouched; the terminal path patches the file in place
  3. databricks apps deploy (or the notebook's equivalent SDK call) uploads the patched app.yaml
  4. The Databricks Apps platform injects env vars into the running container
  5. valueFrom variables (e.g., LAKEBASE_HOST, SQL_WAREHOUSE_ID) are resolved from app resources at runtime