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. See note below.
max_tokensu3216384Global max tokens for all operations
sandboxboolfalseRestrict filesystem writes to working directory. Also available as --sandbox CLI flag.
auto_capabilitiesbooltrueEnable automatic capability activation on user messages. Disable to require manual capability(action="enable") calls.
systemstring (optional)noneLegacy global system-prompt override. When set, it applies as a fallback system prompt for roles that define none. Shown commented-out in default.toml; prefer per-role system instead.

About the default value: "assistant:concierge" is a tap agent addressed as category:variant, shipped by the built-in default tap muvon/tap (which resolves to the GitHub repo github.com/muvon/octomind-tap) — not a role defined in this config file. If you search this file for a concierge role you will not find one. A bare tag without a colon (e.g. "developer") resolves against your local [[roles]]; a category:variant tag resolves against installed taps.

Performance & Limits

FieldTypeDefaultDescription
mcp_response_tokens_thresholdusize20000Hard limit on MCP response tokens. Responses truncated when exceeded. 0 = unlimited.
max_session_tokens_thresholdusize200000Max tokens per session before truncation. Also acts as the hard compression ceiling and the denominator for context-pressure hints (see [compression]). 0 = disabled. Validation fails if > 2,000,000.
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. Mirrored at runtime by the /effort <level> session command.
cache_keepalive_enabledboolfalseKeep prompt cache warm with periodic pings while the session idles. Provider-aware: currently only Anthropic is pinged, and the ping interval comes from the provider's cache TTL (1h), not from this config.
cache_keepalive_max_idle_secondsu641800Stop pinging this many seconds after last user activity. 0 = ping until session ends. Validation fails if > 86400 (24h).

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.

toml
[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.

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

Priority (highest wins): CLI --model > the active role's model > root config.model (resolved in src/session/chat/session/core.rs). For a tap agent, a [taps] entry overrides the config.model tier:

  1. --model CLI flag (if provided)
  2. The model the agent's role/manifest declares (for developer:general, the manifest's role model)
  3. Global model in config — which a [taps] entry for "developer:general" replaces when set

[taps] only applies to tap agents (tags with :); it acts at the config.model tier, so it takes effect only when neither --model nor the agent's role sets a model. Plain role names use their [[roles]] model if set, otherwise 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)

