Configuration Reference

Complete field-by-field reference for `~/.local/share/octomind/config/config.toml`.

All values shown match config-templates/default.toml. Fields marked (required) have no fallback default.

Root-Level Settings

FieldTypeDefaultDescription
versionu321Config version. Do not modify. Used for automatic upgrades.
log_levelstring"info"Logging verbosity: "none", "info", "debug"
modelstring"openrouter:anthropic/claude-sonnet-4"Default model in provider:model format
defaultstring"assistant:concierge"Default tag when no TAG passed to octomind run
max_tokensu3216384Global max tokens for all operations
custom_instructions_file_namestring"INSTRUCTIONS.md"File auto-loaded as user message in new sessions. Empty string to disable.
custom_constraints_file_namestring"CONSTRAINTS.md"File appended to each request in <constraints> tags. Empty string to disable.
sandboxboolfalseRestrict filesystem writes to working directory. Also available as --sandbox CLI flag.

Performance & Limits

FieldTypeDefaultDescription
mcp_response_tokens_thresholdu3220000Hard limit on MCP response tokens. Responses truncated when exceeded. 0 = unlimited.
max_session_tokens_thresholdu32200000Max tokens per session before truncation. 0 = disabled.
max_retriesu321Retry attempts for API calls.
retry_timeoutu3230Base timeout in seconds for exponential backoff.
request_timeout_secondsu32300Per-request HTTP timeout in seconds. Hard limit on LLM provider API calls. 0 = no timeout.
reasoning_effortenum"medium"Thinking model effort: "low", "medium", "high", "xhigh", "max". Non-thinking models ignore it.
cache_keepalive_enabledboolfalseKeep prompt cache warm with periodic pings while session idles. Provider-aware (only pings providers that support refresh-on-read).
cache_keepalive_max_idle_secondsu641800Stop pinging this many seconds after last user activity. 0 = ping until session ends.

User Interface

FieldTypeDefaultDescription
enable_markdown_renderingbooltruePretty-print AI responses with markdown rendering.
markdown_themestring"default"Theme: "default", "dark", "light", "ocean", "solarized", "monokai"
max_session_spending_thresholdf640.0USD limit per session. Prompts before continuing when exceeded. 0.0 = no limit.
max_request_spending_thresholdf640.0USD limit per request. Stops execution when exceeded. 0.0 = no limit.

[capabilities]

Map of capability name to provider override. Used by tap agents to route specific capabilities to different providers.

[capabilities]
codesearch = "octocode"  # uses capabilities/codesearch/octocode.toml

Empty by default. Each key maps to a provider TOML file within the tap's capabilities/ directory.

[taps]

Map of tap agent tag to model override. Set a preferred model for specific tap agents.

[taps]
"developer:general" = "ollama:glm-5"
"octomind:assistant" = "openai:gpt-4o"

Priority: CLI --model > taps override > role.model > config.model When you run octomind run developer:general, the model is resolved in this order:

  1. --model CLI flag (if provided)
  2. [taps] override for "developer:general" (if configured)
  3. Global model in config

Empty by default. Only applies to tap agents (tags with :). Plain role names use role.model or config.model.

[[roles]]

Define custom roles that override or extend tap-provided agents.

FieldTypeRequiredDescription
namestringyesRole identifier (e.g., "developer", "assistant")
modelstringnoModel override for this role (provider:model format)
systemstringnoSystem prompt. Supports template variables.
welcomestringnoWelcome message shown on session start. Supports template variables.
temperaturef64noSampling temperature (0.0-2.0)
top_pf64noNucleus sampling (0.0-1.0)
top_ku32noTop-k token limit (1-1000)
workflowstringnoWorkflow name to activate for this role
pipelinestringnoPipeline name to activate for this role (runs before workflow)

[roles.mcp]

MCP configuration for the role.

FieldTypeDefaultDescription
server_refsstring[][]MCP server names to enable for this role
allowed_toolsstring[][]Tool access patterns. Empty = all tools. Supports wildcards: "core:*", "filesystem:view"
[[roles]]
name = "assistant"
temperature = 0.3
top_p = 0.7
top_k = 20
system = """
You are helpful and knowledgeable assistant.
Working directory: {{CWD}}
"""
welcome = "Hello! Ready to help. Working in {{CWD}} (Role: {{ROLE}})"

