Skip to content

Configuration ​

Kompile separates user-level configuration under ~/.kompile/ (and ~/.kompile/config/) from project-scoped overrides under <project>/.kompile/ and <project>/.mcp.json. CLI wizards, / commands, the web UI, and REST endpoints all read and write these same JSON files.

Precedence rule: CLI flags / environment variables → per-session snapshot (where supported) → project config (<project>/.kompile/ or <project>/config/) → user config (~/.kompile/ or ~/.kompile/config/) → built-in defaults.

Interactive CLI Wizards ​

Running bare kompile configure opens a unified numbered menu covering every subsystem, or invoke any wizard directly:

bash
kompile onboard                 # First-run: detect/install harnesses, auth, import chats, peers
kompile explain [section]       # Inspect everything installed and configured
kompile configure --status      # Print configuration summary and exit
kompile configure init          # Initialize ~/.kompile/ and project .kompile/ defaults
kompile configure app           # 9-section server/pipeline wizard (vector store, embeddings, flags)
kompile configure chat          # Chat session mode, LLM provider, model, and agent defaults
kompile configure ui            # Chat display layout, sidebar, and inline content routing
kompile configure passthrough   # Inspect external harnesses and MCP/tool injection setup
kompile configure enforcer      # Per-project policy rules, banned tools, judge mode, semantic rules
kompile configure judge         # Judge backend, direction checks, and quality scoring
kompile configure code-index    # Configure and index source trees for local code search
kompile configure mcp           # MCP profile, schema level, and custom MCP servers
kompile configure gateway       # LLM-based tool gateway evaluation rules
kompile configure agent-defaults # Default model and per-model thinking for Codex/Claude/OpenCode

CLI & Harness User Configuration (~/.kompile/) ​

FileManaged viaWhat it controls
~/.kompile/chat-config.jsonkompile configure chat, /config, /modelDefault chat mode (local/server), LLM provider, model, system prompt, auto-compaction
~/.kompile/chat-profiles.jsonChat launch profilesNamed, credential-free chat launch presets
~/.kompile/harness-config.jsonkompile configure judge, /judgeJudge backend/model, performance harness, build/script/lane/draft enforcer switches
~/.kompile/auth.jsonkompile auth, /authStored provider credentials, OAuth tokens, and blob-store secrets (never echoed)
~/.kompile/config/update.jsonkompile update channelActive release channel (prerelease default or stable), checkOnStartup, checkIntervalHours
~/.kompile/config/subagent-config.json/subagent-configSubagent concurrency cap, model glob bans, token/time budgets, failover routes, auto-resume, tool preloads
~/.kompile/config/agent-flags.jsonAgent overridesPer-agent CLI flag overrides
~/.kompile/config/judge-defaults.json/judgeDefault judge provider/model preferences
~/.kompile/config/model-prices.json/costUser overrides/additions to the built-in model token pricing catalog
~/.kompile/config/gc-config.json/gcStore retention defaults (chatMaxAgeDays, chatMaxTotalMb, chatMaxPerSource, trashGraceDays)
~/.kompile/config/resume.json/resume, /resume-allSession resume and crash-recovery defaults
~/.kompile/config/terminal.jsonTerminal integrationPersistent terminal emulator preferences for /resume-all
~/.kompile/config/mcp-servers.jsonkompile mcp add --scope userUser-scoped custom MCP servers (overridden by project .mcp.json by name)
~/.kompile/config/a2a-agents.jsonA2A integrationRemote Agent-to-Agent (A2A) peer endpoints
~/.kompile/config/subprocess-backend-config.jsonDistribution / ND4JBackend jar resolution rules (extraJarRoots, jarNamePatterns, mavenSearchGroupPaths)
~/.kompile/process-limits.json/process-config globalGlobal background process timeouts (maxRuntimeMinutes, testTimeoutMinutes, idleTimeoutMinutes, maxConcurrent)
~/.kompile/resource-policy.json/resources globalGlobal command classification (low / high) for resource-lane admission
~/.kompile/hooks.json/hooksGlobal Claude-style tool hooks
~/.kompile/lsp-servers.jsonlsp toolCustom language-server binaries, fallback alternatives, or disabled languages
~/.kompile/config/tool-gateway-config.jsonkompile configure gatewayTool gateway model source, fail-open mode, timeout, and judge scoring
~/.kompile/config/tool-gateway-rules.jsonkompile config tool-gatewayCustom allow/deny/judge tool gateway rules

Project-Scoped Configuration (<project>/.kompile/) ​

