Configuration
CortexFlow-AI reads ~/.cortexflow/config.toml. Every section has sane defaults — most deployments only need [agent] and one [channels.*] block.
Minimal config
[agent]
[channels.telegram]
bot_token = "ENV:TELEGRAM_BOT_TOKEN"
Secret resolution
Any string value prefixed with ENV: resolves to that environment variable at load time, so secrets never need to live in the file itself:
bot_token = "ENV:TELEGRAM_BOT_TOKEN"
[agent]
| Key | Default | Description |
name | "My Assistant" | Display name used in status output and the system prompt |
model | "auto" | "auto" enables task-aware routing; set explicitly to pin one model |
[models]
| Key | Default | Description |
primary | claude-opus-4-8 | Used for complex reasoning and code review tasks |
fallback | gemini-2.0-flash | Used if the primary model fails or for general tasks |
fast | gemini-2.0-flash | Used for cheap/quick inference tasks |
local | ollama/llama3.2 | Used in privacy mode — zero external API calls |
anthropic_api_key | "" | Supports ENV: resolution |
gemini_api_key | "" | Supports ENV: resolution |
deepseek_api_key | "" | Supports ENV: resolution |
ollama_base_url | http://localhost:11434 | Local Ollama server address |
[memory]
| Key | Default | Description |
short_term_ttl | 3600 | Redis TTL in seconds for active conversation context |
long_term_days | 90 | Retention window for SQLite long-term memory |
redis_url | redis://localhost:6379 | Short-term memory backend |
qdrant_url | http://localhost:6333 | Semantic search backend |
sqlite_path | ~/.cortexflow/memory.db | Long-term memory database file |
[voice]
| Key | Default | Description |
stt | whisper | whisper or none |
tts | kokoro | elevenlabs, kokoro, system, or none |
tts_voice | Rachel | ElevenLabs voice name (or cloned voice ID) |
stt_model | base | faster-whisper model size: tiny/base/small/medium/large-v3 |
stt_device | cpu | cpu or cuda |
tts_engine | kokoro | Local fallback engine |
elevenlabs_api_key | "" | Supports ENV: resolution |
elevenlabs_voice_id | "" | Set automatically after cortex voice clone |
[gateway]
| Key | Default | Description |
port | 7432 | Gateway listen port (WebSocket + REST) |
bind | 127.0.0.1 | Use 0.0.0.0 to accept connections from other hosts/containers |
[ui]
| Key | Default | Description |
web_port | 3000 | Next.js web UI dev/serve port |
[channels.<name>]
Every channel block supports enabled (boolean) plus channel-specific keys — see Channels for the full per-platform reference.
[channels.discord]
enabled = true
bot_token = "ENV:DISCORD_BOT_TOKEN"