[roles.mcp]
server_refs = ["core", "runtime", "filesystem", "agent"]
allowed_tools = ["core:*", "runtime:*", "filesystem:*", "agent:*"]

[mcp]

Global MCP (Model Context Protocol) configuration.

FieldTypeDefaultDescription
allowed_toolsstring[][]Global tool restrictions. Empty = no restrictions. Fallback when role doesn't specify.

[[mcp.servers]]

MCP server definitions. Three types supported: builtin, http, stdio.

Builtin servers (always available, no external process):

NameToolsPurpose
coreplan, schedule, capability, tapHigh-level day-to-day tools
runtimemcp, agent, skillLow-level harness reconfiguration
agentagent_<name> per [[agents]] entryACP sub-agent dispatch

filesystem is no longer a builtin — it's an external stdio server backed by octofs. See MCP Tools for the tool surface.

Common Fields

FieldTypeRequiredDescription
namestringyesUnique server identifier
typestringyes"builtin", "http", or "stdio"
timeout_secondsu32noResponse timeout (default: 30)
toolsstring[]noTool filter. Empty = all tools. Supports wildcards: "github_*"
auto_bindstring[]noRole names to auto-include this server for

HTTP-Specific Fields

FieldTypeRequiredDescription
urlstringyesServer endpoint URL

OAuth Authentication: HTTP servers requiring authentication are handled automatically via MCP Authorization Discovery (RFC 9728). No manual configuration needed — just provide the URL and Octomind will discover OAuth endpoints, register via CIMD/DCR, and authenticate using PKCE.

Stdio-Specific Fields

FieldTypeRequiredDescription
commandstringyesExecutable to run
argsstring[]noCommand arguments

[[hooks]]

Webhook HTTP listeners that pipe payloads through scripts and inject output into sessions.

FieldTypeDefaultDescription
namestringrequiredUnique hook identifier
bindstringrequiredHTTP server address (e.g., "0.0.0.0:9876")
scriptstringrequiredPath to executable script
timeoutu3230Script timeout in seconds (1-3600)
[[hooks]]
name = "github-push"
bind = "0.0.0.0:9876"
script = "/path/to/process-github-push.sh"
timeout = 30

[[pipelines]]

Deterministic script-driven processing steps that run before workflows.

FieldTypeRequiredDescription
namestringyesPipeline identifier
descriptionstringyesHuman-readable description

[[pipelines.steps]]

FieldTypeRequiredDescription
namestringyesStep identifier
typestringyes"once", "loop", "foreach", "conditional"
commandstringconditionalScript path to execute (required for once, conditional)
exit_patternstringconditionalRegex to stop loop (required for loop)
parse_patternstringconditionalRegex to extract items (required for foreach)
max_iterationsu32noMax loop iterations (default: 10)
condition_patternstringconditionalRegex for conditional branching
on_matchstring[]noCommands to run when condition matches
on_no_matchstring[]noCommands to run when condition doesn't match
timeoutu64noScript timeout in seconds (default: 30, max: 3600)

Substeps are nested as [[pipelines.steps.substeps]] with the same schema.

[[pipelines]]
name = "context_pipeline"
description = "Gather context before AI processing"

[[pipelines.steps]]
name = "detect_files"
type = "once"
command = "./scripts/detect-files.sh"
timeout = 30

[[pipelines.steps]]
name = "enrich"
type = "once"
command = "./scripts/enrich-context.py"
timeout = 60

[[workflows]]

Multi-step AI processing workflows.

FieldTypeRequiredDescription
namestringyesWorkflow identifier
descriptionstringyesHuman-readable description

[[workflows.steps]]

FieldTypeRequiredDescription
namestringyesStep identifier
typestringyes"once", "loop", "foreach", "conditional", "parallel"
layerstringconditionalLayer name (required for once, conditional)
exit_patternstringconditionalRegex to stop loop (required for loop)
parse_patternstringconditionalRegex to extract items (required for foreach)
max_iterationsu32noMax loop iterations
condition_patternstringconditionalRegex for conditional branching