FileManaged viaWhat it controls
.kompile/enforcer-config.jsonkompile configure enforcer, /judgeProject judge rules, workflow mode (off/advisory/enforced), required skills/memories, memory mandate
.kompile/enforcer-diff-patterns.jsonkompile enforcerBootstrapped diff-pattern rules for enforced turns
.kompile/resource-policy.json/resourcesProject-specific low/high command admission rules (overrides ~/.kompile/resource-policy.json)
.kompile/resource-monitor.json/resource-monitorProject CPU/RAM/GPU pressure thresholds and subprocess monitoring settings
.kompile/chat-continue.json/continue, /continue-triggerProject-global auto-continue switch, reply text, and trigger keywords
.kompile/hooks.json/hooksProject-scoped pre/post tool hooks
.kompile/lsp-check.jsonlsp action=checkC/C++/CUDA compileDatabases map and defaultBackends for fail-closed clangd checks
.mcp.jsonkompile project open, kompile mcp addProject MCP servers (Kompile stdio/SSE + project custom MCP servers)
kompile.project.jsonkompile project initProject root marker, metadata, and generated-project settings

Server, Crawl & Pipeline Configuration (~/.kompile/config/ or <project>/config/) ​

FileWhat it controls
app-index-config.jsonVector store type (Anserini/pgvector/Chroma/Vespa), index paths, subprocess settings, batch sizes
pipeline-config.jsonBatch sizes, thread counts (embedding, chunking, indexing), chunking strategy and parameters
subprocess-ingest-config.jsonSubprocess JVM heap, timeout, parallel workers, queue capacity
nd4j-environment-config.jsonND4J threads, BLAS settings, CUDA config, Triton compiler, SameDiff optimizer, memory limits
feature-flags-config.jsonToggles: guardrails, query transformation, contextual RAG, tool gateway, KV cache, graph RAG, multi-modal
model-roles-config.jsonDense/sparse retrieval models, reranking model, hybrid search weights
llm-provider-config.jsonServer LLM provider, model, API key reference, base URL
backup-config.jsonBackup schedule, retention, format

Auto-configuration (Server) ​

Probe hardware (GPU count, VRAM, CPU cores, RAM) and apply recommended subprocess, ND4J, and pipeline settings simultaneously:

bash
# Preview what would change
curl http://localhost:8080/api/auto-configure/detect

# Detect hardware and apply recommended settings
curl -X POST http://localhost:8080/api/auto-configure/apply

Config archives ​

Export and import all server configs as a portable .zip bundle via CLI (kompile config export / kompile config import), the web UI (Settings → Config Archive Manager), or the REST API:

bash
curl -X POST http://localhost:8080/api/config-archives/export -o config-backup.zip
curl -X POST http://localhost:8080/api/config-archives/import -F file=@config-backup.zip

Environment Variables ​

VariableEffect
KOMPILE_UPDATE_CHANNEL (KOMPILE_CHANNEL)Override release channel (prerelease or stable) for kompile update, startup checks, and installers
KOMPILE_NO_UPDATE_CHECKSet to 1 or true to disable automatic startup update pings (also disabled when CI=true)
KOMPILE_INSTALL_DIR / KOMPILE_DIST_HOMEOverride the active Kompile distribution install root (default ~/.kompile)
KOMPILE_VERSION / KOMPILE_VARIANT / KOMPILE_BASE_URLOverride version, variant, or mirror URL in install.sh, install.ps1, and kompile update
KOMPILE_HARNESS_TIERInstaller tier preference for cli-harness: native or jvm
KOMPILE_MODIFY_PATHSet to 0 to skip shell PATH profile edits during installation
GITHUB_TOKEN / GH_TOKENOptional GitHub token used for authenticated api.github.com release lookups

Quick lookup: when to configure what ​

If you want to...Use...
Switch update channel or disable startup update pingskompile update channel stable / kompile update channel --startup-check off
Change chat provider, model, or thinking effort/auth, /model, /thinking, or kompile configure chat
Cap subagent concurrency, tokens, or ban models/subagent-config (~/.kompile/config/subagent-config.json)
Gate heavy builds/tests behind resource admission/resources (.kompile/resource-policy.json)
Bound background process runtimes/process-config (~/.kompile/process-limits.json)
Configure judge rules or workflow gates/judge, kompile configure enforcer (.kompile/enforcer-config.json)
Install custom MCP serverskompile mcp add ...; see Custom MCP servers
Change embedding/reranking models or batch sizesmodel-roles-config.json, pipeline-config.json, or kompile configure app
Tune ND4J / CUDA / Triton settingsnd4j-environment-config.json or POST /api/auto-configure/apply

Released under the Apache-2.0 License.