Skip to content

KiCI environment variable reference

Catalog of the environment variables shared across the customer-deployable KiCI services, plus the rotated-file logger knobs. Per-service variables live in each service’s configuration doc (linked below). Generated from the Zod schemas in each service’s config.ts. The orchestrator and agent reject unknown KICI_* env vars at boot (typo catcher) — set KICI_DEV=true to downgrade to a warning during local development.

Variables specific to one service are documented in that service’s config reference:

These variables are read identically by every KiCI service that defines them (same type, same default). They are documented here once rather than duplicated in each service’s config doc.

Env varRequiredDefaultTypeAliasesDescription
KICI_CONCURRENCY_WAIT_TIMEOUT_MSno3600000number
KICI_JOB_HEARTBEAT_INTERVAL_MSno60000number
KICI_LOG_LEVELno”info”enum:debug|info|warn|error
OTEL_EXPORTER_OTLP_ENDPOINTnostring

Read by the rotated-file logger (packages/shared/src/logger.ts) before any service config loads. Setting KICI_LOG_DIR enables the JSON file transport; the instance-id env vars only act as a filename suffix (so multiple processes can share one KICI_LOG_DIR).

Env varRequiredDefaultTypeAliasesDescription
KICI_CLUSTER_INSTANCE_IDnostringStable orchestrator identifier; appended to the log filename so multiple instances can share one KICI_LOG_DIR.
KICI_AGENT_IDnostringStable agent identifier; appended to the agent log filename so multiple agents can share one KICI_LOG_DIR.
KICI_LOG_DIRnostringDirectory for rotated JSON log files. When unset, the logger only writes to stdout/stderr.
KICI_LOG_FORMATno”auto”enum:auto|plain|jsonOutput format for stdout/stderr. auto (default) emits JSON when stdout is piped and plain coloured text when stdout is a TTY. plain and json force the corresponding format regardless of TTY. Runtime services (orchestrator, agent, platform, dashboard SSR) pin json so a journal-attached PTY cannot flip them into plain mode.
KICI_LOG_MAX_SIZEno”500m”stringPer-file size cap for rotated logs. Accepts a numeric byte count or a size suffix (k, m, g).
KICI_LOG_RETENTION_DAYSno7numberHow many days of rotated logs to keep before deletion.
KICI_PLATFORM_INSTANCE_IDnostringStable Platform identifier; appended to the platform log filename so multiple instances can share one KICI_LOG_DIR.