Skip to content

kabactl Environment Variables

kabactl is configured mainly through config.toml. The variables here cover things that are per-process, secret, or only useful when tuning. When kabactl runs under systemd or in a container, set them in the unit or the container environment.

VariableEffect
KABA_ALLOW_ROOT=1Allow running as root.
KABA_DEBUG=1More network logging from server, at the level set by iroh_log_level.
KABA_TRACE=1Same as --trace. Inherited by the service daemon.
KABA_TRACE_INTERVAL_SECSSampling interval for --trace.
KABA_TRACE_HEAP_PROF=1Also activate heap profiling under --trace (Linux).
KABA_STOP_GRACE_SECSHow long service stop waits before forcing the process down.
KABA_SHUTDOWN_GRACE_SECSHow long the process waits for background work at exit. Default 8.
VariableEffect
KABA_UPDATE_TOKENAccess token for self-update against a private repository. Sent as an Authorization header.
KABA_UPDATE_BASE_URLRelease host for self-update.
HF_TOKENHugging Face token for private or gated repositories.
KABA_GEMMA_MIRRORMirror tried first for base-model downloads.
KABA_GEMMA_HF_ORG, KABA_GEMMA_HF_URL_E2B, KABA_GEMMA_HF_URL_E4B, KABA_GEMMA_HF_URL_E2B_MMPROJ, KABA_GEMMA_HF_URL_E4B_MMPROJOverride where each model file is fetched from.
KABA_VOICE_MIRRORMirror for the voice bundle.
KABA_VOICE_AUTOPROVISION=1 / 0Force automatic voice-model download at start on or off.
VariableEffect
KABA_WORKSPACE_PASSWORDPassword for --workspace, so ask and train do not prompt. Prefer the prompt on shared machines.
VariableEffect
KABA_BACKENDOverrides --device: auto, cuda, rocm, wgpu, cpu.
KABA_LLAMA_GPU_LAYERSCaps the layers placed on the GPU, whatever a request asks for.
KABA_LLAMA_MAX_CTXUpper bound on the context window.
KABA_LLAMA_THREADSCPU threads.
KABA_QUANTIZEDefault quantization.
KABA_MODEL_IDLE_SECSUnload the model after this long idle.
KABA_SESSION_SLOTS=0Turn off per-session context reuse.
KABA_VISION_MODEL=baseUse the base model’s multimodal projector for images instead of the dedicated route.
KABA_VOICE_IDLE_UNLOADUnload voice models after this many seconds idle.
VariableLimits
KABA_INFER_STALL_SECSHow long generation may go without producing a token.
KABA_INFER_MAX_SECSTotal time for one generation.
KABA_ASK_TIMEOUT_SECSDeadline for an ask sent to a peer.
KABA_TRAIN_STALL_SECSHow long training may go without progress.
VariableEffect
KABACTL_LANCE_INDEX_CACHE_MBVector index cache per store. Default 256, or 32 on relay-only nodes.
KABACTL_LANCE_META_CACHE_MBVector metadata cache per store. Default 128, or 16 on relay-only nodes.
KABA_VECTOR_MAINTENANCE=0Turn off background compaction of the vector store.
KABA_MEMGUARDControls the memory governor, which frees caches under pressure.
_RJEM_MALLOC_CONFAllocator settings (Linux), for example narenas:N.
VariableEffect
KABA_SANDBOX_RUNTIMEForce the OCI runtime for the sandbox, for example crun or runc. Must be on PATH.
KABA_PASS_BINPath to the pass executable for the vault backend.
KABA_OP_BINPath to the 1Password op executable.
KABA_TESSDATADirectory of Tesseract language data for OCR.
KABA_ESPEAK_BINPath to espeak-ng for spoken replies.
KABA_FEDERATION_SEEDSSeed nodes for the public-services directory.
KABA_TOOLLOOP_JSPath to an alternative tool-loop script. For development.

kabactl reads many more variables that adjust internals of generation, context management and memory pressure. They are intended for diagnosing a specific problem with guidance, and their defaults are chosen per machine.

  • Generation: KABA_LLAMA_UBATCH, KABA_LLAMA_SEED, KABA_LLAMA_KV_REUSE, KABA_LLAMA_CTX_HEADROOM, KABA_LLAMA_MOE_CPU, KABA_PREFILL_CHUNK, KABA_KV_BUCKET, KABA_FAST_LANE_MAX_TOKENS, KABA_SSE_COALESCE_MS
  • Constrained output: KABA_JSON_GRAMMAR, KABA_CONSTRAINED, KABA_CONSTRAINT, KABA_GRAMMAR_FASTPATH
  • Watchdogs: KABA_INFER_FIRST_TOKEN_SECS, KABA_INFER_HANG_SECS, KABA_INFER_WEDGE_GRACE_SECS, KABA_DECODE_DEADLINE_SECS
  • Context spill: KABA_SPILL_PERSIST, KABA_SPILL_SUMMARIZE, and related KABA_SPILL_*
  • Memory governor: KABA_MEMGUARD_TICK_SECS, KABA_MEMGUARD_MIN_AVAIL_MIB, KABA_MEMGUARD_RSS_TARGET_MIB, KABA_MEMGUARD_VRAM_PCT, KABA_MEMGUARD_PSI
  • Sessions: KABA_SESSION_SLOTS_MAX, KABA_SESSION_SLOT_IDLE_SECS
  • Training: KABA_TRAIN_MAX_SAMPLES, KABA_GRAD_CHECKPOINT, KABA_SUMMARISE_BATCH, KABA_SUMMARISE_PARALLEL
  • GPU: KABA_GPU_DEVICE, KABA_VRAM_DEVICE, KABA_WHISPER_GPU, KABA_NEUTTS_GPU_LAYERS
  • Timing output: KABA_PERF, KABA_GEN_TIMING, KABA_LAYER_TIMING

[todo: document defaults and accepted values for the advanced tuning variables.]