[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"
toml
[[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 code. 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):

ServerToolsDescription
coreplan, tapHigh-level planning and tap (agent registry) management
runtimemcp, agent, skill, schedule, capabilityHarness reconfiguration and scheduling
agentagent_<name> per [[agents]] entryACP sub-agent dispatch

filesystem is not declared here. Default roles reference a filesystem server in their server_refs, but it is not a builtin and is not defined in this config file's [[mcp.servers]]. It is an external stdio server backed by octofs, provided by the built-in tap. Its tools are view, text_editor, batch_edit, extract_lines, shell, and workdir. See MCP Tools for the full surface.

Common Fields

FieldTypeRequiredDescription
namestringyesUnique server identifier
typestringyes"builtin", "http", or "stdio"
timeout_secondsu64noResponse 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
timeoutu6430Script timeout in seconds (1-3600)
toml
[[hooks]]
name = "github-push"
bind = "0.0.0.0:9876"
script = "/path/to/process-github-push.sh"
timeout = 30

[[layers]]

Reusable ACP-invocable units used by [[commands]]. Layers delegate to roles via the ACP protocol — the actual model, system prompt, and MCP configuration live in [[roles]], not here.

Multi-step AI workflows are no longer defined in this config. Use the external CLI: octomind workflow <file.toml> — see doc/usage/09-workflows.md.

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). The only optional field.
input_modestringrequiredHow input is fed: "last", "all", "summary"
output_modestringrequiredHow output affects session: "none", "append", "replace", "last", "restart"
output_rolestringrequiredRole for output messages: "assistant", "user"

input_mode, output_mode, and output_role have no default — config loading fails if any is omitted. Only workdir is optional.

toml
[[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"

[[commands]]

Custom session commands triggered with /run <name>. Uses the exact same schema as [[layers]] (same LayerConfig struct) — see the field table above, including the required input_mode / output_mode / output_role fields. The only difference is invocation: [[commands]] entries are run manually from a session via /run <name>, while [[layers]] are orchestration units invoked over ACP. For [[commands]], name is the token you type after /run.

toml
[[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
toml
[[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
toml
[[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
toml
[skills]
auto_activation = true
auto_validation = false
activation_timeout = 3
validation_timeout = 60
max_retries = 3

auto_validation scope: this flag gates only the validate scripts declared inside SKILL.md files. It does not gate the separate guardrail [[validator]] system in .agents/guardrails.toml — those end-of-turn validators run unconditionally regardless of this setting.

[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_intervalusize5Minimum tool executions between hints
knowledge_retentionusize10Max critical knowledge entries retained across compressions

Disabling compression: if [[compression.pressure_levels]] is empty, compression is disabled entirely and the compression-model validation is skipped. Independently, max_session_tokens_threshold (see Performance & Limits) acts as a hard token ceiling separate from these pressure levels.

[[compression.pressure_levels]]

FieldTypeDescription
thresholdusizeToken count threshold to trigger compression
target_ratiof64Compression 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"openai:gpt-5-mini"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_timeoutu6430Retry backoff base (seconds)
ignore_costboolfalseWhen true, compression cost is not tracked
toml
[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 = "openai:gpt-5-mini"
max_tokens = 16000
temperature = 0.3
top_p = 1.0
top_k = 0
max_retries = 1
retry_timeout = 30
ignore_cost = false

[supervisor]

The out-of-band control plane around the agent loop. It hosts learning (distill + recall), orientation memory, deterministic detectors, and the verify-gate. See the Supervisor guide for how the mechanics fit together. Strict: the [supervisor] section and its required keys must be present — a missing section or key is a hard parse error, not a silent default. Breaking change: the former top-level [learning] table now lives at [supervisor.learning] — there is no migration.

FieldTypeDefaultDescription
enabledbooltrueMaster switch for the whole control plane
modelstring"anthropic:claude-haiku-4-5"Shared cheap model for supervisor mechanics (a mechanic may override)

[supervisor.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_intermediateusize3Min user messages before intermediate learning triggers
max_injectusize5Max lessons injected into system prompt

[supervisor.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.

[supervisor.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.

[supervisor.orientation]

Durable understanding of the subject (decisions, structure, constraints), stored in the same backend as lessons under memory_type = "orientation" and recalled as working assumptions to verify, never as truth.

FieldTypeDefaultDescription
enabledbooltrueEnable orientation memory
max_injectusize5Max orientation entries injected per session
decay_daysu6490Entries unused this many days lose confidence (no git)

[supervisor.detectors]

Deterministic, free, every-turn signals that decide when (rarely) to wake the model. Fused with the agent's own <sup>…</sup> self-report token.

FieldTypeDefaultDescription
loop_thresholdusize3Identical tool+args this many times in a row → loop fired
no_progress_windowusize5Turns without new information → drift candidate
self_reportbooltrueInject the self-report status-token instruction and parse it back

[supervisor.gate]

Verify-gate on self-reported completion.

FieldTypeDefaultDescription
enabledbooltrueEnable the verify-gate
max_iterationsu82Max gate re-entry iterations (bounds over-verification)

[supervisor.condense]

Task-aware narrowing of oversized tool outputs. One cheap-model call per round selects, by line ranges over a numbered copy, what the current task needs; kept lines are reconstructed verbatim (never rewritten). Full originals are spilled to session files first (lossless — the condensed result carries the path). The mcp_response_tokens_threshold prefix-cut still applies afterwards as the hard ceiling.

FieldTypeDefaultDescription
enabledbooltrueEnable condensation
tokens_thresholdusize2000Per-result trigger (estimated tokens); 0 = off. Keep well below mcp_response_tokens_threshold
modelstringanthropic:claude-haiku-4-5Model that does the narrowing (cheap + fast recommended)
toml
[supervisor]
enabled = true
model = "anthropic:claude-haiku-4-5"

[supervisor.learning]
enabled = true
model = "anthropic:claude-haiku-4-5"
backend = "file"
min_messages_for_intermediate = 3
max_inject = 5

[supervisor.orientation]
enabled = true
max_inject = 5
decay_days = 90

[supervisor.detectors]
loop_threshold = 3
no_progress_window = 5
self_report = true

[supervisor.gate]
enabled = true
max_iterations = 2

[supervisor.condense]
enabled = true
tokens_threshold = 2000
model = "anthropic:claude-haiku-4-5"

[registry]

Controls caching of agent manifests fetched from taps. Registry sources themselves are managed with octomind tap <url> [path] / octomind untap <name>.

FieldTypeDefaultDescription
cache_ttl_hoursu6424How long a fetched tap manifest is cached before re-checking.

Fetched manifests are cached at <data>/agents/<category>/<variant>.toml. Within the TTL the cached manifest is served immediately; once stale, the cached copy is still served (stale-serve) while a background refresh fetches the latest version. See Tap System for the registry behavior.

toml
[registry]
cache_ttl_hours = 24

Guardrails (.agents/guardrails.toml)

Project-level guardrails are configured in .agents/guardrails.toml in the working directory, not in the main config file. That file holds four distinct mechanisms — [[guard]], [[hook]], [[validator]], and [[pipe]]. Only [[pipe]] is detailed below; see Guardrails for the full reference.

Do not confuse the guardrail [[hook]] (a post-result script in .agents/guardrails.toml) with the top-level [[hooks]] config above (webhook HTTP listeners for daemon mode). They are entirely separate concepts.

TablePurpose
[[guard]]Pre-call deny rule — blocks a tool call before it runs.
[[hook]]Post-result script run after a tool call (on = "success" or "failure").
[[validator]]End-of-turn script run on the new call-log slice (cursor-based), with optional role filter. Runs regardless of [skills].auto_validation.
[[pipe]]Pre-model input transform (detailed below).

[[pipe]] — Pre-Model Input Transform

Preprocesses user input through an external script before the model sees it. At most one [[pipe]] may match per message.

FieldTypeRequiredDefaultDescription
namestringyesPipe identifier (used in errors and PIPE_NAME env var)
commandstringyesScript path (relative to workdir or absolute)
whenstringno"any""first" = first message only; "any" = every message
matchstringnoRegex on user message text. Empty = match all.
rolesstring[]noRestrict to roles (exact or domain-prefix match). Empty = all roles.
toml
# .agents/guardrails.toml
[[pipe]]
name = "prepare"
command = "./prepare.sh"
when = "first"
match = "^/deploy"
roles = ["developer:general"]

Environment variables set when spawning: OCTOMIND_ROLE, OCTOMIND_WORKDIR, PIPE_NAME, PIPE_RUN_COUNT, SESSION_MESSAGE_COUNT. Timeout: 300 seconds.

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

These variables are substituted in role system and welcome fields at prompt-expansion time:

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
{{GIT_TREE}}Project file tree
{{README}}Contents of README.md in project root
{{CONTEXT}}Session context (for layers)
{{SYSTEM}}Parent system prompt (for layers)

{{HOME}} is not substituted here. It is only resolved by the octomind vars command listing, not in system/welcome prompts. Using {{HOME}} in a role prompt leaves the literal text in place — use an absolute path or {{CWD}} instead.