Skip to content

Config

Complete reference for AlphaBase configuration schema and precedence.

AlphaBase reads configuration from multiple sources and merges them into one runtime config object.

File Formats

AlphaBase accepts:

  • JSON
  • JSONC (JSON with comments and trailing commas)

Recommended header:

{
"$schema": "https://alphabase.ai/config.json"
}

Value Interpolation

Config files support inline interpolation:

  • {env:VAR_NAME}: substitute an environment variable
  • {file:relative-or-absolute-path}: read file content and inject it

Example:

{
"$schema": "https://alphabase.ai/config.json",
"provider": {
"openai": {
"options": {
"apiKey": "{env:OPENAI_API_KEY}"
}
}
}
}

Precedence (Low -> High)

Runtime merge order is:

  1. Remote .well-known/alphabase config (if provider auth exposes one)
  2. Global config (~/.config/alphabase/alphabase.json{,c})
  3. Custom config path (ALPHABASE_CONFIG)
  4. Project config (alphabase.json{,c} found upward in workspace)
  5. .alphabase directory config + assets (agents/, commands/, plugins/, etc.)
  6. Inline JSON (ALPHABASE_CONFIG_CONTENT)
  7. Managed enterprise config directory (highest priority)

Merge Semantics

  • Config is deep-merged, not replaced.
  • plugin and instructions arrays are merged as unique unions.
  • Legacy tools booleans are mapped into permission for backward compatibility.
  • If autoshare: true is present and share is missing, AlphaBase migrates to share: "auto".

Top-Level Keys

KeyTypePurpose
$schemastringJSON schema URL
themestringUI theme
keybindsobjectKeymap overrides
logLevelenumRuntime log level
tuiobjectTUI behavior (scroll_speed, diff_style)
serverobjectserve / web listener config
commandrecordInline slash command templates
skillsobjectAdditional skill paths/URLs
watcherobjectIgnore patterns for watchers
pluginstring[]Plugin module entries
snapshotbooleanSnapshot behavior toggle
share`manualauto
autoupdate`boolean”notify”`
disabled_providersstring[]Provider blocklist
enabled_providersstring[]Provider allowlist
modelprovider/modelPrimary model
small_modelprovider/modelLightweight helper model
default_agentstringDefault primary agent
usernamestringChat display name override
agentrecordAgent definitions/overrides
providerrecordProvider/model override tree
mcprecordMCP server definitions
formatter`objectfalse`
lsp`objectfalse`
instructionsstring[]Extra instruction files/patterns
permission`objectstring`
toolsrecordDeprecated permission alias
enterpriseobjectEnterprise URL wiring
compactionobjectContext compaction policy
experimentalobjectFeature flags and adaptive budget
troubleshooterobjectSmart troubleshooter settings

Server Config

{
"server": {
"port": 4096,
"hostname": "127.0.0.1",
"mdns": false,
"mdnsDomain": "alphabase.local",
"cors": ["http://localhost:5173"],
"tls": false
}
}

Provider Config

provider.<id> supports:

  • whitelist, blacklist
  • models.<modelID> overrides
  • models.<modelID>.variants.<name>.disabled
  • options.apiKey
  • options.baseURL
  • options.enterpriseUrl
  • options.setCacheKey
  • options.timeout (number or false)

See Providers and Models.

Agent Config

You can override built-ins (build, plan, general, explore) or define custom agents.

{
"agent": {
"build": {
"model": "openai/gpt-5",
"permission": {
"bash": "ask",
"edit": "allow"
},
"steps": 12
},
"reviewer": {
"mode": "subagent",
"description": "Read-only review agent",
"permission": {
"edit": "deny",
"bash": "ask"
}
}
}
}

MCP Config

Two MCP forms are supported:

  • type: "local" with command, args, and optional env
  • type: "remote" with url, optional headers, optional oauth

Experimental + Adaptive Budget

Notable fields:

  • experimental.batch_tool
  • experimental.plan_auto_switch
  • experimental.mcp_timeout
  • experimental.adaptive_budget.enabled
  • experimental.adaptive_budget.auto_model_fallback
  • experimental.adaptive_budget.fallback_chain

Environment Overrides

Important runtime env knobs:

  • ALPHABASE_CONFIG
  • ALPHABASE_CONFIG_CONTENT
  • ALPHABASE_CONFIG_DIR
  • ALPHABASE_DISABLE_PROJECT_CONFIG
  • ALPHABASE_PERMISSION (merged into permission)

Deprecated Fields

  • autoshare -> use share
  • mode -> use agent
  • tools -> use permission
  • agent.maxSteps -> use agent.steps