Substeps are nested as [[workflows.steps.substeps]] with the same schema.

[[workflows]]
name = "developer_workflow"
description = "Two-stage workflow: refine task, then research context"

[[workflows.steps]]
name = "refine"
type = "once"
layer = "task_refiner"

[[workflows.steps]]
name = "research"
type = "once"
layer = "task_researcher"

[[layers]]

AI processing layers used by workflows and commands. Layers delegate to roles via ACP protocol — the actual model, system prompt, and MCP configuration live in [[roles]], not here.

FieldTypeDefaultDescription
namestringrequiredLayer identifier
descriptionstringrequiredHuman-readable description (used in help, MCP)
commandstringrequiredACP command to execute: "octomind acp <role_name>"
workdirstring"."Working directory (relative to session workdir)
input_modestringnoHow input is fed: "last", "all", "summary"
output_modestringnoHow output affects session: "none", "append", "replace", "last", "restart"
output_rolestringnoRole for output messages: "assistant", "user"
[[layers]]
name = "task_refiner"
description = "Refines and clarifies user requests for better processing by subsequent layers"
command = "octomind acp task_refiner"
input_mode = "last"
output_mode = "none"
output_role = "assistant"

[[layers]]
name = "task_researcher"
description = "Gathers information and context needed for development tasks through code analysis"
command = "octomind acp task_researcher"
input_mode = "last"
output_mode = "append"
output_role = "assistant"

[[commands]]

Custom session commands triggered with /run <name>. Uses the same schema as [[layers]].

FieldTypeDefaultDescription
namestringrequiredCommand identifier (used as /run <name>)
descriptionstringrequiredHuman-readable description (shown in help text)
commandstringrequiredACP command to execute: "octomind acp <role_name>"
workdirstring"."Working directory (relative to session workdir)
input_modestringnoHow input is fed: "last", "all", "summary"
output_modestringnoHow output affects session: "none", "append", "replace", "last", "restart"
output_rolestringnoRole for output messages: "assistant", "user"
[[commands]]
name = "reduce"
description = "Compress session history for cost optimization during ongoing work"
command = "octomind acp reduce"
input_mode = "all"
output_mode = "replace"
output_role = "assistant"

[[agents]]

Specialized AI agents using ACP protocol. Each becomes an MCP tool (agent_<name>).

FieldTypeDefaultDescription
namestringrequiredAgent identifier. Tool becomes agent_<name>.
descriptionstringrequiredMCP tool description shown to the AI
commandstringrequiredShell command starting an ACP server over stdio
workdirstring"."Working directory for subprocess
[[agents]]
name = "context_gatherer"
description = "Gather detailed context from files and codebase."
command = "octomind acp context_gatherer"
workdir = "."

[[prompts]]

Reusable prompt templates accessible via /prompt <name>.

FieldTypeRequiredDescription
namestringyesPrompt identifier
descriptionstringyesShown in /prompt list
promptstringyesPrompt text injected into session
[[prompts]]
name = "review"
description = "Request code review with focus on best practices"
prompt = """Please review the code above focusing on:
- Code quality and best practices
- Security considerations
- Performance implications"""

[skills]

Automatic skill activation and validation.

FieldTypeDefaultDescription
auto_activationbooltrueEnable declarative rule-based activation (checks on every user message)
auto_validationboolfalseEnable validate script execution at end of assistant turns
activation_timeoutu643Reserved. Rules evaluate in-process (no timeout needed)
validation_timeoutu6460Seconds per validate script. 0 = unlimited
max_retriesu323Max validation retries per skill before giving up
[skills]
auto_activation = true
auto_validation = false
activation_timeout = 3
validation_timeout = 60
max_retries = 3

[compression]

Automatic context compression system.

FieldTypeDefaultDescription
hints_enabledbooltrueEnable compression system
hints_pressure_thresholdf640.7Context pressure threshold (0.0-1.0) to start showing hints
hints_min_intervalu325Minimum tool executions between hints
knowledge_retentionu3210Max critical knowledge entries retained across compressions

