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]

KeyDefaultDescription
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]

KeyDefaultDescription
primaryclaude-opus-4-8Used for complex reasoning and code review tasks
fallbackgemini-2.0-flashUsed if the primary model fails or for general tasks
fastgemini-2.0-flashUsed for cheap/quick inference tasks
localollama/llama3.2Used 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_urlhttp://localhost:11434Local Ollama server address

[memory]

KeyDefaultDescription
short_term_ttl3600Redis TTL in seconds for active conversation context
long_term_days90Retention window for SQLite long-term memory
redis_urlredis://localhost:6379Short-term memory backend
qdrant_urlhttp://localhost:6333Semantic search backend
sqlite_path~/.cortexflow/memory.dbLong-term memory database file

[voice]

KeyDefaultDescription
sttwhisperwhisper or none
ttskokoroelevenlabs, kokoro, system, or none
tts_voiceRachelElevenLabs voice name (or cloned voice ID)
stt_modelbasefaster-whisper model size: tiny/base/small/medium/large-v3
stt_devicecpucpu or cuda
tts_enginekokoroLocal fallback engine
elevenlabs_api_key""Supports ENV: resolution
elevenlabs_voice_id""Set automatically after cortex voice clone

[gateway]

KeyDefaultDescription
port7432Gateway listen port (WebSocket + REST)
bind127.0.0.1Use 0.0.0.0 to accept connections from other hosts/containers

[ui]

KeyDefaultDescription
web_port3000Next.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"