Arcana ARCANA

Configuration

Arcana is configured through JSON config files — a project-level arcana.json plus an optional global file. Most settings have sensible defaults and can be overridden with environment variables.

Tip

Prefer environment variables for API keys so they stay out of version control.

Config file location

Arcana merges configuration from three layers, later winning:

LayerPathNotes
Global~/.config/arcana/arcana.json (or .jsonc)Created automatically with a $schema stub on first run
Projectarcana.json / arcana.jsonc in your repoArcana walks up parent directories to find the nearest one
Environmentenv varsAlways win for API keys and provider overrides

The legacy layout is still loaded: ~/.arcana/config.json, with the root overridable via ARCANA_HOME:

export ARCANA_HOME=/custom/path
# Legacy config is then loaded from /custom/path/config.json

Escape hatches: ARCANA_CONFIG / ARCANA_CONFIG_DIR / ARCANA_CONFIG_CONTENT point config at an explicit path or inline JSON, and ARCANA_DISABLE_PROJECT_CONFIG=1 ignores project files entirely. Unknown keys are rejected with a validation error.

Full config reference

{
  "$schema": "https://arcana.otnelhq.com/config.json",
  "model": "anthropic/claude-sonnet-4-6",
  "small_model": "anthropic/claude-haiku-4-5",
  "provider": "openai",
  "utilityModel": "gpt-4o-mini",
  "apiKey": "sk-...",
  "default_agent": "primary",
  "instructions": ["Always run tests after refactoring"],
  "agent": {
    "reviewer": { "description": "Code review agent", "model": "anthropic/claude-opus-4" }
  },
  "permission": {
    "edit": "allow",
    "bash": "ask",
    "webfetch": "deny"
  },
  "mcp": {
    "browser": { "type": "local", "command": ["agent-browser", "mcp", "--tools", "core"], "enabled": true }
  },
  "dataDir": "~/.arcana/data",
  "skillsDirs": ["~/.arcana/skills"],
  "memory": {
    "enabled": true,
    "maxSessions": 1000
  },
  "cron": {
    "enabled": true,
    "intervalSeconds": 60
  },
  "gateway": {
    "telegram": { "token": "...", "allowedUsers": ["12345678"] },
    "discord": { "token": "...", "allowedChannels": ["987654321"] },
    "slack": { "botToken": "xoxb-...", "signingSecret": "...", "allowedChannels": ["C0123"] },
    "whatsapp": { "phoneNumberId": "...", "accessToken": "...", "appSecret": "...", "allowedUsers": ["14155551234"] }
  }
}

Core settings

KeyTypeDefaultDescription
providerstringauto-detectedLLM provider (openai, anthropic, gemini, etc.)
modelstringauto-detectedModel ID (gpt-4o, claude-sonnet-4, or provider/model)
small_modelstringCheap model for extraction and compaction (new-style key)
utilityModelstringmain modelCheap model for extraction and compaction (legacy key, still honored)
apiKeystringProvider API key (prefer env vars)
default_agentstringprimaryAgent used when none is specified
instructions[]string[]Project instructions injected into every session
agent{}objectCustom agents: description, mode, model, permission, disable
permission{}objectPer-tool allow/ask/deny with glob patterns (last match wins). See Permissions
mcp{}objectMCP servers: local command[] or remote url + headers. See MCP & Tools
dataDirstring~/.arcana/dataDirectory for sessions, memory, and local DB

Provider auto-detection

If neither provider nor model is set in the config or environment, Arcana auto-detects from available API keys using the models.dev catalog (200+ models across 33 providers).

# Set a provider key — Arcana detects it automatically
export OPENAI_API_KEY=sk-...
arcana run "hello"  # Uses OpenAI automatically

Memory settings

KeyTypeDefaultDescription
memory.enabledbooleantrueEnable conversation memory and fact extraction
memory.maxSessionsnumber1000Maximum sessions to retain in local DB

Memory stores conversation history, extracted facts, and skill usage stats in SQLite under ~/.arcana/data/.

Session compaction

Long sessions auto-summarize near the context limit (default 85%).