[[compression.pressure_levels]]

| Field | Type | Description | | threshold | u64 | Token count threshold to trigger compression | | target_ratio | f64 | Compression strength (2.0 = 50% reduction, 4.0 = 75%, 8.0 = 87.5%) |

Default pressure levels:

ThresholdTarget RatioEffect
600002.0Light: 50% reduction
1200004.0Medium: 75% reduction
1600008.0Aggressive: 87.5% reduction

[compression.decision]

Model used for compression decisions and summary generation.

FieldTypeDefaultDescription
modelstring"anthropic:claude-haiku-4-5"Fast, cheap model recommended
max_tokensu3216000Max tokens for decision + summary
temperaturef640.3Lower = more consistent decisions
top_pf641.0Nucleus sampling
top_ku320Top-k (0 = disabled)
max_retriesu321Retry attempts
retry_timeoutu3230Retry backoff base
ignore_costboolfalseWhen true, compression cost is not tracked
[compression]
hints_enabled = true
hints_pressure_threshold = 0.7
hints_min_interval = 5
knowledge_retention = 10

[[compression.pressure_levels]]
threshold = 60000
target_ratio = 2.0

[[compression.pressure_levels]]
threshold = 120000
target_ratio = 4.0

[[compression.pressure_levels]]
threshold = 160000
target_ratio = 8.0

[compression.decision]
model = "anthropic:claude-haiku-4-5"
max_tokens = 16000
temperature = 0.3
top_p = 1.0
top_k = 0
max_retries = 1
retry_timeout = 30
ignore_cost = false

[learning]

Cross-session adaptive learning. Extracts lessons from sessions and injects them into future sessions. See Learning Guide for full details.

FieldTypeDefaultDescription
enabledbooltrueEnable the learning system
modelstring"anthropic:claude-haiku-4-5"Model for extraction and retrieval LLM calls
backendstring"file"Backend: "file" or "mcp"
min_messages_for_intermediateu323Min user messages before intermediate learning triggers
max_injectu325Max lessons injected into system prompt

[learning.store] (MCP backend only)

FieldTypeDescription
toolstringMCP tool name for storing lessons (e.g. "memorize")
field_maptableMaps canonical fields to MCP argument names. Empty string = omit.

[learning.retrieve] (MCP backend only)

FieldTypeDescription
toolstringMCP tool name for retrieving lessons (e.g. "remember")
field_maptableMaps canonical fields to MCP argument names. Empty string = omit.
[learning]
enabled = true
model = "anthropic:claude-haiku-4-5"
backend = "file"
min_messages_for_intermediate = 3
max_inject = 5

Multi-File Configuration

Octomind supports split-file configuration. All *.toml files in the config directory are merged:

  1. config.toml is loaded first
  2. Other *.toml files are loaded alphabetically
  3. Arrays of tables (e.g., [[mcp.servers]]) are concatenated
  4. Same-name entries are deduplicated (last wins)
  5. Scalar values are overridden by later files

This allows organizing config by concern (e.g., mcp-github.toml, layers-custom.toml).

Special Case: mcp-*.toml Override Files

Files matching the pattern mcp-*.toml are loaded AFTER all other *.toml files, regardless of their alphabetical position. This ensures they can reliably override same-named MCP servers defined in earlier files like mcp.toml.

Without this special handling, mcp.toml would lexicographically sort after mcp-github.toml and silently overwrite any server overrides.

This mechanism is used by the mcp persist command, which writes to <config_dir>/mcp-<name>.toml with auto_bind = ["<role>"]. These persisted servers are automatically available on the next startup without manual server_refs edits.

Template Variables

Available in system and welcome fields:

VariableDescription
{{CWD}}Current working directory
{{ROLE}}Active role name
{{DATE}}Current date
{{SHELL}}User's shell
{{OS}}Operating system
{{BINARIES}}Available binary tools
{{GIT_STATUS}}Git repository status
{{README}}Contents of README.md in project root
{{CONTEXT}}Session context (for layers)
{{SYSTEM}}Parent system prompt (for layers)