Configuration Reference
All configuration lives in ~/.openalice/data/config/ as JSON files (the user-data home; OPENALICE_HOME overrides the root, Docker mounts a volume there). Missing files are auto-created with defaults on startup. Config files support hot-reload — changes take effect on the next request without restart. The one exception is accounts.json, which is sealed (encrypted at rest) and managed through the Web UI rather than hand-edited.
This page is a reference, not the recommended first-run path. For normal setup:
- Use the browser settings and setup wizards as the main configuration surface.
- Add model credentials through the AI Provider page.
- Add broker accounts through the Trading page wizard.
- Use Settings for hot-reloaded config where the UI exposes an editor.
- Edit JSON directly only when you need a field the UI does not expose yet.
The files fall into three buckets:
| Bucket | Files | How to change them |
|---|---|---|
| UI-managed secrets | ai-provider-manager.json, accounts.json | Use the Web UI; accounts.json is sealed |
| Hot-reloaded config | agent.json, market-data.json, trading.json, news.json, tools.json, webhook.json | UI Settings or direct JSON edit |
| Startup / boundary config | ports.json, auth.json, mcp.json fallback | Edit, then restart when noted |
ai-provider-manager.json
The credential vault — api-key credentials injected into workspaces. As of 0.40 there's no in-process model loop, so this file holds no backends or active-profile pointer; just a map of slug → credential. Edit it through the Web UI's AI Provider page rather than by hand.
| Field | Type | Default | Description |
|---|---|---|---|
credentials | Record<string, Credential> | {} | Saved credentials, keyed by an arbitrary slug |
workspaceCredentialDefaults | Record<agentId, { credentialSlug, model? }> | {} | Credential/model seeded into each new workspace for that agent |
workspaceDefaultAgent | string | null | null | Default runtime for new interactive workspace sessions; shell is not stored as a default |
issueDefaultAgent | string | null | null | Separate default runtime for issue-triggered headless work |
Each Credential:
| Field | Type | Description |
|---|---|---|
vendor | enum | anthropic / openai / google / minimax / glm / kimi / deepseek / longcat / custom |
label | string | Optional human-readable name; the map key remains the stable slug |
authType | "api-key" | "subscription" | api-key stores the key here; subscription defers to the CLI's own login |
apiKey | string | The secret (present for api-key) |
wires | Record<WireShape, string> | Map of wire shape (anthropic / openai-chat / openai-responses) → endpoint URL. One key can declare several |
lastModel | string | Last model selected with this credential; used as the next workspace/quick-chat default |
Credentials are deduplicated by { vendor, authType, apiKey } — re-saving the same key upgrades its wires in place. See AI Providers for the full model.
accounts.json
UTA (Unified Trading Account) definitions. Array of UTA objects, preset-driven — you pick a presetId from the broker preset catalog and fill presetConfig with the values that preset's Zod schema requires.
Sealed at rest. Unlike every other config file,
accounts.jsonis encrypted (AES-256-GCM) under a machine-bound key at~/.openalice/sealing.key, so broker credentials never sit on disk in plaintext. That means it's UI-managed, not hand-edited — add and edit accounts through the Web UI's account form. The fields below describe the logical shape the UI writes. See Data & Credentials.
| Field | Type | Default | Description |
|---|---|---|---|
id | string | — | Unique UTA identifier; used as the aliceId prefix |
label | string | — | Display name (optional, defaults to id) |
presetId | string | — | One of the catalog ids: binance, okx, bybit, hyperliquid, bitget, ccxt-custom, alpaca, ibkr-tws, longbridge, leverup-monad, mock-simulator |
enabled | boolean | true | Whether to load this UTA on startup |
guards | array | [] | Optional advanced push-time middleware configs: [{ type, options }] |
presetConfig | object | {} | User-supplied form values, validated against the chosen preset's own Zod schema |
ephemeral | boolean | — | Test/throwaway UTA — purged at every startup (~/.openalice/data/trading/<id>/ wiped). Only allowed on mock-simulator; setting it on a real broker would destroy account history at next boot. |
keyless | boolean | false | Public-data only, no API key. Serves K-lines/quotes but refuses orders; excluded from portfolio equity. Implies readOnly. |
readOnly | boolean | false | Watch-only — orders refused. Can also be set on a keyed account |
editable | boolean | true | Whether the UI can modify/remove it (the built-in data UTAs are non-editable) |
Optional keyless data UTAs.
trading.jsoncan enable Binance, OKX, and Bybit public-data sources. Enabled entries are materialized at UTA startup asbinance-readonly/okx-readonly/bybit-readonly; they are code-defined, not written to sealedaccounts.json. The default list is empty. See Keyless Data Accounts.
The presetConfig shape varies by preset:
| Preset | Required presetConfig fields |
|---|---|
binance | mode (live | demo), apiKey, secret |
okx | mode (live | demo), apiKey, secret, password |
bybit | mode (live | testnet | demo), apiKey, secret |
hyperliquid | mode (live | testnet), walletAddress, privateKey |
bitget | mode (live | demo), apiKey, secret, password |
ccxt-custom | exchange; optional sandbox, demoTrading, apiKey, secret, password, uid, walletAddress, privateKey |
alpaca | mode (paper | live), apiKey, apiSecret |
ibkr-tws | optional host (default 127.0.0.1), port (default 7497), clientId (default 0), accountId |
longbridge | mode (live | paper), appKey, appSecret, accessToken |
leverup-monad | mode (live | testnet), privateKey |
mock-simulator | cash (starting USD, default 100000) — in-memory simulator, testing only |
Manage trading accounts through the Web UI wizard when possible; the file is sealed at rest and not meant to be hand-edited for ordinary setup. See Trading Setup.
engine.json
Core engine settings.
| Field | Type | Default | Description |
|---|---|---|---|
pairs | string[] | ["BTC/USD", "ETH/USD", "SOL/USD"] | Default trading pairs |
interval | number | 5000 | Tick loop interval (ms) |
port | number | 3000 | Legacy port setting |
agent.json
AI agent behavior.
| Field | Type | Default | Description |
|---|---|---|---|
maxSteps | number | 20 | Max tool-call steps per run |
allowAiTrading | boolean | false | Whether agent tradingPush may dispatch committed operations directly. Keep false for manual Web UI approval; only effective with Pro trading capability. |
claudeCode.disallowedTools | string[] | (see below) | Tools blocked in the workspace Claude Code CLI |
claudeCode.maxTurns | number | 20 | Max conversation turns for a headless Claude run |
Default disallowed tools: Task, TaskOutput, AskUserQuestion, TodoWrite, NotebookEdit, Skill, EnterPlanMode, ExitPlanMode, mcp__claude_ai_Figma__*
ports.json
The four service ports, read by the Guardian supervisor before it spawns the processes. This is the authoritative place to change ports.
| Field | Type | Default | Description |
|---|---|---|---|
web | number | 47331 | Alice backend / Web UI + API |
mcp | number | 47332 | MCP server (served at /mcp, loopback only) |
uta | number | 47333 | UTA service (loopback only) |
ui | number | 5173 | Vite dev server (dev only) |
Precedence per port: an env override (OPENALICE_WEB_PORT, OPENALICE_MCP_PORT, OPENALICE_UTA_PORT, OPENALICE_UI_PORT) wins over ports.json, which wins over the defaults. Defaults probe upward if taken; an explicitly-set port that's in use fails loudly instead.
connectors.json
Bind config for the running Alice process (hot-reloaded). Ports themselves come from ports.json / env above; connectors.json carries the rest.
| Field | Type | Default | Description |
|---|---|---|---|
web.port | number | 3002 | Legacy fallback only — ports.json / OPENALICE_WEB_PORT (47331) take precedence. |
mcp.json
MCP server configuration — exposes the ToolCenter to external MCP clients and the workspace CLIs. The listener is always bound to loopback and never honors OPENALICE_BIND_HOST (it carries the full, unauthenticated tool surface). See MCP & CLI Access.
| Field | Type | Default | Description |
|---|---|---|---|
port | number | 3001 | Legacy fallback only — ports.json / OPENALICE_MCP_PORT (47332) take precedence. |
auth.json
The admin-token gate for the web boundary. Generated on first boot; the token is printed once to stdout and stored only as a scrypt hash. Rotate by deleting this file and restarting. See Data & Credentials.
| Field | Type | Description |
|---|---|---|
version | number | Record version (1) |
scheme | string | Always "scrypt" |
salt | string | base64 salt fed to scrypt |
hash | string | base64 scrypt digest of the admin token (never the plaintext) |
params | object | scrypt cost params { N, r, p, keyLen } |
createdAt | string | ISO timestamp of first generation |
lastRotatedAt | string | ISO timestamp of the last rotation |
Loopback requests bypass the gate entirely (zero-friction dev); set OPENALICE_TRUSTED_PROXIES for reverse-proxy setups or OPENALICE_DISABLE_AUTH=1 to opt out.
crypto.json
Legacy global crypto provider. New installs typically leave this as { "provider": { "type": "none" } } and use accounts.json per-account presetConfig instead. Kept for backwards compatibility.
| Field | Type | Default | Description |
|---|---|---|---|
provider | discriminated union | { type: "none" } | { type: "ccxt", exchange, apiKey?, apiSecret?, password?, sandbox?, demoTrading?, options? } or { type: "none" } |
guards | array | [] | Legacy global guard middleware (rarely used) |
securities.json
Legacy global securities provider. Same deprecation story as crypto.json — prefer per-account config.
| Field | Type | Default | Description |
|---|---|---|---|
provider | discriminated union | { type: "none" } | { type: "alpaca", apiKey?, secretKey?, paper? } or { type: "none" } |
guards | array | [] | Legacy global guard middleware |
market-data.json
Market data settings. The data engine runs in-process through the SDK — the external openbb-api backend was removed, so there's no sidecar to configure. See the Data Hub page for the resolution model.
| Field | Type | Default | Description |
|---|---|---|---|
hub.enabled | boolean | true | Use the hosted Data Hub for low-frequency data (zero-key). false = bring-your-own-keys only |
hub.baseUrl | string | "https://traderhub.openalice.ai" | Hub endpoint; point at a self-hosted relay to keep the zero-key model on your own infra |
providers.equity | string | "yfinance" | Default equity data provider (fallback path) |
providers.crypto | string | "yfinance" | Default crypto data provider |
providers.currency | string | "yfinance" | Default currency data provider |
providers.commodity | string | "yfinance" | Default commodity data provider |
providerKeys | object | {} | Per-install vendor keys: fred, fmp, eia, bls, nasdaq, tradingeconomics, econdb, intrinio, benzinga, tiingo, biztoc. Merge local-wins with the global provider-keys.json |
provider-keys.json
User-global data-vendor keys at the ~/.openalice root (above data/), shared across every checkout and the desktop app on this machine. The location is overridable via OPENALICE_GLOBAL_DIR (default ~/.openalice/provider-keys.json) — resolved off the real home directory independently of OPENALICE_HOME, so it stays global even when OPENALICE_HOME=$PWD pins data/ to a checkout. Same key set as market-data.json → providerKeys; the per-install file overrides this one key-by-key. Missing FRED / EIA / BLS keys route through the Hub's keyed proxy automatically. See Data Hub — provider keys.
trading.json
Trading-engine knobs.
| Field | Type | Default | Description |
|---|---|---|---|
mode | "lite" | "readonly" | "pro" | auto | Global UTA capability. Auto chooses Pro when saved UTA accounts exist, otherwise Lite. OPENALICE_TRADING_MODE wins and locks the UI. |
observeExternalOrdersEvery | string | "15m" | How often to scan the broker for orders placed outside OpenAlice and record them as [observed] commits. off disables; 1m / 5m / 10m / 15m otherwise. See Orders & Execution |
keylessDataSources | ("binance" | "okx" | "bybit")[] | [] | Opt-in public crypto K-line sources materialized as read-only data UTAs at UTA startup |
Use Settings → Agent Permissions for mode and the Trading page for public
data-source toggles. Those UI flows coordinate the UTA stop/start needed for a
runtime change; direct JSON edits do not provide that feedback.
news.json
News collector settings.
| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Master switch |
intervalMinutes | number | 10 | Fetch interval |
maxInMemory | number | 2000 | Max items in memory buffer |
retentionDays | number | 7 | Items older than this not loaded on startup |
feeds | array | (8 default feeds) | RSS/Atom feed definitions |
Default feeds: Federal Reserve Press, ECB Press, MarketWatch Top Stories, WSJ Markets, CNBC Economy, Nikkei Asia, SCMP Business, CoinDesk.
snapshot.json
Account snapshot settings.
| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Enable scheduled snapshots |
every | string | "15m" | Snapshot interval |
compaction.json
Context window management.
| Field | Type | Default | Description |
|---|---|---|---|
maxContextTokens | number | 200000 | Context window size |
maxOutputTokens | number | 20000 | Max output tokens |
autoCompactBuffer | number | 13000 | Buffer before triggering compaction |
microcompactKeepRecent | number | 3 | Recent entries to keep during micro-compaction |
tools.json
Tool enable/disable.
| Field | Type | Default | Description |
|---|---|---|---|
disabled | string[] | [] | Tool names to disable globally |
web-subchannels.json
Web UI sub-channel definitions. Array of channel objects. This is an advanced config file for specialized chat surfaces; most installs never need to edit it directly.
| Field | Type | Default | Description |
|---|---|---|---|
id | string | — | URL-safe identifier (lowercase alphanumeric with - / _) |
label | string | — | Display name |
systemPrompt | string | — | System prompt override for this channel |
disabledTools | string[] | — | Additional tool names to disable on top of the global tools.disabled list |
Persona overlay
Alice's persona is a Markdown file that the engine prepends to the system prompt on every generation. It defines her identity and speaking style.
The persona uses a two-tier default + user override pattern:
| Default (git-tracked) | User override (gitignored) |
|---|---|
default/persona.default.md | data/brain/persona.md |
On first run, the default is auto-copied to the override path. Edit the user file to customize without touching version control — updates to the default won't overwrite your customizations. The persona is composed into each workspace's instruction file (CLAUDE.md + AGENTS.md) at create time; the Web UI's settings panel exposes an editor that writes to the same file.
Next Steps
- Installation Overview — Choose the right run path for your machine.
- AI Providers — Manage model credentials without hand-editing the vault.
- Trading Setup — Manage sealed broker config through the wizard.
- Remote Access — Understand auth, ports, and network exposure.