Config file reference

Every field in a cortex config file, what it means and what it overrides.

Locations

SourcePathNotes
User config~/.config/cortex/config.yamlHonours XDG_CONFIG_HOME
Project config./cortex.yamlOverrides user config, field by field
EnvironmentLLM_*Overrides both
Explicit--config <path>Disables the cascade entirely

Fields

FieldTypeDescription
namestringLabels this agent personality (e.g. cortex, reviewer). Shown in the banner.
providerstringThe axon provider name (e.g. openai, openrouter). Supplies a default base_url for known providers.
modelstringThe model within that provider (e.g. gpt-4o, deepseek/deepseek-v3.2).
system_promptstringThe agent's role text. A path is read from disk; prose is used as written. Omit to use the built-in coding-agent prompt. Must not enumerate tools — axon appends the catalog.
prunerobjectThe secondary model for context pruning. See below.
mcp_serversmapMCP subprocesses to spawn at startup. See below.

pruner

FieldTypeDescription
pruner.providerstringProvider for the pruner model. Defaults to the main provider if omitted.
pruner.modelstringThe cheap, fast model used for context pruning. Empty means no pruner.

mcp_servers

Each key is a server name. Each value has:

FieldTypeDescription
commandstringThe executable to spawn.
args[]stringArguments passed to the command.
env[]stringEnvironment variables for the spawned process. Literal values — no $ expansion.

Environment overrides

Only model selection is overridable by the environment. Credentials and endpoints are axon's concern.

VariableOverrides
LLM_PROVIDERprovider
LLM_MODELmodel
LLM_BASE_URLThe provider's default base_url
LLM_API_KEYAPI key (see API keys)
⚠️
Providers and credentials are not in this file. cortex does not define endpoints or carry credentials — those live in axon's providers.json or theLLM_* environment. cortex only names which provider and model to use.