KeyTypeDefaultDescription
compaction.autobooleantrueEnable automatic compaction
compaction.threshold_percentnumber85Trigger when usage reaches this % of context (1–100)
compaction.intrabooleantrueMid-loop compact during multi-step tool runs
compaction.intra_min_stepsnumber3Min agent loop steps before intra compact
compaction.intra_min_tokensnumber5000Min usage before intra compact is worth it
{
  "compaction": {
    "auto": true,
    "threshold_percent": 85,
    "intra": true
  }
}

Set "intra": false to only compact between user turns. Set "auto": false to disable all auto compact (manual /compact still works).

Warning

Setting "auto": false will stop all automatic compaction. You can still compact manually with /compact.

Cron settings

KeyTypeDefaultDescription
cron.enabledbooleantrueEnable the cron scheduler
cron.intervalSecondsnumber60How often the scheduler checks for due jobs

Skills settings

KeyTypeDefaultDescription
skillsDirsstring[]["~/.arcana/skills", "/skills"]Directories to scan for SKILL.md files

Gateway settings

Configure chat platform adapters. See Gateway for full setup instructions.

KeyTypeDescription
gateway.telegram.tokenstringTelegram bot token
gateway.telegram.allowedUsersstring[]Allowed Telegram user IDs
gateway.discord.tokenstringDiscord bot token
gateway.discord.allowedChannelsstring[]Allowed Discord channel IDs
gateway.slack.botTokenstringSlack bot token (xoxb-...)
gateway.slack.signingSecretstringSlack signing secret
gateway.slack.allowedChannelsstring[]Allowed Slack channel IDs
gateway.whatsapp.phoneNumberIdstringMeta phone number ID
gateway.whatsapp.accessTokenstringMeta access token
gateway.whatsapp.appSecretstringMeta app secret (required for production)
gateway.whatsapp.allowedUsersstring[]Allowed phone numbers (with country code)

Environment variables

All config file settings can be overridden with environment variables.

Env varOverridesDescription
ARCANA_HOMEconfig pathRoot directory for the legacy layout (default: ~/.arcana)
ARCANA_PROVIDERproviderLLM provider
ARCANA_MODELmodelModel ID
ARCANA_API_KEYapiKeyProvider API key
OPENAI_API_KEYapiKeyFallback when provider is openai
ARCANA_SKILLS_DIRSskillsDirsSkill directories (separated by ;)
ARCANA_PROXY_KEYProxy license key (auto-loaded from ~/.arcana/proxy_key)
ARCANA_CONFIGconfig pathExplicit config file path
ARCANA_CONFIG_DIRconfig dirExplicit config directory
ARCANA_CONFIG_CONTENTconfig bodyInline JSON config content
ARCANA_DISABLE_PROJECT_CONFIG=1Ignore project-level arcana.json
ARCANA_PURE=1Skip all external config, skills, and state
ARCANA_SERVER_USERNAMEUsername for non-loopback serve (default arcana)
ARCANA_ENGINE_BASE_URLEngine HTTP endpoint (default http://localhost:4096)
ARCANA_DEPLOYMENT_MODELOCAL, HYBRID, or ENTERPRISE
ARCANA_ML_RUNTIME=1Enable the signal engine (quality gates, auto model switching)

Provider-specific env vars

Env varProvider
ANTHROPIC_API_KEYAnthropic
GEMINI_API_KEYGoogle Gemini
AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEYAmazon Bedrock
CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKENCloudflare Workers AI
XAI_API_KEYxAI (Grok)

Use arcana doctor to confirm which keys are detected.

Data directory

Default: ~/.arcana/data/

PathContents
sessions/Session transcripts
memory.dbSQLite DB with facts, skill stats
cron-jobs.jsonScheduled job definitions
~/.arcana/workspace-trust.jsonTrusted workspace fingerprints (at the Arcana home root, not in data/)

Trust and security settings

SettingLocationDescription
arcana trustCLI commandTrust current workspace for project plugins/tools
ARCANA_DISABLE_WORKSPACE_TRUST=1Env varSkip trust checks (dev only)
ARCANA_TRUST_WORKSPACE=1Env varForce-trust for CI
ARCANA_SERVER_PASSWORDEnv varRequired for non-loopback arcana serve
ARCANA_GATEWAY_OPEN=1Env varAllow empty gateway allowlists (dev only)
Last updated: Aug 20, 2026