-
-
Notifications
You must be signed in to change notification settings - Fork 5
Configuration
CortexPrism edited this page Jun 17, 2026
·
1 revision
CortexPrism stores its configuration in ~/.cortex/config.json (created by cortex setup).
{
"version": 1,
"defaultProvider": "anthropic",
"providers": {
"anthropic": { "kind": "anthropic", "model": "claude-sonnet-4-5", "apiKey": "sk-..." },
"openai": { "kind": "openai", "model": "gpt-4o", "apiKey": "sk-..." },
"google": { "kind": "google", "model": "gemini-2.0-flash", "apiKey": "..." },
"ollama": { "kind": "ollama", "model": "llama3.2", "baseUrl": "http://localhost:11434" }
},
"agent": {
"name": "Cortex",
"maxTurns": 8,
"streamOutput": true
},
"router": {
"enabled": false,
"strategy": "cascade",
"confidenceThreshold": 0.7,
"cascade": [
{ "provider": "ollama", "model": "llama3.2:3b" },
{ "provider": "anthropic", "model": "claude-haiku-4-5" }
]
},
"modelSelection": {
"enabled": true,
"mode": "balanced",
"observeThreshold": 50,
"enforceConfidence": 0.85,
"suggestConfidence": 0.65
},
"update": {
"channel": "stable",
"checkOnStartup": true,
"autoUpdate": false,
"checkIntervalHours": 24
},
"pluginUpdate": {
"checkOnStartup": true,
"autoUpdate": false,
"checkIntervalHours": 24
},
"voice": {
"enabled": false,
"provider": "openai",
"defaultVoice": "alloy",
"autoTTS": false
},
"logging": {
"level": "info",
"fileEnabled": true,
"fileMaxBytes": 10485760,
"fileMaxFiles": 5
},
"webAuth": {
"requireAuth": false
}
}{ "kind": "anthropic", "model": "claude-sonnet-4-5", "apiKey": "sk-ant-...", "reasoningEffort": "medium" }{ "kind": "openai", "model": "gpt-4o", "apiKey": "sk-...", "baseUrl": "https://api.openai.com/v1" }{ "kind": "google", "model": "gemini-2.0-flash", "apiKey": "..." }{ "kind": "ollama", "model": "llama3.2", "baseUrl": "http://localhost:11434" }{ "kind": "bedrock", "model": "us.amazon.nova-pro-v1:0", "region": "us-east-1" }{ "kind": "openrouter", "model": "openai/gpt-4o", "apiKey": "...", "httpReferer": "https://myapp.com" }{ "kind": "perplexity", "model": "sonar-pro", "apiKey": "...", "searchRecencyFilter": "week" }{ "kind": "ollama", "model": "llama3.2", "numCtx": 8192, "keepAlive": "5m" }| Variable | Purpose |
|---|---|
CORTEX_DATA_DIR |
Override data directory (default: ~/.cortex/data/) |
CORTEX_CONFIG_DIR |
Override config directory (default: ~/.cortex/) |
CORTEX_VAULT_KEY |
Vault decryption passphrase |
CORTEX_LOG_LEVEL |
Override log level (trace, debug, info, warn, error, silent) |
GITHUB_TOKEN |
GitHub personal access token |
GH_TOKEN |
Alternative GitHub token |
OPENAI_API_KEY |
OpenAI API key (alternative to config) |
The router supports two strategies:
Tries cheapest provider first, escalates on low confidence.
{
"router": {
"enabled": true,
"strategy": "cascade",
"confidenceThreshold": 0.7,
"cascade": [
{ "provider": "ollama", "model": "llama3.2:3b" },
{ "provider": "anthropic", "model": "claude-sonnet-4-5" }
]
}
}Routes based on prompt complexity scoring.
{
"router": {
"enabled": true,
"strategy": "threshold",
"confidenceThreshold": 0.5,
"threshold": {
"strongProvider": "anthropic",
"strongModel": "claude-sonnet-4-5",
"weakProvider": "ollama",
"weakModel": "llama3.2:3b",
"scorer": "heuristic"
}
}
}{
"logging": {
"level": "info",
"fileEnabled": true,
"filePath": "~/.cortex/data/logs/cortex.log",
"fileMaxBytes": 10485760,
"fileMaxFiles": 5,
"otlp": {
"endpoint": "http://localhost:4318"
},
"langfuse": {
"publicKey": "pk-lf-...",
"secretKey": "sk-lf-..."
}
}
}- LLM Providers — All 24 supported providers
- Model Routing — Router strategies
- Observability — Logging, metrics, and tracing
CortexPrism — Open-source agentic AI harness · MIT License · Built with Deno 2.x + TypeScript