bots-garden/mini-mepublic Fork
⑂ v2.1.1
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
configuration.md · 584 lines · 68.4 KBmarkdown
Blame HistoryOpen raw

Reference: configuration file

Neutral, exhaustive description of the YAML file read by mm. Every key is optional; a key left out keeps its built-in default. The file is decoded on top of the defaults, so unknown keys are ignored.

Where mm looks for this file: Configuration file resolution. "Relative to this file" / "relative to the agent file" below means relative to its base directory: the file's own directory, or the project root for a file in a .mm folder.

Top-level keys

Key Type Default Description
provider string dmr Registry key of the LLM server: dmr, llamacpp, llmman, ollama, kronk, mlxserve, razorbill, openai for any other OpenAI-compatible server (see How to use any OpenAI-compatible server), or openai-responses for the same servers through OpenAI's Responses API (see How to keep reasoning and tools together with OpenAI's Responses API). Overridden by AGENT_PROVIDER.
model string huggingface.co/jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M Model identifier in the provider's naming. Overridden by AGENT_MODEL.
baseUrl string "" (provider default) OpenAI-compatible endpoint tried first. Overridden by AGENT_BASE_URL.
fallback string or absent absent (provider default) Endpoint used when baseUrl does not answer /models within 2 s. Absent = provider default; "" = no fallback.
apiKeyEnv string "" (provider default) Name of the environment variable holding the API key.
toolFormat string openai How the tools reach the model. openai: the OpenAI API's tools field, as every server expects. xml_tools: for a model whose chat template reads its tools from an xml_tools variable and writes its calls as <tool_call> text (SmolLM3) — mm sends the tools in chat_template_kwargs.xml_tools (no tools field), writes earlier calls into the history as <tool_call> text, and turns the answer's <tool_call> blocks into tool calls, streamed or not. Any other value: toolFormat must be openai or xml_tools. See How to give tools to a model whose template reads xml_tools.
contextWindow int 0 Tokens the server serves. 0 = ask the server, else unknown. Must be ≥ 0. With a llama.cpp server in router mode (several models behind one port, such as the Llama app), mm asks /props?model=<model>, then /props. A value larger than the window the server reports gives a start-up warning: contextWindow 32768 is larger than the 4096 tokens the server serves — requests fail once the conversation passes 4096: restart the server with a larger window (--ctx-size), or lower contextWindow. A request the server then refuses as too long (llama.cpp exceed_context_size_error, OpenAI context_length_exceeded) is not retried, and the error gives the sizes: the request (4704 tokens) is larger than the server's window (4096) — ….
maxOutput int 16000 Maximum characters a tool returns to the model; longer output keeps its head and up to 2000 characters of tail. Must be > 0.
maxTurns int 10 Maximum model ↔ tools round trips per question. Must be > 0.
previewLines int 20 Lines of a command's output echoed to the terminal. 0 disables the echo. Must be ≥ 0.
displayCommands bool false Print the numbered list of commands and file operations after each answer.
displayHooks bool false Show every hook that ran: event, command, tool or agent, decision, size of the context added (never its text). After each answer in the line mode, -p and the window; as a finished tool call per hook in an editor. See hooks.
showThinking bool true Show what a thinking model reasons about before it answers. Only the display is optional: the reasoning is always read off the wire, because it is what keeps the watchdog alive while the model thinks. See Thinking models.
showCompletionTime bool true Window mode: show ⏱ <duration> in the status bar, ticking while a turn or an /ask runs, then the final duration until the next question. false keeps the status bar to its counters. See the window mode.
renderMarkdown bool true Window mode: draw a finished answer as Markdown — headings, lists, block quotes, rules, tables (aligned; a column too wide is cut with …), fenced code, bold, italic, code, links (text underlined, address dimmed). The answer being written stays raw; its part is rendered once it is complete: at the model's next tool call, or at the end of the turn. false keeps every answer raw. The line mode, -p and an editor always show the text as it is; Ctrl-Y copies the raw Markdown.
showSpeed bool true The model's generation speed in tokens per second. Window mode: ⚡ ~58 tok/s in the status bar while a model call streams (an estimate, refreshed every half second), then ⚡ 59.9 tok/s, the turn's average, until the next answer starts. The turn's average is its tokens over the time the model spent generating them: the tools' run time and the prompt reading are left out. Source: the server's own timings when it sends them (llama-server, MLX-Serve), otherwise measured by mm from the first streamed token to the last. Editor (ACP): each finished call and turn goes in a usage_update's _meta.mm (tokensPerSecond, scope call or turn, source server or measured), which a client that does not know the key ignores. The line mode shows nothing. false turns it off.
system string built-in prompt The system prompt, first message of every history. Three variables are replaced each time a conversation starts (a new session, /new, a resumed one — not before every question, so the server's prompt cache holds): {{date}} today's date, YYYY-MM-DD, local time; {{cwd}} the directory the conversation works in (over ACP, the session's own); {{env.NAME}} the variable NAME — unset, replaced by nothing, with a banner warning; {{config.NAME}} the value NAME of the variables section. A NAME that looks like a secret (…_KEY, …_TOKEN, …_SECRET, …PASSWORD…, …CREDENTIALS…) is a configuration error: the prompt goes to the model, the sessions and the traces. Spaces inside the braces are allowed ({{ date }}). Any other {{…}} is left as written; \{{date}} writes {{date}}. Not replaced in AGENTS.md. A session that crosses midnight keeps its date until /new.
variables map name → string none The file's own values for the system prompt, used there as {{config.NAME}}. A value may hold {{date}}, {{cwd}} and {{env.NAME}} (expanded, the same secret check), not another {{config.…}}. Names: letters, digits, _ and -, not starting with a digit. A {{config.NAME}} the section does not have is a configuration error. Example: variables: {project: "mini-me, a coding agent written in Go"}, then You help with {{config.project}}. in system.
turnReminder string "" A text appended to every question the model reads, under a [reminder] line, after the preGeneration hooks, in every front end (line mode, window, -p, editor). Kept in the history, like a hook's context; a question recalled with ↑ comes back without it. For a small model, a rule placed next to the question is followed more often than the same rule in the system prompt: measured with LFM2.5-24B-A2B in the Go coder now in demos/gpt-oss-mini-coder (first built as demos/lfm-coder), a rule asking it to call ask_user when a decision is missing was followed 0 times out of 5 from the system prompt, and 3 out of 3 next to the question with the exact call shape. Empty = none.
structuredOutput string (Go declarations) "" The shape every answer must follow, as JSON: Go type declarations and one var naming the root of the answer. See structuredOutput below. Empty = free-text answers. Incompatible with any declared tool.
decision mapping or absent absent Makes the agent a decider: its model is a decision model served by POST /v1/systemone, and every message it receives is answered with these questions. See decision below. Providers llamacpp, llmman, ollama, openai only.
skillRouting mapping minConfidence: 0.6, timeout: 2s, no decider Before each turn, ask a decider which skill applies, and append the $skill line when it is confident enough. See skillRouting below. Off without a decider.
toolRouting mapping dropBelow: 0.2, timeout: 2s, no decider Before each turn, ask a decider which tool groups the request needs, and leave out of the request the groups it rules out. See toolRouting below. Off without a decider.
skillsDir string skills Directory holding the skills, as <name>.md files or <name>/SKILL.md directories. A relative path is resolved from the directory mm is started in (terminal mode, or ACP mode without a config file), or next to the config file (ACP mode with one); the banner warns with the absolute path when nothing is found there. In terminal mode, when that directory holds no skill and the same relative path next to the configuration file's base directory does, that one is used and the banner says skills: N (from <dir>): an agent file kept in one place and named with -config from another project keeps its skills.
bashTool bool true Declare bash. false removes it: the model can still read and edit files (editTools) and load skills, but never runs a command. Reword a system prompt that still announces a bash tool.
editTools bool true Declare read_file, write_file, edit_file. false leaves bash and read_skill only.
fetchContentTool bool false Declare fetch_content, which fetches web pages as Markdown. Off by default: it is the only built-in tool that reaches the network.
planTool bool true Declare plan, through which the model keeps a plan of tasks during multi-step work. false removes it. See tools and Manage plans and tasks.
askUserTool bool true Declare ask_user, through which the model asks the user questions (pick one, pick several, type a text, yes or no) and waits for the answers. false removes it: the model cannot ask. Never declared beside a structuredOutput. Overridden by AGENT_ASK_USER; for an agent asked by another one, also by the asker's mmConfigs.<name>.askUser. See tools.
saveAnswerTool bool false Declare save_answer, which writes an answer the model already gave to a new file: the model sends a file name, not the text again. Off by default. The /save command exists either way. See tools.
unloadModels bool true The /unload [model] command (terminal, window, editor) and the unload_model tool, which free a model from the server's memory: llmman and Ollama, Kronk, llama-server in router mode. false removes both. The tool is never declared beside a structuredOutput or a decision block. See tools and How to free a model's memory.
unloadOnExit bool true When mm exits — /quit, Ctrl-C at the prompt, Ctrl-D, the window closed, the end of a -p run, the editor closing the ACP session, SIGTERM, SIGHUP — unload the agent's model from the server's memory, so it does not keep its RAM after the session. One 🧹 line on stderr (none in ACP mode); nothing when the model was not loaded or the server cannot unload (dmr, openai, a single-model llama-server). Bounded to 3 s: a server that does not answer never holds the exit. Only the agent's own model — not the decision models, not the mmConfigs agents (each unloads its own when it stops). false: the model stays loaded (faster next start, or another session or tool uses it — mm does not know who else uses it). Independent of unloadModels. Overridden by AGENT_UNLOAD_ON_EXIT. See How to free a model's memory.
llamacpp {autoStart, server, ctxSize, modelsMax, modelsMemoryMargin, fitTarget, sleepIdleSeconds, specDefault, serverArgs, startTimeout} autoStart: false Provider llamacpp only. autoStart: true: when nothing answers at the agent's address (a loopback one, AGENT_BASE_URL unset) nor on 8080 nor at the fallback, mm starts llama-server in router mode with the agent's model (downloaded on first load), waits until it is loaded, and stops it with the last mm session using it; a server mm did not start is never stopped. server: the executable (default llama-server, then llama serve, on the PATH). Launch settings, each one optional, each one a llama-server flag (absent = llama-server's default): ctxSize (--ctx-size), modelsMax (--models-max), modelsMemoryMargin (--models-memory-margin), fitTarget (--fit-target), sleepIdleSeconds (--sleep-idle-seconds, -1 allowed), specDefault (--spec-default); a negative value is a configuration error. serverArgs: any other flag, added last. startTimeout (default 15m): start, download and load. Registry and log: <user cache dir>/mm/llama-server/<host>-<port>/. mm init asks for a llamacpp agent on this machine (--autostart, default yes; --launch-settings, the Llama app's values, default no). See Let mm start llama-server.
razorbill {autoStart, server, config, serverArgs, startTimeout} autoStart: false Provider razorbill only. autoStart: true: when nothing answers at the agent's address (a loopback one, AGENT_BASE_URL unset) nor at the fallback, mm starts rzb serve --host <host> --port <port>, runs rzb models pull <model> when the server does not list the model, and stops the server with the last mm session using it; a server mm did not start is never stopped. macOS only: elsewhere — mm in a container or a sandbox — nothing is started and a warning says so. server: the rzb executable (default rzb on the PATH, then /usr/local/bin/rzb). config: rzb's server configuration, passed as --config; a relative path is relative to the agent file's directory, ~/ is the home directory; a missing file is a start error. serverArgs: any other rzb serve flag, added last. startTimeout (default 15m, negative = configuration error): start and download. Registry and log (rzb.log, also the pull's output): <user cache dir>/mm/rzb/<host>-<port>/. mm init asks for a razorbill agent on this machine (--autostart, default yes). See Let mm start rzb.
autoPull bool false At start-up, download the models this agent will use and the server does not list: its own, its mmConfigs agents', its skillRouting / toolRouting deciders'. The progress goes to stderr — one line rewritten in place on a terminal (⬇ pulling <model> — 52 MB / 145 MB (35 %)), a line per tenth elsewhere — then ⬇ pulled <model> in 0.8s. The agent's own model failing stops mm with the server's message ([engine error: autoPull: <model>: the server says: …]); another model failing, a server that does not answer, or a provider that cannot pull is a [warning: autoPull: …]. An agent started by /ask or ask_agent pulls nothing; mm --ask pulls nothing either. A model the server already lists is never pulled (a name without a tag also matches its :latest entry). By provider: llmman and ollama — POST /api/pull; kronk — POST /v1/kronk/models/pull, the pull counting as done only when Kronk's stream ends with "downloaded": true (Kronk answers 200 to a failed pull; its last status is then the message); dmr — POST /models/create on the runner (the base URL without /engines/…), the pull counting as done once the runner lists the model; llamacpp — no download over the API: the warning says to start llama-server with -hf <repo>:<quant>, or to put the GGUF in the router's models directory; openai — a warning.
sampling map temperature: 0.0, top_p: 0.9, max_tokens: 4096 Generation settings, OpenAI API key names, passed to the server. The file's block is merged with these defaults: a default the file does not name is still sent. Except with provider: openai and provider: openai-responses: the request carries exactly the file's block, nothing added (no block: no sampling key, the server's defaults apply) — the hosted OpenAI reasoning models refuse max_tokens and accept only the default temperature, so a default left in would be a 400. A key the OpenAI API does not declare is sent as it is, at the top level of the request — for example chat_template_kwargs: {enable_thinking: false}, which tells a llama.cpp server (dmr, llamacpp, llmman) or Kronk not to reason; reasoning_effort: none does the same on Ollama. messages, tools, tool_choice (and the legacy functions, function_call) are ignored: Genkit builds them from the conversation. The shipped agent.yaml adds parallel_tool_calls: false. max_tokens also bounds one tool call: a write_file of a long document (or a thinking model's reasoning plus the call) can hit it, and the call is then cut off. mm hands it back to the model twice, asking for smaller pieces, then stops with the model hit max_tokens (N) while writing a tool call; raise the value if that happens. A config that names the limit max_completion_tokens (the OpenAI API's name for its newer models) is read the same way: that name is used in this message and for the summary request of the context compression. With streaming, mm also asks the server for token counts (stream_options.include_usage).
watchdogTimeout duration 20s Silence tolerated between two streamed tokens before the connection is declared hung. Doubled for summary requests.
firstTokenTimeout duration 3m Silence tolerated before a model call's first token, while the server reads the prompt (every round trip of a turn has one). Never shorter than watchdogTimeout; must be >= 0. With a llama.cpp server (dmr, llamacpp, llmman — whose local GGUF models run in llama-server) mm asks for return_progress: each progress report restarts this clock, and the spinner shows Reading the prompt 12.0k/25.3k tokens. Ollama and Kronk send no progress: this one wait covers the whole prompt (and the model's loading). On a timeout the watchdog says no first token from the server after … (before the first token) or connection hang detected after … (after).
bashTimeout duration 30s How long one bash command may run before it is killed; the tool then answers [error: <bashTimeout> timeout exceeded]. Must be > 0. The watchdog keeps counting while a command runs (ticket 57): a command longer than watchdogTimeout ends the turn, so raise both together.
bashBackground string report What mm does with the processes a bash command leaves running in the background (./server &). Each command runs in its own process group. report: the processes still in the group when the command returns are listed at the end of the tool output — [still running in the background after this command: 4242 (server). Each bash call is a new shell: …] — with the advice to stop them in the same command. stop: listed too, and stopped at the end of the turn. allow: no process group, nothing said (the behaviour before v2.0.0). A bashTimeout or a cancellation stops the whole group. Linux and macOS; nothing is reported or stopped on Windows. Must be report, stop or allow.
context map see below Automatic history compression.
sessions map see below Persistent, per-project sessions.
docSearch map see below BM25 search through the text files of some folders: the /docs command and the search_docs tool.
metaPrompts list [] The agent's own meta-prompts for the window's [ picker, beside the 13 built-in ones — see metaPrompts keys.
trace map see below Write every request to the model and every response to files.
agentsMd map see below Append the project's AGENTS.md to the system prompt of every conversation. On by default.
acp map see below How mm -acp introduces itself to the editor.
lsp map see below Language servers behind the lsp tool. No server listed = no tool.
hooks map event → list none Commands run before a question reaches the model (preGeneration), before and after each tool call (preToolCall, postToolCall) after the turn (postGeneration), and before and after each hand-off to another agent (preAsk, postAsk); each reads one JSON object on stdin and may answer one on stdout. Entry keys: command or wasm (a WebAssembly module, with its read / write folders), matcher (tool and agent events only: a tool name, or an agent name), timeout (default 10s), onError (fail | warn | ignore, default warn). See hooks.
tools list [] Commands or WebAssembly modules declared as typed tools: each entry a name, a description, its parameters, and a command run without a shell or a wasm module run in a sandbox. See tools keys below and declared tools.
workspace map both keys false The file tools' and bash's relation to the working directory: repair wrong absolute paths, refuse paths outside it. See workspace keys below.
tui bool false Start in the single-window mode without the -tui flag. Falls back to the line mode when stdin or stdout is not a terminal; ignored with -acp.
yolo bool true true: the tools run without asking. false: every call that changes something — bash, write_file, edit_file, fetch_content with output, lsp rename, plan create/update/next/delete — waits for the user's answer in every front end (line mode, window, editor), and so does every MCP tool, whatever mcp.permissions says. Answers: allow once, allow this tool for the session, reject this call, never (this tool, for the session). read_file, read_skill, fetch_content without output and the lsp navigation actions never ask. In -p and mm --ask, nobody can answer: those calls are rejected. An agent started by /ask, ask_agent or mm --ask runs with AGENT_YOLO=false and submits its calls to the asking agent: the yolo of its mmConfigs entry decides when set, else the asking agent's yolo. Overridden by AGENT_YOLO. bashTool, editTools, fetchContentTool still decide which tools exist. See How to confirm tool calls.
permissions string absent Deprecated, replaced by yolo. ask = yolo: false (and wins over yolo: true); auto changes nothing. Either value adds a start-up warning. Must be auto or ask.
mmConfigs map name → path, or name → {path, description, yolo, askUser, unloadModels} none Other mm agents this one can ask. Each name generates /ask-<name> and /ask-with-context-<name> (see slash commands), and the list declares the ask_agent tool, through which the model calls them itself. The long form adds description (when to call that agent; shown in ask_agent's description, falling back to the agent file's acp.title) and yolo (decides that agent's tool calls when it is asked, by /ask, ask_agent or mm --ask, instead of this agent's yolo: true they run, false each one is asked; absent, this agent's yolo decides) and askUser (whether that agent may ask the user questions when it is asked: true its ask_user questions come up to this agent's user, false its ask_user tool is not declared; absent, that agent's own askUserTool decides) and unloadModels (default false; true: every hand-off to that agent — ask_agent, /ask…, mm --ask — unloads this agent's model right before that agent starts, and that agent's model once it has answered, before this agent reads the answer, so the two models are never loaded together; each unload is a 🧹 notice, a failed one does not stop the hand-off; this agent's model is unloaded on its own server, that agent's on the server its file names; mm --ask only unloads that agent's model; not the top-level unloadModels, which declares /unload and unload_model). path must not be empty. A relative path is relative to the directory of the file that declares it. Names: lowercase letters, digits and -, starting with a letter or a digit, not starting with with-context. A path whose file does not exist is a start-up warning, not an error.
a2a {host, port, description, tokenEnv, agents} 127.0.0.1:9100, no agents The Agent2Agent protocol (ticket 243): how mm a2a serves this agent, and the remote A2A agents its model talks to through ask_a2a_agent. See a2a keys.

context keys

Key Type Default Description
enabled bool false Turn the automatic compression on. /compact works regardless.
threshold int 75 Percentage of the context window beyond which the history is compressed before the next question. Between 1 and 100.
maxMessages int 80 Message count that triggers a compression when the window is unknown or the estimate is low. 0 disables. Must be ≥ 0.
keepLastTurns int 3 Question turns kept raw at the end of the history. Must be ≥ 1.
summaryMaxTokens int 1200 max_tokens of the summary request. Must be > 0. A thinking model's reasoning counts against it: on dmr, llamacpp, llmman and kronk the summary request turns reasoning off (chat_template_kwargs.enable_thinking: false), on ollama too (reasoning_effort: "none", the one switch Ollama obeys) — whatever sampling says; other chat_template_kwargs are kept, and a reasoning_effort set there is lowered to low (gpt-oss has no "off"); elsewhere, if the error says the model "reasoned until the limit", raise it.
prompt string "" Replaces the built-in summary prompt when not empty.
showStats bool true Print the one-line 🗜️ report after each compression.
compressInTurn bool true Compress INSIDE a long turn, between tool calls: before each model call, when the history passes threshold of a known window, the tool exchanges of the current turn but the last 4 lose their bulk (a tool result or a long call argument — a whole file given to write_file — keeps its first line and a note saying what was dropped); if that is not enough, they are replaced by notes the model writes about them, appended to the turn's question (merged with earlier notes on a later compression). The question, the last 4 exchanges and the earlier turns are never touched; a tool call is never separated from its result. Independent of enabled: a turn that outgrows the window fails either way. Needs a known window (contextWindow, or the server's). One 🗜️ in-turn: … line per compression when showStats is on. false keeps the turn as it grows.

sessions keys

Key Type Default Description
sessions.enabled bool false Save every conversation to a file, rewritten after each turn, /compact and /new. The file also records, outside the history, every error shown (errors array: failed generation, failed compaction, failed /resume). Enables /sessions and /resume in the terminal and, over ACP, session/list and a reload (session/load, session/resume) that brings the conversation back. Off, an editor's reload still succeeds but the conversation starts over.
sessions.dir string .mm/sessions Directory of the session files, one <id>.json each. Relative to the directory mm is started from (terminal) or to the session's cwd (ACP); an absolute path is used as-is. Must not be empty.
sessions.searchMemory bool false The /memory <words> command (terminal, window, editor): searches the stored sessions of the project. Needs sessions.enabled. See slash commands and How to search earlier sessions.
sessions.autoSearchMemory bool false The search_memory tool: the same search, called by the model. Independent of searchMemory. Needs sessions.enabled.

Either memory key set while sessions.enabled is false prints the start-up warning sessions: searchMemory / autoSearchMemory need sessions.enabled: true — /memory and search_memory are off.

docSearch keys

Key Type Default Description
docSearch.searchDocs bool false The /docs <words> command (terminal, window, editor). See slash commands and How to search a documentation folder.
docSearch.autoSearchDocs bool false The search_docs tool: the same search, called by the model. Independent of searchDocs.
docSearch.dirs list of strings [docs] The folders searched, recursively. A relative one is resolved against the working directory — the directory mm runs in, the session's cwd in ACP mode and the window; an absolute one is used as-is; one that starts with "@agent/" (quotes needed in YAML) is resolved when the file loads against the agent's folder — the folder of the agent file, or the project root for a .mm/agent.yaml, as for wasm modules and hooks: "@agent/docs" is the documentation shipped with the agent, wherever mm runs. The prefix is optional; both kinds combine: ["@agent/docs", docs]. A @agent/ folder is shown resolved (absolute) in the results. A folder that does not exist is reported in the result (⚠️ <dir>: no such folder).
docSearch.extensions list of strings [.md, .markdown, .txt, .adoc, .asciidoc, .rst] The files searched, by extension, compared without case. Only these are read.
docSearch.maxFileSize size 1MB A bigger file is skipped. A number of bytes, or with KB / MB / GB (powers of 1024): 512KB.

dirs, extensions and maxFileSize are checked only when searchDocs or autoSearchDocs is true. Hidden folders (.git, .mm…) and node_modules are skipped, symbolic links are not followed, a file holding a NUL byte is skipped as binary.

metaPrompts keys

A list (ticket 272). Each entry adds a meta-prompt to the window's [ picker (The four pickers), after the 13 built-in ones, in the order given; an entry whose label is a built-in's (case ignored) replaces that one, in its place.

Key Type Default Description
metaPrompts[].prefix string — The label, brackets included: "[Haiku]" (quotes needed in YAML). Required. One pair of brackets around a non-empty name, on one line. The space after it in the box is added by mm.
metaPrompts[].description string — Shown beside the label in the picker. Required.
metaPrompts:
  - prefix: "[Haiku]"
    description: Answer as a haiku (5-7-5)
  - prefix: "[Brief]"          # a built-in's label: replaces it
    description: Two sentences at most

The description is for the user: the model reads only the prefix typed before the question. When the name does not say it all (a length, a format, a reworded built-in), say what it means in system — measured in demos/meta-prompts: without it, Qwen3.5 4B answered [Commit Message] … with a compliment instead of a commit message.

trace keys

Key Type Default Description
trace.enabled bool false Write one pair of files per model call: the request body as sent (after mm's own fields: stream_options, return_progress, a summary's reasoning switch), indented, and the response body as received. Overridden by AGENT_TRACE. Headers are never written. The banner ends with | trace: <absolute dir> while it is on ( | trace: <session cwd>/<dir> in ACP mode).
trace.dir string .mm/traces Directory of the files. A relative path is resolved per call in the working directory of the turn — the session's cwd in ACP mode, like sessions.dir — else in the directory mm runs in; an absolute path is used as-is. A directory that cannot be created prints [trace: cannot write to <dir>: <error> — nothing is traced] once (on stderr in ACP mode); the calls go on. Created when needed. Must not be empty when the trace is on.

File names: <YYYYMMDD-HHMMSS.mmm>-<acp.name>-<NNNN>.request.json, then ….response-<status>.sse (a streamed answer, the server's SSE lines byte for byte, written as they arrive), ….response-<status>.json (a whole JSON body, indented), or ….response-error.txt (no response: the method, the URL and the error). NNNN counts the model calls of the process; a retry by the HTTP client is a call of its own. An agent started by /ask or ask_agent inherits AGENT_TRACE and writes beside its asker, under its own acp.name.

agentsMd keys

Key Type Default Description
agentsMd.enabled bool true Read the file at the start of every conversation: start-up, /new, /resume, a new ACP session (session/new), a reloaded one (session/load), -p. Never in the middle of a conversation. An agent started by /ask, ask_agent or mm --ask reads it only when its own file has it on; it looks in the working directory it is given (its asker's).
agentsMd.path string AGENTS.md The file. A relative path is resolved against the conversation's working directory — the directory mm runs in, the session's cwd in ACP mode — not against the configuration file. An absolute path is used as-is. Must not be empty while enabled is true.
agentsMd.maxChars int 0 Above this many characters (Unicode characters, after trimming) the file is not read at all, and the banner says so. Never truncated. 0 = no limit. Must be ≥ 0.

When the file is read, the system message is the system prompt, a blank line, then:

PROJECT INSTRUCTIONS (from <absolute path>)
The instructions of the project you work in. Follow them; when the user asks otherwise in the conversation, the user wins.

<the file, trimmed>

Not read: a missing file, a file of blanks only, a file above maxChars, any file when structuredOutput is set, a file that cannot be read (banner warning <path> cannot be read: …). A resumed session (/resume, session/load) continues under the file as it is now.

acp keys

Key Type Default Description
acp.name string bob agentInfo.name in the initialize response. Must not be empty.
acp.title string Bob (bash-first agent) agentInfo.title, the name the editor may display. Empty: not sent. Also shown by the window mode (-tui) next to mm, in its header and above each answer — ‣ mm [Homer (coder)] — unless it is empty or the built-in default. During an /ask, the window shows the ASKED agent instead: its acp.title (or its mmConfigs name) above its answer, and in the header with its model and asked by <this agent>, until it has answered.
acp.clientTools.enabled bool true ACP mode only: the tools an ACP client advertises (org.mini-me/tools in its capabilities' _meta) become agent tools named client_<name>, called through the client's extension methods. false: whatever the client advertises is ignored. No effect when the client advertises nothing. See ACP client tools.
acp.clientTools.discovery string meta meta: the client lists its tools in the initialize request, one list for the connection. request: the client only advertises true, and mm asks for the list (_org.mini-me/tools/list) at each session/new, session/load and session/resume. Any other value is refused: acp.clientTools.discovery must be "meta" or "request".
acp.clientTools.permissions string auto auto: a call of a client tool asks the client for permission only when yolo is false. ask: every call asks. Any other value is refused.
acp.clientTools.timeout duration 30s Bound of one call of a client tool, and of the list request. Must be > 0.

The version is not configurable: agentInfo.version is always the binary's, as printed by mm --version.

a2a keys

a2a:
  port: 9101
  description: "Alice, an optimist: she argues FOR the idea."
  agents:
    bob:
      url: http://127.0.0.1:9102
      description: "Bob, a sceptic who argues against."
Key Type Default Description
host string 127.0.0.1 Where mm a2a listens. Keep the loopback unless other machines must call it: an A2A agent runs tools for whoever calls it.
port int 9100 Its port; --a2a-port overrides it. Between 0 and 65535.
description string acp.title The Agent Card's description: what the agents that call this one read about it.
tokenEnv string "" The variable holding the token every caller must send (Authorization: Bearer …); unset at start-up, mm a2a stops. Empty: no authentication.
agents map name → {url, description, tokenEnv} none The remote A2A agents the model can talk to: their presence declares ask_a2a_agent. url: the agent's address (http/https). description: when to call it, shown in the tool's description. tokenEnv: the variable holding its token, if it wants one. Names: lowercase letters, digits and -.

lsp keys

Key Type Default Description
lsp.servers list [] One entry per language server. The file extension picks the server.
lsp.servers[].name string — How the banner, the tool description and the warnings call it. Required.
lsp.servers[].command string — The executable, looked up on the PATH at start-up. Required. Not found: warning, server skipped.
lsp.servers[].args list of strings [] Its arguments (many servers need --stdio).
lsp.servers[].extensions list of strings — File extensions it serves, with the dot (.go, .ts). Required, at least one; matched case-insensitively; an extension may be served by one server only.
lsp.diagnosticsAfterEdit bool false After a successful write_file or edit_file on a file a server handles, ask that server for the file's diagnostics and append them to the tool output under [lsp diagnostics after this change]. The server is started if needed; it has 8 s to answer, else the note says not available — <reason> (the edit itself succeeded). Small models rarely ask for diagnostics themselves: 0 times in 54 runs in demos/gemma-coder.
lsp.diagnosticsAfterRead bool false After a successful read_file of a file a server handles, append that server's diagnostics for the whole file under [lsp diagnostics for this file, added by mm — not part of its content]. Once per version of the file (modification time and size): reading it again unchanged, or right after an edit that already brought its diagnostics, asks nothing. Same 8 s budget as diagnosticsAfterEdit.
lsp:
  servers:
    - name: gopls
      command: gopls
      extensions: [".go"]
    - name: typescript
      command: typescript-language-server
      args: ["--stdio"]
      extensions: [".ts", ".tsx", ".js", ".jsx"]

The shipped agent.lsp.yaml is agent.dmr.yaml with this block on (gopls active, other servers ready to uncomment) and a system prompt that says when to use the tool.

tools keys

Key Type Default Description
tools list [] One entry per declared tool.
tools[].name string — What the model calls. Required. Starts with a letter; letters, digits, _, -; at most 64 characters. Unique. Not the name of a built-in tool (ask_agent, ask_user, bash, edit_file, fetch_content, lsp, plan, read_file, read_skill, save_answer, search_docs, search_memory, unload_model, write_file), even one this agent turns off.
tools[].description string — What the tool does and when to use it, shown to the model. Required. A line Required parameters: … is appended.
tools[].parameters map name → parameter {} The arguments, in the order written. Names follow the name rules.
tools[].parameters.<p>.type string string string, number, integer or boolean.
tools[].parameters.<p>.description string "" What the value is, shown to the model.
tools[].parameters.<p>.enum list none The only values accepted, each of the parameter's type.
tools[].parameters.<p>.required bool true false makes the parameter optional.
tools[].parameters.<p>.default value none The value of an optional parameter the call leaves out. Only with required: false; of the parameter's type; inside the enum when there is one.
tools[].command list of strings — The program, then its arguments, one argv entry each. Required unless wasm is given; not both. {{p}} inside an entry is replaced by the value of parameter p. The program (first entry) cannot contain a placeholder. Every placeholder must name a declared parameter. A relative program (./scripts/x.sh) is resolved from the working directory.
tools[].wasm string "" A WebAssembly module (WASI preview 1 command) run by mm instead of a command. Relative to the agent file. The file must exist at load. The call's arguments are its stdin, as one JSON object.
tools[].read list of strings [] wasm only. Folders of the working directory the module may read, mounted under the same name. Relative, inside the working directory (not ., not above it), each listed once across read and write.
tools[].write list of strings [] wasm only. Folders of the working directory the module may read and write. Same rules as read.
tools[].timeout duration 0 (= bashTimeout) How long one call may run. Must be ≥ 0.
tools:
  - name: release
    description: Prepare a release of the project for a version and a channel.
    parameters:
      version: { type: string, description: "e.g. 1.4.2" }
      channel: { type: string, enum: [stable, beta, nightly] }
      dryRun:  { type: boolean, required: false, default: false }
    command: ["./scripts/release.sh", "{{version}}", "{{channel}}", "--dry-run={{dryRun}}"]
    timeout: 60s

  - name: search_notes
    description: Find the lines of the notes that mention a word.
    parameters:
      word: { type: string }
    wasm: ./tools/search_notes.wasm
    read: [notes]

workspace keys

Both keys are off by default. They exist for small models that copy the project's absolute path with a directory missing, or invent a root (/workspace/…, /home/user/…).

Key Type Default Description
confine bool false read_file, write_file, edit_file and lsp refuse a path that resolves outside the working directory (symlinks resolved). The refusal is a tool failure the model reads, and it suggests a relative path, never the absolute project path: [<path> is outside the project. Every tool already runs in the project root: use a RELATIVE path, for example "<file name>" — never a path starting with /]. Applied after repairPaths. bash is not confined.
repairPaths bool false Turn a wrong path into the one the model meant, and tell it. Three repairs, described below.

repairPaths does three things:

Where Path Becomes Note added to the tool output
read_file, write_file, edit_file, lsp Absolute, outside the working directory, same tree (at least two leading components in common with it) The tail after the shared part, without the directories that belong to the project's own path: <parent>/main.go → main.go [path <path> is outside the project: used <fixed> — use relative paths]
same Absolute, another tree (an invented root) Its longest tail that is an existing file of the project, else its longest tail whose directory exists there (a new file): /workspace/stats/stats.go → stats/stats.go. No such tail: the path is kept. same
same Relative, starting with the project folder's own name (olala-mini/script.js inside …/olala-mini) The path without that first directory, when the path does not exist and the rest does (or, for a new file, when the rest's directory exists and the original's does not). A real sub-folder with the project's name is left alone. [path <path> starts with the project folder's own name: used <fixed> — paths are relative to the project root]
bash A leading cd <absolute path> && (or ;), quoted or not Dropped — the command runs in the project root, where every bash command starts — when the directory does not exist, is the project root itself, or is in the same tree as the project but outside it. Several such cd in a row are all dropped. Kept: a real directory of another tree (cd /tmp && …), a subdirectory of the project, a relative cd, a cd with nothing after it. [cd <path> dropped: every bash command already starts in the project root — never cd to an absolute path]

The note is written at the start of the tool output, in the terminal, the window and an editor (ACP) alike; the terminal shows the command as it runs, without the dropped cd.

workspace:
  confine: true      # read_file, write_file, edit_file and lsp stay inside it
  repairPaths: true  # a wrong absolute path becomes the relative one it meant

Provider defaults

Provider baseUrl fallback apiKeyEnv Key required
dmr http://localhost:12434/engines/v1 http://host.docker.internal:12434/engines/v1 none no
llamacpp http://127.0.0.1:9931/v1 (then http://127.0.0.1:8080/v1) http://host.docker.internal:9931/v1 LLAMA_API_KEY no
llmman http://127.0.0.1:17434/v1 http://host.docker.internal:17434/v1 LLMMAN_API_KEY no
ollama http://localhost:11434/v1 http://host.docker.internal:11434/v1 OLLAMA_API_KEY no
kronk http://127.0.0.1:11435/v1 http://host.docker.internal:11435/v1 KRONK_TOKEN no — only Kronk's authenticated and full-protected modes check it
mlxserve http://127.0.0.1:11234/v1 http://host.docker.internal:11234/v1 MLX_SERVE_API_KEY no — only a server started with --api-key checks it, and not for localhost
razorbill http://127.0.0.1:7920/v1 http://host.docker.internal:7920/v1 RZB_API_KEY no — only a server whose RZB_API_KEY is set checks it
openai https://api.openai.com/v1 none OPENAI_API_KEY no — a server that needs one answers 401, and the start-up warning names the variable
openai-responses https://api.openai.com/v1 none OPENAI_API_KEY no — as openai

llamacpp: llama-server's default port is 9931 since llama.cpp b11521 (2026-10-09), 8080 before and in the official Docker images. When the address in use is http://127.0.0.1:9931/v1 (no baseUrl, or that one) and it does not answer, mm tries http://127.0.0.1:8080/v1, then the fallback.

The openai provider sends only standard fields: no return_progress (so no prompt-reading progress while a long prompt is read), no reasoning switch on a summary request, no /unload. It cannot ask the server for its window: set contextWindow, or compression counts messages (context.maxMessages). Its start-up probe sends the key to GET /models; a 401 or 403 is reported as a refused key, not as a server that does not answer.

The openai-responses provider (ticket 178) talks to the same servers through OpenAI's Responses API, POST <baseUrl>/responses, instead of Chat Completions: what OpenAI's reasoning models need to call tools while they reason. It sends the sampling block as written, with max_tokens / max_completion_tokens renamed max_output_tokens and reasoning_effort sent as reasoning.effort; it adds store: false and include: ["reasoning.encrypted_content"] unless the block sets them, and sends the model's encrypted reasoning back with the tool results. Its summary request sets reasoning.effort: none. Like openai: no prompt-reading progress, no /unload, the window from contextWindow only. See How to keep reasoning and tools together with OpenAI's Responses API.

structuredOutput

A YAML block string holding Go declarations. Each type is a definition; the one var (var X T or var X = T{}) names the root of the answer. Only type and var declarations are allowed.

Go JSON Schema
string {"type": "string"}
bool {"type": "boolean"}
int, int8 … int64, uint … uint64 {"type": "integer"}
float32, float64 {"type": "number"}
[]T {"type": "array", "items": T}
map[string]T {"type": "object", "additionalProperties": T}
struct { … } {"type": "object", "properties": …, "required": [every key], "additionalProperties": false}, keys in declaration order
a declared type Name {"$ref": "#/$defs/Name"}; a struct root is inlined, $defs holds the types the root reaches
*T field, or json:",omitempty" the key stays required, its value is anyOf: [T, null]
Field element Effect
json:"name" tag the key; without a tag, the Go field name as written
json:"-" tag field skipped
// comment above or beside a declaration or field its description

Refused, with structuredOutput:<line>:<col>: … counted from the first line of the block: func, import, const; generic types; aliases (type A = B); embedded fields; fixed-size arrays; map keys other than string; interface, chan, func, qualified (time.Time) and undefined types; a pointer outside a struct field; a type declared twice; a key used twice; zero or more than one var; a var without a type.

When the block is not empty:

  • the declarations are appended to system, under an OUTPUT FORMAT paragraph;
  • every model call carries response_format: {"type": "json_schema", "json_schema": {"name": "output", "strict": true, "schema": …}};
  • the answer is validated against the schema; one that does not match fails the turn with model failed to generate output matching expected schema: …, prefixed with the answer was cut off by max_tokens before its JSON was complete … when the server stopped on max_tokens;
  • -p prints the JSON answer alone on stdout (see Prompt mode specifics);
  • the banner shows tools: none (structured output: JSON answers) and no "no skills" / "no tool" warning.

Example:

structuredOutput: |
  type Language struct {
      Name     string `json:"name"`     // the language's name, in English
      Official bool   `json:"official"`
  }
  type Country struct {
      Name      string     `json:"name"`
      Capital   *string    `json:"capital"`   // null when unknown
      Languages []Language `json:"languages"` // at most 4
  }
  var Countries = []Country{}

decision

Key Type Default Description
timeout duration 60s Bound of one answer. Must be ≥ 0; 0 = the default.
display bool false -p adds "display":true at the head of the server's JSON, so a preGeneration hook that runs this decider can return the answers as its reply's display, shown to the user before the chat model answers (see hooks). Nothing else changes.
questions mapping name → question — At least one. The order of the file is kept: in the request, in the answer lines, and for a choice's options.

A question:

Key Type Description
type choice, noul or score choice: one option out of criteria. noul: the probability that instructions, a statement about the state, is true. score: a level out of criteria.
instructions string The question (choice, score) or the statement (noul). Not empty.
criteria mapping or list choice: a mapping option → description, at least 2 options. score: a list of 2 to 10 levels, lowest first. noul: none.

Answers, as POST /v1/systemone returns them under answers.<name>:

Type Fields
choice choice (the option), probabilities (option → probability), confidence
noul noul (probability that the statement is true)
score score (probability-weighted level index, from 0 to n−1), legend (index → level), probabilities (index → probability), confidence

When the block is present:

  • the message received is the state, alone: the history, the system prompt, hooks and tools are not sent;

  • -p prints the server's JSON alone on stdout (see Prompt mode specifics);

  • the line mode, the window and an editor (hence /ask-<name> and mm --ask) show one line per question, then the JSON in a fenced block:

    risk: dangerous (confidence 0.94) — dangerous 0.96 · local-change 0.03 · read-only 0.01
    destructive: 0.88
    urgency: 1.89 → a careful review (confidence 0.83) — a careful review 0.92 · a quick look 0.06 · no review needed 0.03
    
  • no tool is declared, whatever bashTool, editTools, planTool, askUserTool, fetchContentTool, saveAnswerTool, unloadModels, skillsDir, docSearch and sessions say: the file needs no …: false line (/unload remains);

  • mcp.enabled: true, lsp.servers, mmConfigs or tools: stop the start-up with an error, before any server is started;

  • the banner shows tools: none (decision model: <n> question(s)) and no "no skills" / "no tool" warning;

  • AGENTS.md is not sent, whatever agentsMd says; the banner shows agents.md: ignored (decision model) when the file exists.

Example:

provider: llamacpp
model: LiquidAI/d1-3B-GGUF:Q4_K_M
baseUrl: http://127.0.0.1:8090/v1
decision:
  questions:
    risk:
      type: choice
      instructions: How risky is running this shell command in the project directory?
      criteria:
        read-only: Only reads files or prints information
        local-change: Changes files inside the project, easy to rebuild or revert
        dangerous: Deletes or changes things outside the project, uses sudo, the network, git push or force
    destructive:
      type: noul
      instructions: The command deletes data that cannot be rebuilt.
    urgency:
      type: score
      instructions: How carefully should a person review this command before it runs?
      criteria: [no review needed, a quick look, a careful review]

Servers

Provider /v1/systemone (checked 2026-10-22)
llamacpp yes
llmman yes
ollama yes
openai the server's own: a server without the route answers 404
openai-responses no — refused at start-up
dmr no (404, Docker Model Runner v1.2.8) — refused at start-up

The route serves models it knows as decision models: LiquidAI d1 (LiquidAI/d1-3B-GGUF:Q4_K_M) was accepted by all three; evalengine's decision-4b was refused by llmman (501 This model is not a decision model) and Ollama (400 … is not a llama.cpp decision model).

skillRouting

Key Type Default Description
decider path "" Agent file of the decision model, relative to this file. Its provider, model, baseUrl, fallback and apiKeyEnv are used — AGENT_BASE_URL is not, it names this agent's server; its decision block is not. Must exist. Empty = routing off.
minConfidence number 0.6 Below the server's confidence for the chosen skill, nothing is appended. Between 0 and 1.
timeout duration 2s Bound of the routing question. Must be > 0.

Before each turn — line mode, window, editor — when the question names no $skill and the catalogue is not empty, mm sends one choice question: the request (cut at 1,500 characters) as the state, one option per skill (its name and description, catalogue order), then none. The front end then shows one notice:

Notice Meaning Appended to the question
🧭 $<skill> (<confidence>) chosen at or above minConfidence [skill: <skill> — load it with read_skill and carry out its steps now]
🧭 no skill (none <confidence>) the decider chose none nothing
🧭 no skill (<skill> <confidence> < <minConfidence>) chosen below minConfidence nothing
🧭 skill routing skipped: <error> the decider failed or exceeded timeout nothing

In an editor the notice goes to the agent's stderr log ([acp] session <id>: …). -p does not route. The banner adds | routing: <provider>/<model> ≥ <minConfidence>.

Example:

skillRouting:
  decider: agent.decider.yaml
  minConfidence: 0.6
  timeout: 2s

toolRouting

Key Type Default Description
decider path "" Agent file of the decision model, relative to this file — read as for skillRouting. Must exist. Empty = routing off.
dropBelow number 0.2 A group whose probability is below it is left out. Between 0 and 1.
timeout duration 2s Bound of the routing question. Must be > 0.
groups mapping — At least one. Name → when (the statement the decider judges: "answering this request needs …") and matcher (a regular expression on tool names, like a hook's). Both required. Kept in file order.

Before each turn — every mode, -p included, after the preGeneration hooks — mm sends one noul question per group that matches at least one of the agent's tools, the request (the question the model will read, cut at 1,500 characters) as the state. A tool is left out of the request when it belongs to at least one group and every group it belongs to scored below dropBelow. A tool in no group is always offered; so is every tool when the decider fails or exceeds timeout. One notice is shown:

Notice Meaning
🧰 tools: dropped <group> (<probability>), … these groups are not offered this turn
🧰 tools: all kept no group under dropBelow
🧰 tool routing skipped: <error> the decider failed or exceeded timeout; every tool is offered

No question is sent, and no notice shown, when no group matches a tool of the agent. The banner adds | tool routing: <provider>/<model>, <n> group(s), drop < <dropBelow>.

Example:

toolRouting:
  decider: agent.decider.yaml
  dropBelow: 0.2
  timeout: 5s
  groups:
    shell:
      when: Answering this request needs running shell commands (build, test, git, listing files).
      matcher: ^bash$
    web:
      when: Answering this request needs fetching a web page or searching the web.
      matcher: ^fetch_content$

Validation errors

Reported on stderr as [config error: <path>: <message>], exit code 1 — in every mode, so that -p … | jq never reads an error as the answer. [engine error: …] and [usage: …] too.

Message Cause
provider must not be empty provider: ""
model must not be empty model: ""
contextWindow must be >= 0 negative value
maxOutput must be > 0 zero or negative
maxTurns must be > 0 zero or negative
previewLines must be >= 0 negative value
context.threshold must be between 1 and 100 out of range
context.keepLastTurns must be >= 1 zero or negative
context.summaryMaxTokens must be > 0 zero or negative
context.maxMessages must be >= 0 negative value
sessions.dir must not be empty empty string
docSearch.dirs must name at least one folder dirs: [] with a switch on
metaPrompts[N].prefix: "…" must be a name in brackets, like "[Haiku]" a prefix without its brackets
metaPrompts[N].prefix: "…" must hold a name, on one line, with no other bracket "[]", "[ ]", "[a]b]"
metaPrompts[N].description: the picker shows it beside [X] — it must not be empty no description
metaPrompts[N].prefix: [X] is listed twice two entries with the same label (case ignored)
docSearch.dirs: a folder must not be empty dirs: [""]
docSearch.extensions must name at least one extension extensions: [] with a switch on
docSearch.extensions: "md" must start with a dot, like ".md" an extension without its dot
docSearch.maxFileSize must be > 0 maxFileSize: 0 with a switch on
line N: "huge" is not a size: write 1MB, 512KB or a number of bytes maxFileSize that is not a size
trace.dir must not be empty empty string with the trace on
agentsMd.path must not be empty empty string with agentsMd.enabled on
agentsMd.maxChars must be >= 0 negative value
acp.name must not be empty empty or blank string
lsp.servers[N].name must not be empty a server without name
lsp.servers[N].command must not be empty a server without command
lsp.servers[N].extensions must list at least one extension a server without extensions
lsp.servers[N].extensions: "go" must start with a dot, like ".go" an extension without its dot
lsp.servers[N]: extension ".ts" is already served by "typescript" two servers on one extension
tools[N] (<name>).name "<name>" must start with a letter and hold only letters, digits, _ or - (64 characters at most) an invalid tool name
tools[N] (<name>).name "<name>" is the name of a built-in tool a declared tool named like a built-in tool
tools[N] (<name>): another tool is already called "<name>" two entries with one name
tools[N] (<name>).description must not be empty: … no description
tools[N] (<name>).command must name a program, … no command and no wasm, or an empty first entry
tools[N] (<name>): give command or wasm, not both an entry with both
tools[N] (<name>): wasm: no module at <path> the module file does not exist, or is a folder
tools[N] (<name>): read and write only apply to a wasm tool — … read or write on a command entry
tools[N] (<name>): folder "<f>" must be relative to the working directory an absolute folder
tools[N] (<name>): folder "<f>" must be a folder inside the working directory, not it or above it ., .. or a path that leads above
tools[N] (<name>): folder "<f>" is given twice a folder listed twice, in read, write or both
tools[N] (<name>).command: the program ("{{p}}") cannot come from a parameter a placeholder in the first entry
tools[N] (<name>).command: {{p}} is not a declared parameter a placeholder no parameter declares
tools[N] (<name>).timeout must be >= 0 a negative timeout
tools[N] (<name>).parameters.<p>.type "x" must be one of string, number, integer, boolean an unknown type
tools[N] (<name>).parameters.<p>.enum: … an enum value not of the parameter's type
tools[N] (<name>).parameters.<p>.default only makes sense with required: false a default on a required parameter
tools[N] (<name>).parameters.<p>.default: …, ….default <v> is not one of the enum values a default of the wrong type, or outside the enum
tools[N] (<name>).parameters.<p>: declared twice, …: a parameter name must start with a letter … a repeated or invalid parameter name
line N: parameters must be a mapping of name → {type, description, …} parameters: written as a list
permissions must be "auto" or "ask" any other value of the deprecated key
AGENT_YOLO="maybe": must be true or false an AGENT_YOLO value strconv.ParseBool refuses (accepted: 1, t, true, 0, f, false, any case)
bashTimeout must be > 0 zero or negative
bashBackground must be "report", "stop" or "allow", not "…" any other value
structuredOutput:<line>:<col>: … a declaration the structuredOutput section cannot translate
structuredOutput: no var declaration: … no var names the root
decision.questions: at least one question is needed a decision block without questions
line <n>: decision: unknown key "<key>" (timeout, questions) / line <n>: question "<name>": unknown key … a misspelt key in the block
line <n>: question "<name>": unknown type "<type>" (choice, noul or score) type is not one of the three
line <n>: question "<name>": a choice needs at least 2 options, got <n> / a score needs 2 to 10 levels, got <n> / a noul question takes no criteria criteria of the wrong shape or size
decision: dmr: no /v1/systemone route (…) decision with provider: dmr
decision and structuredOutput cannot be used together: … both in one file
decision cannot be used with tools — this agent declares: <sources> (…) a decider whose file sets mcp.enabled: true, lsp.servers, mmConfigs or tools:; <sources> lists them (mcp, lsp servers, mmConfigs, tools); reported before the tools are assembled
skillRouting.decider: … the decider file is missing, has no provider or model, or names dmr
skillRouting.minConfidence must be between 0 and 1 / skillRouting.timeout must be > 0 out of range
toolRouting.decider: … the decider file is missing, has no provider or model, or names dmr
toolRouting.dropBelow must be between 0 and 1 / toolRouting.timeout must be > 0 out of range
toolRouting.groups: at least one group is needed / toolRouting.groups.<name>: when must not be empty / … matcher must not be empty / toolRouting.groups.<name>.matcher: … a missing group, statement or matcher, or a matcher that does not compile
line <n>: toolRouting: unknown key "<key>" (decider, dropBelow, timeout, groups) a misspelt key in the block
structuredOutput cannot be used with tools — this agent declares: <tools> (…) a structuredOutput with at least one declared tool (bash, plan, the file tools, fetch_content, read_skill, ask_agent, lsp, MCP tools, declared tools). Reported after the tools are assembled, before any front end starts.
mmConfigs: "Bob" is not a valid name (…) a name with uppercase letters, spaces or other characters, or starting with -
mmConfigs: "with-context-x" is not a valid name (it would read as /ask-with-context-…) a name starting with with-context
mmConfigs.<name>: the path must not be empty <name>: "", or a long form without path
hooks: unknown event "x" (…), hooks.<event>[N]: … an invalid hooks: block — see hooks
unknown provider "x" (known: dmr, kronk, llamacpp, llmman, mlxserve, ollama, openai, openai-responses, razorbill) Reported by the engine, as [engine error: …].

A start-up warning, not an error, is printed when context.enabled is true, the window is unknown and context.maxMessages is 0, and when a declared tool has the name of an MCP tool (tools: <name> skipped — an MCP tool already has that name; the tool is not declared), and when the file sets the deprecated permissions key (permissions: ask is deprecated — use yolo: false instead …).

Shipped files

File Purpose
agent.yaml Docker Model Runner set-up: provider: dmr, maxTurns: 40, displayCommands: true, compression off, a system prompt named "Bob" that describes the skills and file-editing rules.
agent.llamacpp.yaml llama.cpp set-up: provider: llamacpp, baseUrl: http://127.0.0.1:9931/v1, compression on.

Example

provider: llamacpp
model: my-alias
baseUrl: http://127.0.0.1:9931/v1
fallback: ""
maxTurns: 40
context:
  enabled: true
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
# Reference: configuration file

> Neutral, exhaustive description of the YAML file read by `mm`. Every key is optional; a key left out keeps its built-in default. The file is decoded on top of the defaults, so unknown keys are ignored.

Where `mm` looks for this file: [Configuration file resolution](cli.md#configuration-file-resolution). "Relative to this file" / "relative to the agent file" below means relative to its [base directory](cli.md#base-directory-of-relative-paths): the file's own directory, or the project root for a file in a `.mm` folder.

## Top-level keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `provider` | string | `dmr` | Registry key of the LLM server: `dmr`, `llamacpp`, `llmman`, `ollama`, `kronk`, `mlxserve`, `razorbill`, `openai` for any other OpenAI-compatible server (see [How to use any OpenAI-compatible server](../how-to/run-with-an-openai-compatible-server.md)), or `openai-responses` for the same servers through OpenAI's Responses API (see [How to keep reasoning and tools together with OpenAI's Responses API](../how-to/use-the-openai-responses-api.md)). Overridden by `AGENT_PROVIDER`. |
| `model` | string | `huggingface.co/jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M` | Model identifier in the provider's naming. Overridden by `AGENT_MODEL`. |
| `baseUrl` | string | `""` (provider default) | OpenAI-compatible endpoint tried first. Overridden by `AGENT_BASE_URL`. |
| `fallback` | string or absent | absent (provider default) | Endpoint used when `baseUrl` does not answer `/models` within 2 s. Absent = provider default; `""` = no fallback. |
| `apiKeyEnv` | string | `""` (provider default) | Name of the environment variable holding the API key. |
| `toolFormat` | string | `openai` | How the tools reach the model. `openai`: the OpenAI API's `tools` field, as every server expects. `xml_tools`: for a model whose chat template reads its tools from an `xml_tools` variable and writes its calls as `<tool_call>` text (SmolLM3) — mm sends the tools in `chat_template_kwargs.xml_tools` (no `tools` field), writes earlier calls into the history as `<tool_call>` text, and turns the answer's `<tool_call>` blocks into tool calls, streamed or not. Any other value: `toolFormat must be openai or xml_tools`. See [How to give tools to a model whose template reads `xml_tools`](../how-to/use-a-model-that-reads-xml-tools.md). |
| `contextWindow` | int | `0` | Tokens the server serves. `0` = ask the server, else unknown. Must be ≥ 0. With a llama.cpp server in router mode (several models behind one port, such as the Llama app), mm asks `/props?model=<model>`, then `/props`. A value larger than the window the server reports gives a start-up warning: `contextWindow 32768 is larger than the 4096 tokens the server serves — requests fail once the conversation passes 4096: restart the server with a larger window (--ctx-size), or lower contextWindow`. A request the server then refuses as too long (llama.cpp `exceed_context_size_error`, OpenAI `context_length_exceeded`) is not retried, and the error gives the sizes: `the request (4704 tokens) is larger than the server's window (4096) — …`. |
| `maxOutput` | int | `16000` | Maximum characters a tool returns to the model; longer output keeps its head and up to 2000 characters of tail. Must be > 0. |
| `maxTurns` | int | `10` | Maximum model ↔ tools round trips per question. Must be > 0. |
| `previewLines` | int | `20` | Lines of a command's output echoed to the terminal. `0` disables the echo. Must be ≥ 0. |
| `displayCommands` | bool | `false` | Print the numbered list of commands and file operations after each answer. |
| `displayHooks` | bool | `false` | Show every hook that ran: event, command, tool or agent, decision, size of the context added (never its text). After each answer in the line mode, `-p` and the window; as a finished tool call per hook in an editor. See [hooks](hooks.md#display). |
| `showThinking` | bool | `true` | Show what a thinking model reasons about before it answers. Only the display is optional: the reasoning is always read off the wire, because it is what keeps the watchdog alive while the model thinks. See [Thinking models](../explanation/thinking-models.md). |
| `showCompletionTime` | bool | `true` | Window mode: show `⏱ <duration>` in the status bar, ticking while a turn or an `/ask` runs, then the final duration until the next question. `false` keeps the status bar to its counters. See [the window mode](cli.md). |
| `renderMarkdown` | bool | `true` | Window mode: draw a finished answer as Markdown — headings, lists, block quotes, rules, tables (aligned; a column too wide is cut with `…`), fenced code, **bold**, *italic*, `code`, links (text underlined, address dimmed). The answer being written stays raw; its part is rendered once it is complete: at the model's next tool call, or at the end of the turn. `false` keeps every answer raw. The line mode, `-p` and an editor always show the text as it is; `Ctrl-Y` copies the raw Markdown. |
| `showSpeed` | bool | `true` | The model's generation speed in tokens per second. Window mode: `⚡ ~58 tok/s` in the status bar while a model call streams (an estimate, refreshed every half second), then `⚡ 59.9 tok/s`, the turn's average, until the next answer starts. The turn's average is its tokens over the time the model spent generating them: the tools' run time and the prompt reading are left out. Source: the server's own `timings` when it sends them (llama-server, MLX-Serve), otherwise measured by mm from the first streamed token to the last. Editor (ACP): each finished call and turn goes in a `usage_update`'s `_meta.mm` (`tokensPerSecond`, `scope` `call` or `turn`, `source` `server` or `measured`), which a client that does not know the key ignores. The line mode shows nothing. `false` turns it off. |
| `system` | string | built-in prompt | The system prompt, first message of every history. Three variables are replaced each time a conversation starts (a new session, `/new`, a resumed one — not before every question, so the server's prompt cache holds): `{{date}}` today's date, `YYYY-MM-DD`, local time; `{{cwd}}` the directory the conversation works in (over ACP, the session's own); `{{env.NAME}}` the variable NAME — unset, replaced by nothing, with a banner warning; `{{config.NAME}}` the value NAME of the `variables` section. A NAME that looks like a secret (`…_KEY`, `…_TOKEN`, `…_SECRET`, `…PASSWORD…`, `…CREDENTIALS…`) is a configuration error: the prompt goes to the model, the sessions and the traces. Spaces inside the braces are allowed (`{{ date }}`). Any other `{{…}}` is left as written; `\{{date}}` writes `{{date}}`. Not replaced in AGENTS.md. A session that crosses midnight keeps its date until `/new`. |
| `variables` | map name → string | none | The file's own values for the system prompt, used there as `{{config.NAME}}`. A value may hold `{{date}}`, `{{cwd}}` and `{{env.NAME}}` (expanded, the same secret check), not another `{{config.…}}`. Names: letters, digits, `_` and `-`, not starting with a digit. A `{{config.NAME}}` the section does not have is a configuration error. Example: `variables: {project: "mini-me, a coding agent written in Go"}`, then `You help with {{config.project}}.` in `system`. |
| `turnReminder` | string | `""` | A text appended to every question the model reads, under a `[reminder]` line, after the `preGeneration` hooks, in every front end (line mode, window, `-p`, editor). Kept in the history, like a hook's context; a question recalled with ↑ comes back without it. For a small model, a rule placed next to the question is followed more often than the same rule in the system prompt: measured with LFM2.5-24B-A2B in the Go coder now in `demos/gpt-oss-mini-coder` (first built as `demos/lfm-coder`), a rule asking it to call `ask_user` when a decision is missing was followed 0 times out of 5 from the system prompt, and 3 out of 3 next to the question with the exact call shape. Empty = none. |
| `structuredOutput` | string (Go declarations) | `""` | The shape every answer must follow, as JSON: Go `type` declarations and one `var` naming the root of the answer. See [`structuredOutput`](#structuredoutput) below. Empty = free-text answers. Incompatible with any declared tool. |
| `decision` | mapping or absent | absent | Makes the agent a **decider**: its model is a decision model served by `POST /v1/systemone`, and every message it receives is answered with these questions. See [`decision`](#decision) below. Providers `llamacpp`, `llmman`, `ollama`, `openai` only. |
| `skillRouting` | mapping | `minConfidence: 0.6`, `timeout: 2s`, no `decider` | Before each turn, ask a decider which skill applies, and append the `$skill` line when it is confident enough. See [`skillRouting`](#skillrouting) below. Off without a `decider`. |
| `toolRouting` | mapping | `dropBelow: 0.2`, `timeout: 2s`, no `decider` | Before each turn, ask a decider which tool groups the request needs, and leave out of the request the groups it rules out. See [`toolRouting`](#toolrouting) below. Off without a `decider`. |
| `skillsDir` | string | `skills` | Directory holding the skills, as `<name>.md` files or `<name>/SKILL.md` directories. A relative path is resolved from the directory `mm` is started in (terminal mode, or ACP mode without a config file), or next to the config file (ACP mode with one); the banner warns with the absolute path when nothing is found there. In terminal mode, when that directory holds no skill and the same relative path next to the configuration file's [base directory](cli.md#base-directory-of-relative-paths) does, that one is used and the banner says `skills: N (from <dir>)`: an agent file kept in one place and named with `-config` from another project keeps its skills. |
| `bashTool` | bool | `true` | Declare `bash`. `false` removes it: the model can still read and edit files (`editTools`) and load skills, but never runs a command. Reword a system prompt that still announces a bash tool. |
| `editTools` | bool | `true` | Declare `read_file`, `write_file`, `edit_file`. `false` leaves `bash` and `read_skill` only. |
| `fetchContentTool` | bool | `false` | Declare `fetch_content`, which fetches web pages as Markdown. Off by default: it is the only built-in tool that reaches the network. |
| `planTool` | bool | `true` | Declare `plan`, through which the model keeps a plan of tasks during multi-step work. `false` removes it. See [tools](tools.md#plan) and [Manage plans and tasks](../how-to/manage-plans-and-tasks.md). |
| `askUserTool` | bool | `true` | Declare `ask_user`, through which the model asks the user questions (pick one, pick several, type a text, yes or no) and waits for the answers. `false` removes it: the model cannot ask. Never declared beside a `structuredOutput`. Overridden by `AGENT_ASK_USER`; for an agent asked by another one, also by the asker's `mmConfigs.<name>.askUser`. See [tools](tools.md#ask_user). |
| `saveAnswerTool` | bool | `false` | Declare `save_answer`, which writes an answer the model already gave to a new file: the model sends a file name, not the text again. Off by default. The `/save` command exists either way. See [tools](tools.md#save_answer). |
| `unloadModels` | bool | `true` | The `/unload [model]` command (terminal, window, editor) and the `unload_model` tool, which free a model from the server's memory: llmman and Ollama, Kronk, llama-server in router mode. `false` removes both. The tool is never declared beside a `structuredOutput` or a `decision` block. See [tools](tools.md#unload_model) and [How to free a model's memory](../how-to/unload-a-model.md). |
| `unloadOnExit` | bool | `true` | When mm exits — `/quit`, Ctrl-C at the prompt, Ctrl-D, the window closed, the end of a `-p` run, the editor closing the ACP session, SIGTERM, SIGHUP — unload the agent's model from the server's memory, so it does not keep its RAM after the session. One `🧹` line on stderr (none in ACP mode); nothing when the model was not loaded or the server cannot unload (dmr, openai, a single-model llama-server). Bounded to 3 s: a server that does not answer never holds the exit. Only the agent's own model — not the decision models, not the `mmConfigs` agents (each unloads its own when it stops). `false`: the model stays loaded (faster next start, or another session or tool uses it — mm does not know who else uses it). Independent of `unloadModels`. Overridden by `AGENT_UNLOAD_ON_EXIT`. See [How to free a model's memory](../how-to/unload-a-model.md#when-mm-exits). |
| `llamacpp` | `{autoStart, server, ctxSize, modelsMax, modelsMemoryMargin, fitTarget, sleepIdleSeconds, specDefault, serverArgs, startTimeout}` | `autoStart: false` | Provider `llamacpp` only. `autoStart: true`: when nothing answers at the agent's address (a loopback one, `AGENT_BASE_URL` unset) nor on 8080 nor at the `fallback`, mm starts llama-server in router mode with the agent's model (downloaded on first load), waits until it is loaded, and stops it with the last mm session using it; a server mm did not start is never stopped. `server`: the executable (default `llama-server`, then `llama serve`, on the `PATH`). Launch settings, each one optional, each one a llama-server flag (absent = llama-server's default): `ctxSize` (`--ctx-size`), `modelsMax` (`--models-max`), `modelsMemoryMargin` (`--models-memory-margin`), `fitTarget` (`--fit-target`), `sleepIdleSeconds` (`--sleep-idle-seconds`, `-1` allowed), `specDefault` (`--spec-default`); a negative value is a configuration error. `serverArgs`: any other flag, added last. `startTimeout` (default `15m`): start, download and load. Registry and log: `<user cache dir>/mm/llama-server/<host>-<port>/`. `mm init` asks for a llamacpp agent on this machine (`--autostart`, default yes; `--launch-settings`, the Llama app's values, default no). See [Let mm start llama-server](../how-to/run-with-llama-cpp.md#let-mm-start-llama-server). |
| `razorbill` | `{autoStart, server, config, serverArgs, startTimeout}` | `autoStart: false` | Provider `razorbill` only. `autoStart: true`: when nothing answers at the agent's address (a loopback one, `AGENT_BASE_URL` unset) nor at the `fallback`, mm starts `rzb serve --host <host> --port <port>`, runs `rzb models pull <model>` when the server does not list the model, and stops the server with the last mm session using it; a server mm did not start is never stopped. macOS only: elsewhere — mm in a container or a sandbox — nothing is started and a warning says so. `server`: the `rzb` executable (default `rzb` on the `PATH`, then `/usr/local/bin/rzb`). `config`: rzb's server configuration, passed as `--config`; a relative path is relative to the agent file's directory, `~/` is the home directory; a missing file is a start error. `serverArgs`: any other `rzb serve` flag, added last. `startTimeout` (default `15m`, negative = configuration error): start and download. Registry and log (`rzb.log`, also the pull's output): `<user cache dir>/mm/rzb/<host>-<port>/`. `mm init` asks for a razorbill agent on this machine (`--autostart`, default yes). See [Let mm start rzb](../how-to/run-with-razorbill.md#let-mm-start-rzb). |
| `autoPull` | bool | `false` | At start-up, download the models this agent will use and the server does not list: its own, its `mmConfigs` agents', its `skillRouting` / `toolRouting` deciders'. The progress goes to stderr — one line rewritten in place on a terminal (`⬇ pulling <model> — 52 MB / 145 MB (35 %)`), a line per tenth elsewhere — then `⬇ pulled <model> in 0.8s`. The agent's own model failing stops `mm` with the server's message (`[engine error: autoPull: <model>: the server says: …]`); another model failing, a server that does not answer, or a provider that cannot pull is a `[warning: autoPull: …]`. An agent started by `/ask` or `ask_agent` pulls nothing; `mm --ask` pulls nothing either. A model the server already lists is never pulled (a name without a tag also matches its `:latest` entry). By provider: `llmman` and `ollama` — `POST /api/pull`; `kronk` — `POST /v1/kronk/models/pull`, the pull counting as done only when Kronk's stream ends with `"downloaded": true` (Kronk answers 200 to a failed pull; its last status is then the message); `dmr` — `POST /models/create` on the runner (the base URL without `/engines/…`), the pull counting as done once the runner lists the model; `llamacpp` — no download over the API: the warning says to start llama-server with `-hf <repo>:<quant>`, or to put the GGUF in the router's models directory; `openai` — a warning. |
| `sampling` | map | `temperature: 0.0`, `top_p: 0.9`, `max_tokens: 4096` | Generation settings, OpenAI API key names, passed to the server. The file's block is merged with these defaults: a default the file does not name is still sent. **Except with `provider: openai` and `provider: openai-responses`**: the request carries exactly the file's block, nothing added (no block: no sampling key, the server's defaults apply) — the hosted OpenAI reasoning models refuse `max_tokens` and accept only the default temperature, so a default left in would be a 400. A key the OpenAI API does not declare is sent as it is, at the top level of the request — for example `chat_template_kwargs: {enable_thinking: false}`, which tells a llama.cpp server (`dmr`, `llamacpp`, `llmman`) or Kronk not to reason; `reasoning_effort: none` does the same on Ollama. `messages`, `tools`, `tool_choice` (and the legacy `functions`, `function_call`) are ignored: Genkit builds them from the conversation. The shipped `agent.yaml` adds `parallel_tool_calls: false`. `max_tokens` also bounds one tool call: a `write_file` of a long document (or a thinking model's reasoning plus the call) can hit it, and the call is then cut off. mm hands it back to the model twice, asking for smaller pieces, then stops with `the model hit max_tokens (N) while writing a tool call`; raise the value if that happens. A config that names the limit `max_completion_tokens` (the OpenAI API's name for its newer models) is read the same way: that name is used in this message and for the summary request of the context compression. With streaming, mm also asks the server for token counts (`stream_options.include_usage`). |
| `watchdogTimeout` | duration | `20s` | Silence tolerated between two streamed tokens before the connection is declared hung. Doubled for summary requests. |
| `firstTokenTimeout` | duration | `3m` | Silence tolerated before a model call's first token, while the server reads the prompt (every round trip of a turn has one). Never shorter than `watchdogTimeout`; must be >= 0. With a llama.cpp server (`dmr`, `llamacpp`, `llmman` — whose local GGUF models run in llama-server) mm asks for `return_progress`: each progress report restarts this clock, and the spinner shows `Reading the prompt 12.0k/25.3k tokens`. Ollama and Kronk send no progress: this one wait covers the whole prompt (and the model's loading). On a timeout the watchdog says `no first token from the server after …` (before the first token) or `connection hang detected after …` (after). |
| `bashTimeout` | duration | `30s` | How long one `bash` command may run before it is killed; the tool then answers `[error: <bashTimeout> timeout exceeded]`. Must be > 0. The watchdog keeps counting while a command runs (ticket 57): a command longer than `watchdogTimeout` ends the turn, so raise both together. |
| `bashBackground` | string | `report` | What mm does with the processes a `bash` command leaves running in the background (`./server &`). Each command runs in its own process group. `report`: the processes still in the group when the command returns are listed at the end of the tool output — `[still running in the background after this command: 4242 (server). Each bash call is a new shell: …]` — with the advice to stop them in the same command. `stop`: listed too, and stopped at the end of the turn. `allow`: no process group, nothing said (the behaviour before v2.0.0). A `bashTimeout` or a cancellation stops the whole group. Linux and macOS; nothing is reported or stopped on Windows. Must be `report`, `stop` or `allow`. |
| `context` | map | see below | Automatic history compression. |
| `sessions` | map | see below | Persistent, per-project sessions. |
| `docSearch` | map | see below | BM25 search through the text files of some folders: the `/docs` command and the `search_docs` tool. |
| `metaPrompts` | list | `[]` | The agent's own meta-prompts for the window's `[` picker, beside the 13 built-in ones — see [`metaPrompts` keys](#metaprompts-keys). |
| `trace` | map | see below | Write every request to the model and every response to files. |
| `agentsMd` | map | see below | Append the project's `AGENTS.md` to the system prompt of every conversation. On by default. |
| `acp` | map | see below | How `mm -acp` introduces itself to the editor. |
| `lsp` | map | see below | Language servers behind the `lsp` tool. No server listed = no tool. |
| `hooks` | map event → list | none | Commands run before a question reaches the model (`preGeneration`), before and after each tool call (`preToolCall`, `postToolCall`) after the turn (`postGeneration`), and before and after each hand-off to another agent (`preAsk`, `postAsk`); each reads one JSON object on stdin and may answer one on stdout. Entry keys: `command` or `wasm` (a WebAssembly module, with its `read` / `write` folders), `matcher` (tool and agent events only: a tool name, or an agent name), `timeout` (default `10s`), `onError` (`fail` \| `warn` \| `ignore`, default `warn`). See [hooks](hooks.md). |
| `tools` | list | `[]` | Commands or WebAssembly modules declared as typed tools: each entry a `name`, a `description`, its `parameters`, and a `command` run without a shell or a `wasm` module run in a sandbox. See [`tools` keys](#tools-keys) below and [declared tools](tools.md#declared-tools). |
| `workspace` | map | both keys `false` | The file tools' and `bash`'s relation to the working directory: repair wrong absolute paths, refuse paths outside it. See [`workspace` keys](#workspace-keys) below. |
| `tui` | bool | `false` | Start in the single-window mode without the `-tui` flag. Falls back to the line mode when stdin or stdout is not a terminal; ignored with `-acp`. |
| `yolo` | bool | `true` | `true`: the tools run without asking. `false`: every call that changes something — `bash`, `write_file`, `edit_file`, `fetch_content` with `output`, `lsp` `rename`, `plan` `create`/`update`/`next`/`delete` — waits for the user's answer in every front end (line mode, window, editor), and so does every MCP tool, whatever `mcp.permissions` says. Answers: allow once, allow this tool for the session, reject this call, never (this tool, for the session). `read_file`, `read_skill`, `fetch_content` without `output` and the `lsp` navigation actions never ask. In `-p` and `mm --ask`, nobody can answer: those calls are rejected. An agent started by `/ask`, `ask_agent` or `mm --ask` runs with `AGENT_YOLO=false` and submits its calls to the asking agent: the `yolo` of its `mmConfigs` entry decides when set, else the asking agent's `yolo`. Overridden by `AGENT_YOLO`. `bashTool`, `editTools`, `fetchContentTool` still decide which tools exist. See [How to confirm tool calls](../how-to/confirm-tool-calls.md). |
| `permissions` | string | absent | Deprecated, replaced by `yolo`. `ask` = `yolo: false` (and wins over `yolo: true`); `auto` changes nothing. Either value adds a start-up warning. Must be `auto` or `ask`. |
| `mmConfigs` | map name → path, or name → `{path, description, yolo, askUser, unloadModels}` | none | Other mm agents this one can ask. Each name generates `/ask-<name>` and `/ask-with-context-<name>` (see [slash commands](slash-commands.md#asking-another-agent)), and the list declares the [`ask_agent`](tools.md#ask_agent) tool, through which the model calls them itself. The long form adds `description` (when to call that agent; shown in `ask_agent`'s description, falling back to the agent file's `acp.title`) and `yolo` (decides that agent's tool calls when it is asked, by `/ask`, `ask_agent` or `mm --ask`, instead of this agent's `yolo`: `true` they run, `false` each one is asked; absent, this agent's `yolo` decides) and `askUser` (whether that agent may ask the user questions when it is asked: `true` its `ask_user` questions come up to this agent's user, `false` its `ask_user` tool is not declared; absent, that agent's own `askUserTool` decides) and `unloadModels` (default `false`; `true`: every hand-off to that agent — `ask_agent`, `/ask…`, `mm --ask` — unloads this agent's model right before that agent starts, and that agent's model once it has answered, before this agent reads the answer, so the two models are never loaded together; each unload is a `🧹` notice, a failed one does not stop the hand-off; this agent's model is unloaded on its own server, that agent's on the server its file names; `mm --ask` only unloads that agent's model; not the top-level `unloadModels`, which declares `/unload` and `unload_model`). `path` must not be empty. A relative path is relative to the directory of the file that declares it. Names: lowercase letters, digits and `-`, starting with a letter or a digit, not starting with `with-context`. A path whose file does not exist is a start-up warning, not an error. |
| `a2a` | `{host, port, description, tokenEnv, agents}` | `127.0.0.1:9100`, no agents | The Agent2Agent protocol (ticket 243): how `mm a2a` serves this agent, and the remote A2A agents its model talks to through [`ask_a2a_agent`](tools.md#ask_a2a_agent). See [`a2a` keys](#a2a-keys). |

## `context` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `enabled` | bool | `false` | Turn the automatic compression on. `/compact` works regardless. |
| `threshold` | int | `75` | Percentage of the context window beyond which the history is compressed before the next question. Between 1 and 100. |
| `maxMessages` | int | `80` | Message count that triggers a compression when the window is unknown or the estimate is low. `0` disables. Must be ≥ 0. |
| `keepLastTurns` | int | `3` | Question turns kept raw at the end of the history. Must be ≥ 1. |
| `summaryMaxTokens` | int | `1200` | `max_tokens` of the summary request. Must be > 0. A thinking model's reasoning counts against it: on `dmr`, `llamacpp`, `llmman` and `kronk` the summary request turns reasoning off (`chat_template_kwargs.enable_thinking: false`), on `ollama` too (`reasoning_effort: "none"`, the one switch Ollama obeys) — whatever `sampling` says; other `chat_template_kwargs` are kept, and a `reasoning_effort` set there is lowered to `low` (gpt-oss has no "off"); elsewhere, if the error says the model "reasoned until the limit", raise it. |
| `prompt` | string | `""` | Replaces the built-in summary prompt when not empty. |
| `showStats` | bool | `true` | Print the one-line `🗜️` report after each compression. |
| `compressInTurn` | bool | `true` | Compress INSIDE a long turn, between tool calls: before each model call, when the history passes `threshold` of a known window, the tool exchanges of the current turn but the last 4 lose their bulk (a tool result or a long call argument — a whole file given to `write_file` — keeps its first line and a note saying what was dropped); if that is not enough, they are replaced by notes the model writes about them, appended to the turn's question (merged with earlier notes on a later compression). The question, the last 4 exchanges and the earlier turns are never touched; a tool call is never separated from its result. Independent of `enabled`: a turn that outgrows the window fails either way. Needs a known window (`contextWindow`, or the server's). One `🗜️ in-turn: …` line per compression when `showStats` is on. `false` keeps the turn as it grows. |

## `sessions` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `sessions.enabled` | bool | `false` | Save every conversation to a file, rewritten after each turn, `/compact` and `/new`. The file also records, outside the history, every error shown (`errors` array: failed generation, failed compaction, failed `/resume`). Enables `/sessions` and `/resume` in the terminal and, over ACP, `session/list` and a reload (`session/load`, `session/resume`) that brings the conversation back. Off, an editor's reload still succeeds but the conversation starts over. |
| `sessions.dir` | string | `.mm/sessions` | Directory of the session files, one `<id>.json` each. Relative to the directory `mm` is started from (terminal) or to the session's `cwd` (ACP); an absolute path is used as-is. Must not be empty. |
| `sessions.searchMemory` | bool | `false` | The `/memory <words>` command (terminal, window, editor): searches the stored sessions of the project. Needs `sessions.enabled`. See [slash commands](slash-commands.md) and [How to search earlier sessions](../how-to/search-earlier-sessions.md). |
| `sessions.autoSearchMemory` | bool | `false` | The [`search_memory`](tools.md#search_memory) tool: the same search, called by the model. Independent of `searchMemory`. Needs `sessions.enabled`. |

Either memory key set while `sessions.enabled` is false prints the start-up warning `sessions: searchMemory / autoSearchMemory need sessions.enabled: true — /memory and search_memory are off`.

## `docSearch` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `docSearch.searchDocs` | bool | `false` | The `/docs <words>` command (terminal, window, editor). See [slash commands](slash-commands.md) and [How to search a documentation folder](../how-to/search-the-docs.md). |
| `docSearch.autoSearchDocs` | bool | `false` | The [`search_docs`](tools.md#search_docs) tool: the same search, called by the model. Independent of `searchDocs`. |
| `docSearch.dirs` | list of strings | `[docs]` | The folders searched, recursively. A relative one is resolved against the working directory — the directory `mm` runs in, the session's `cwd` in ACP mode and the window; an absolute one is used as-is; one that starts with `"@agent/"` (quotes needed in YAML) is resolved when the file loads against the agent's folder — the folder of the agent file, or the project root for a `.mm/agent.yaml`, as for wasm modules and hooks: `"@agent/docs"` is the documentation shipped with the agent, wherever `mm` runs. The prefix is optional; both kinds combine: `["@agent/docs", docs]`. A `@agent/` folder is shown resolved (absolute) in the results. A folder that does not exist is reported in the result (`⚠️ <dir>: no such folder`). |
| `docSearch.extensions` | list of strings | `[.md, .markdown, .txt, .adoc, .asciidoc, .rst]` | The files searched, by extension, compared without case. Only these are read. |
| `docSearch.maxFileSize` | size | `1MB` | A bigger file is skipped. A number of bytes, or with `KB` / `MB` / `GB` (powers of 1024): `512KB`. |

`dirs`, `extensions` and `maxFileSize` are checked only when `searchDocs` or `autoSearchDocs` is true. Hidden folders (`.git`, `.mm`…) and `node_modules` are skipped, symbolic links are not followed, a file holding a NUL byte is skipped as binary.

## `metaPrompts` keys

A list (ticket 272). Each entry adds a meta-prompt to the window's `[` picker ([The four pickers](slash-commands.md#the-four-pickers)), after the 13 built-in ones, in the order given; an entry whose label is a built-in's (case ignored) **replaces** that one, in its place.

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `metaPrompts[].prefix` | string | — | The label, brackets included: `"[Haiku]"` (quotes needed in YAML). Required. One pair of brackets around a non-empty name, on one line. The space after it in the box is added by mm. |
| `metaPrompts[].description` | string | — | Shown beside the label in the picker. Required. |

```yaml
metaPrompts:
  - prefix: "[Haiku]"
    description: Answer as a haiku (5-7-5)
  - prefix: "[Brief]"          # a built-in's label: replaces it
    description: Two sentences at most
```

The description is for the user: **the model reads only the prefix** typed before the question. When the name does not say it all (a length, a format, a reworded built-in), say what it means in `system` — measured in `demos/meta-prompts`: without it, Qwen3.5 4B answered `[Commit Message] …` with a compliment instead of a commit message.

## `trace` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `trace.enabled` | bool | `false` | Write one pair of files per model call: the request body as sent (after mm's own fields: `stream_options`, `return_progress`, a summary's reasoning switch), indented, and the response body as received. Overridden by `AGENT_TRACE`. Headers are never written. The banner ends with ` \| trace: <absolute dir>` while it is on (` \| trace: <session cwd>/<dir>` in ACP mode). |
| `trace.dir` | string | `.mm/traces` | Directory of the files. A relative path is resolved per call in the working directory of the turn — the session's `cwd` in ACP mode, like `sessions.dir` — else in the directory `mm` runs in; an absolute path is used as-is. A directory that cannot be created prints `[trace: cannot write to <dir>: <error> — nothing is traced]` once (on stderr in ACP mode); the calls go on. Created when needed. Must not be empty when the trace is on. |

File names: `<YYYYMMDD-HHMMSS.mmm>-<acp.name>-<NNNN>.request.json`, then `….response-<status>.sse` (a streamed answer, the server's SSE lines byte for byte, written as they arrive), `….response-<status>.json` (a whole JSON body, indented), or `….response-error.txt` (no response: the method, the URL and the error). `NNNN` counts the model calls of the process; a retry by the HTTP client is a call of its own. An agent started by `/ask` or `ask_agent` inherits `AGENT_TRACE` and writes beside its asker, under its own `acp.name`.

## `agentsMd` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `agentsMd.enabled` | bool | `true` | Read the file at the start of every conversation: start-up, `/new`, `/resume`, a new ACP session (`session/new`), a reloaded one (`session/load`), `-p`. Never in the middle of a conversation. An agent started by `/ask`, `ask_agent` or `mm --ask` reads it only when its own file has it on; it looks in the working directory it is given (its asker's). |
| `agentsMd.path` | string | `AGENTS.md` | The file. A relative path is resolved against the conversation's working directory — the directory `mm` runs in, the session's `cwd` in ACP mode — not against the configuration file. An absolute path is used as-is. Must not be empty while `enabled` is `true`. |
| `agentsMd.maxChars` | int | `0` | Above this many characters (Unicode characters, after trimming) the file is not read at all, and the banner says so. Never truncated. `0` = no limit. Must be ≥ 0. |

When the file is read, the system message is the `system` prompt, a blank line, then:

```text
PROJECT INSTRUCTIONS (from <absolute path>)
The instructions of the project you work in. Follow them; when the user asks otherwise in the conversation, the user wins.

<the file, trimmed>
```

Not read: a missing file, a file of blanks only, a file above `maxChars`, any file when `structuredOutput` is set, a file that cannot be read (banner warning `<path> cannot be read: …`). A resumed session (`/resume`, `session/load`) continues under the file as it is now.

## `acp` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `acp.name` | string | `bob` | `agentInfo.name` in the `initialize` response. Must not be empty. |
| `acp.title` | string | `Bob (bash-first agent)` | `agentInfo.title`, the name the editor may display. Empty: not sent. Also shown by the window mode (`-tui`) next to `mm`, in its header and above each answer — `‣ mm [Homer (coder)]` — unless it is empty or the built-in default. During an `/ask`, the window shows the ASKED agent instead: its `acp.title` (or its `mmConfigs` name) above its answer, and in the header with its model and `asked by <this agent>`, until it has answered. |
| `acp.clientTools.enabled` | bool | `true` | ACP mode only: the tools an ACP client advertises (`org.mini-me/tools` in its capabilities' `_meta`) become agent tools named `client_<name>`, called through the client's extension methods. `false`: whatever the client advertises is ignored. No effect when the client advertises nothing. See [ACP client tools](acp-client-tools.md). |
| `acp.clientTools.discovery` | string | `meta` | `meta`: the client lists its tools in the `initialize` request, one list for the connection. `request`: the client only advertises `true`, and mm asks for the list (`_org.mini-me/tools/list`) at each `session/new`, `session/load` and `session/resume`. Any other value is refused: `acp.clientTools.discovery must be "meta" or "request"`. |
| `acp.clientTools.permissions` | string | `auto` | `auto`: a call of a client tool asks the client for permission only when `yolo` is `false`. `ask`: every call asks. Any other value is refused. |
| `acp.clientTools.timeout` | duration | `30s` | Bound of one call of a client tool, and of the list request. Must be > 0. |

The version is not configurable: `agentInfo.version` is always the binary's, as printed by `mm --version`.

## `a2a` keys

```yaml
a2a:
  port: 9101
  description: "Alice, an optimist: she argues FOR the idea."
  agents:
    bob:
      url: http://127.0.0.1:9102
      description: "Bob, a sceptic who argues against."
```

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `host` | string | `127.0.0.1` | Where `mm a2a` listens. Keep the loopback unless other machines must call it: an A2A agent runs tools for whoever calls it. |
| `port` | int | `9100` | Its port; `--a2a-port` overrides it. Between 0 and 65535. |
| `description` | string | `acp.title` | The Agent Card's description: what the agents that call this one read about it. |
| `tokenEnv` | string | `""` | The variable holding the token every caller must send (`Authorization: Bearer …`); unset at start-up, `mm a2a` stops. Empty: no authentication. |
| `agents` | map name → `{url, description, tokenEnv}` | none | The remote A2A agents the model can talk to: their presence declares [`ask_a2a_agent`](tools.md#ask_a2a_agent). `url`: the agent's address (`http`/`https`). `description`: when to call it, shown in the tool's description. `tokenEnv`: the variable holding its token, if it wants one. Names: lowercase letters, digits and `-`. |

## `lsp` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `lsp.servers` | list | `[]` | One entry per language server. The file extension picks the server. |
| `lsp.servers[].name` | string | — | How the banner, the tool description and the warnings call it. Required. |
| `lsp.servers[].command` | string | — | The executable, looked up on the `PATH` at start-up. Required. Not found: warning, server skipped. |
| `lsp.servers[].args` | list of strings | `[]` | Its arguments (many servers need `--stdio`). |
| `lsp.servers[].extensions` | list of strings | — | File extensions it serves, with the dot (`.go`, `.ts`). Required, at least one; matched case-insensitively; an extension may be served by one server only. |
| `lsp.diagnosticsAfterEdit` | bool | `false` | After a successful `write_file` or `edit_file` on a file a server handles, ask that server for the file's diagnostics and append them to the tool output under `[lsp diagnostics after this change]`. The server is started if needed; it has 8 s to answer, else the note says `not available — <reason>` (the edit itself succeeded). Small models rarely ask for diagnostics themselves: 0 times in 54 runs in `demos/gemma-coder`. |
| `lsp.diagnosticsAfterRead` | bool | `false` | After a successful `read_file` of a file a server handles, append that server's diagnostics for the whole file under `[lsp diagnostics for this file, added by mm — not part of its content]`. Once per version of the file (modification time and size): reading it again unchanged, or right after an edit that already brought its diagnostics, asks nothing. Same 8 s budget as `diagnosticsAfterEdit`. |

```yaml
lsp:
  servers:
    - name: gopls
      command: gopls
      extensions: [".go"]
    - name: typescript
      command: typescript-language-server
      args: ["--stdio"]
      extensions: [".ts", ".tsx", ".js", ".jsx"]
```

The shipped `agent.lsp.yaml` is `agent.dmr.yaml` with this block on (gopls active, other servers ready to uncomment) and a system prompt that says when to use the tool.

## `tools` keys

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `tools` | list | `[]` | One entry per declared tool. |
| `tools[].name` | string | — | What the model calls. Required. Starts with a letter; letters, digits, `_`, `-`; at most 64 characters. Unique. Not the name of a built-in tool (`ask_agent`, `ask_user`, `bash`, `edit_file`, `fetch_content`, `lsp`, `plan`, `read_file`, `read_skill`, `save_answer`, `search_docs`, `search_memory`, `unload_model`, `write_file`), even one this agent turns off. |
| `tools[].description` | string | — | What the tool does and when to use it, shown to the model. Required. A line `Required parameters: …` is appended. |
| `tools[].parameters` | map name → parameter | `{}` | The arguments, in the order written. Names follow the `name` rules. |
| `tools[].parameters.<p>.type` | string | `string` | `string`, `number`, `integer` or `boolean`. |
| `tools[].parameters.<p>.description` | string | `""` | What the value is, shown to the model. |
| `tools[].parameters.<p>.enum` | list | none | The only values accepted, each of the parameter's type. |
| `tools[].parameters.<p>.required` | bool | `true` | `false` makes the parameter optional. |
| `tools[].parameters.<p>.default` | value | none | The value of an optional parameter the call leaves out. Only with `required: false`; of the parameter's type; inside the `enum` when there is one. |
| `tools[].command` | list of strings | — | The program, then its arguments, one argv entry each. Required unless `wasm` is given; not both. `{{p}}` inside an entry is replaced by the value of parameter `p`. The program (first entry) cannot contain a placeholder. Every placeholder must name a declared parameter. A relative program (`./scripts/x.sh`) is resolved from the working directory. |
| `tools[].wasm` | string | `""` | A WebAssembly module (WASI preview 1 command) run by mm instead of a command. Relative to the agent file. The file must exist at load. The call's arguments are its stdin, as one JSON object. |
| `tools[].read` | list of strings | `[]` | `wasm` only. Folders of the working directory the module may read, mounted under the same name. Relative, inside the working directory (not `.`, not above it), each listed once across `read` and `write`. |
| `tools[].write` | list of strings | `[]` | `wasm` only. Folders of the working directory the module may read and write. Same rules as `read`. |
| `tools[].timeout` | duration | `0` (= `bashTimeout`) | How long one call may run. Must be ≥ 0. |

```yaml
tools:
  - name: release
    description: Prepare a release of the project for a version and a channel.
    parameters:
      version: { type: string, description: "e.g. 1.4.2" }
      channel: { type: string, enum: [stable, beta, nightly] }
      dryRun:  { type: boolean, required: false, default: false }
    command: ["./scripts/release.sh", "{{version}}", "{{channel}}", "--dry-run={{dryRun}}"]
    timeout: 60s

  - name: search_notes
    description: Find the lines of the notes that mention a word.
    parameters:
      word: { type: string }
    wasm: ./tools/search_notes.wasm
    read: [notes]
```

## `workspace` keys

Both keys are off by default. They exist for small models that copy the project's absolute path with a directory missing, or invent a root (`/workspace/…`, `/home/user/…`).

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `confine` | bool | `false` | `read_file`, `write_file`, `edit_file` and `lsp` refuse a path that resolves outside the working directory (symlinks resolved). The refusal is a tool failure the model reads, and it suggests a **relative** path, never the absolute project path: `[<path> is outside the project. Every tool already runs in the project root: use a RELATIVE path, for example "<file name>" — never a path starting with /]`. Applied after `repairPaths`. `bash` is not confined. |
| `repairPaths` | bool | `false` | Turn a wrong path into the one the model meant, and tell it. Three repairs, described below. |

`repairPaths` does three things:

| Where | Path | Becomes | Note added to the tool output |
|-------|------|---------|-------------------------------|
| `read_file`, `write_file`, `edit_file`, `lsp` | Absolute, outside the working directory, **same tree** (at least two leading components in common with it) | The tail after the shared part, without the directories that belong to the project's own path: `<parent>/main.go` → `main.go` | `[path <path> is outside the project: used <fixed> — use relative paths]` |
| same | Absolute, **another tree** (an invented root) | Its longest tail that is an existing file of the project, else its longest tail whose directory exists there (a new file): `/workspace/stats/stats.go` → `stats/stats.go`. No such tail: the path is kept. | same |
| same | Relative, starting with the project folder's own name (`olala-mini/script.js` inside `…/olala-mini`) | The path without that first directory, when the path does not exist and the rest does (or, for a new file, when the rest's directory exists and the original's does not). A real sub-folder with the project's name is left alone. | `[path <path> starts with the project folder's own name: used <fixed> — paths are relative to the project root]` |
| `bash` | A leading `cd <absolute path> &&` (or `;`), quoted or not | Dropped — the command runs in the project root, where every `bash` command starts — when the directory does not exist, is the project root itself, or is in the same tree as the project but outside it. Several such `cd` in a row are all dropped. Kept: a real directory of another tree (`cd /tmp && …`), a subdirectory of the project, a relative `cd`, a `cd` with nothing after it. | `[cd <path> dropped: every bash command already starts in the project root — never cd to an absolute path]` |

The note is written at the start of the tool output, in the terminal, the window and an editor (ACP) alike; the terminal shows the command as it runs, without the dropped `cd`.

```yaml
workspace:
  confine: true      # read_file, write_file, edit_file and lsp stay inside it
  repairPaths: true  # a wrong absolute path becomes the relative one it meant
```

## Provider defaults

| Provider | `baseUrl` | `fallback` | `apiKeyEnv` | Key required |
|----------|-----------|------------|-------------|--------------|
| `dmr` | `http://localhost:12434/engines/v1` | `http://host.docker.internal:12434/engines/v1` | none | no |
| `llamacpp` | `http://127.0.0.1:9931/v1` (then `http://127.0.0.1:8080/v1`) | `http://host.docker.internal:9931/v1` | `LLAMA_API_KEY` | no |
| `llmman` | `http://127.0.0.1:17434/v1` | `http://host.docker.internal:17434/v1` | `LLMMAN_API_KEY` | no |
| `ollama` | `http://localhost:11434/v1` | `http://host.docker.internal:11434/v1` | `OLLAMA_API_KEY` | no |
| `kronk` | `http://127.0.0.1:11435/v1` | `http://host.docker.internal:11435/v1` | `KRONK_TOKEN` | no — only Kronk's `authenticated` and `full-protected` modes check it |
| `mlxserve` | `http://127.0.0.1:11234/v1` | `http://host.docker.internal:11234/v1` | `MLX_SERVE_API_KEY` | no — only a server started with `--api-key` checks it, and not for localhost |
| `razorbill` | `http://127.0.0.1:7920/v1` | `http://host.docker.internal:7920/v1` | `RZB_API_KEY` | no — only a server whose `RZB_API_KEY` is set checks it |
| `openai` | `https://api.openai.com/v1` | none | `OPENAI_API_KEY` | no — a server that needs one answers 401, and the start-up warning names the variable |
| `openai-responses` | `https://api.openai.com/v1` | none | `OPENAI_API_KEY` | no — as `openai` |

`llamacpp`: llama-server's default port is `9931` since llama.cpp b11521 (2026-10-09), `8080` before and in the official Docker images. When the address in use is `http://127.0.0.1:9931/v1` (no `baseUrl`, or that one) and it does not answer, mm tries `http://127.0.0.1:8080/v1`, then the `fallback`.

The `openai` provider sends only standard fields: no `return_progress` (so no prompt-reading progress while a long prompt is read), no reasoning switch on a summary request, no `/unload`. It cannot ask the server for its window: set `contextWindow`, or compression counts messages (`context.maxMessages`). Its start-up probe sends the key to `GET /models`; a 401 or 403 is reported as a refused key, not as a server that does not answer.

The `openai-responses` provider (ticket 178) talks to the same servers through OpenAI's Responses API, `POST <baseUrl>/responses`, instead of Chat Completions: what OpenAI's reasoning models need to call tools while they reason. It sends the `sampling` block as written, with `max_tokens` / `max_completion_tokens` renamed `max_output_tokens` and `reasoning_effort` sent as `reasoning.effort`; it adds `store: false` and `include: ["reasoning.encrypted_content"]` unless the block sets them, and sends the model's encrypted reasoning back with the tool results. Its summary request sets `reasoning.effort: none`. Like `openai`: no prompt-reading progress, no `/unload`, the window from `contextWindow` only. See [How to keep reasoning and tools together with OpenAI's Responses API](../how-to/use-the-openai-responses-api.md).

## `structuredOutput`

A YAML block string holding Go declarations. Each `type` is a definition; the one `var` (`var X T` or `var X = T{}`) names the root of the answer. Only `type` and `var` declarations are allowed.

| Go | JSON Schema |
|----|-------------|
| `string` | `{"type": "string"}` |
| `bool` | `{"type": "boolean"}` |
| `int`, `int8` … `int64`, `uint` … `uint64` | `{"type": "integer"}` |
| `float32`, `float64` | `{"type": "number"}` |
| `[]T` | `{"type": "array", "items": T}` |
| `map[string]T` | `{"type": "object", "additionalProperties": T}` |
| `struct { … }` | `{"type": "object", "properties": …, "required": [every key], "additionalProperties": false}`, keys in declaration order |
| a declared type `Name` | `{"$ref": "#/$defs/Name"}`; a struct root is inlined, `$defs` holds the types the root reaches |
| `*T` field, or `json:",omitempty"` | the key stays required, its value is `anyOf: [T, null]` |

| Field element | Effect |
|---------------|--------|
| `json:"name"` tag | the key; without a tag, the Go field name as written |
| `json:"-"` tag | field skipped |
| `//` comment above or beside a declaration or field | its `description` |

Refused, with `structuredOutput:<line>:<col>: …` counted from the first line of the block: `func`, `import`, `const`; generic types; aliases (`type A = B`); embedded fields; fixed-size arrays; map keys other than `string`; `interface`, `chan`, `func`, qualified (`time.Time`) and undefined types; a pointer outside a struct field; a type declared twice; a key used twice; zero or more than one `var`; a `var` without a type.

When the block is not empty:

- the declarations are appended to `system`, under an `OUTPUT FORMAT` paragraph;
- every model call carries `response_format: {"type": "json_schema", "json_schema": {"name": "output", "strict": true, "schema": …}}`;
- the answer is validated against the schema; one that does not match fails the turn with `model failed to generate output matching expected schema: …`, prefixed with `the answer was cut off by max_tokens before its JSON was complete …` when the server stopped on `max_tokens`;
- `-p` prints the JSON answer alone on stdout (see [Prompt mode specifics](cli.md#prompt-mode-specifics));
- the banner shows `tools: none (structured output: JSON answers)` and no "no skills" / "no tool" warning.

Example:

```yaml
structuredOutput: |
  type Language struct {
      Name     string `json:"name"`     // the language's name, in English
      Official bool   `json:"official"`
  }
  type Country struct {
      Name      string     `json:"name"`
      Capital   *string    `json:"capital"`   // null when unknown
      Languages []Language `json:"languages"` // at most 4
  }
  var Countries = []Country{}
```

## `decision`

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `timeout` | duration | `60s` | Bound of one answer. Must be ≥ 0; `0` = the default. |
| `display` | bool | `false` | `-p` adds `"display":true` at the head of the server's JSON, so a `preGeneration` hook that runs this decider can return the answers as its reply's `display`, shown to the user before the chat model answers (see [hooks](hooks.md#reply)). Nothing else changes. |
| `questions` | mapping name → question | — | At least one. The order of the file is kept: in the request, in the answer lines, and for a choice's options. |

A question:

| Key | Type | Description |
|-----|------|-------------|
| `type` | `choice`, `noul` or `score` | `choice`: one option out of `criteria`. `noul`: the probability that `instructions`, a statement about the state, is true. `score`: a level out of `criteria`. |
| `instructions` | string | The question (`choice`, `score`) or the statement (`noul`). Not empty. |
| `criteria` | mapping or list | `choice`: a mapping option → description, at least 2 options. `score`: a list of 2 to 10 levels, lowest first. `noul`: none. |

Answers, as `POST /v1/systemone` returns them under `answers.<name>`:

| Type | Fields |
|------|--------|
| `choice` | `choice` (the option), `probabilities` (option → probability), `confidence` |
| `noul` | `noul` (probability that the statement is true) |
| `score` | `score` (probability-weighted level index, from 0 to n−1), `legend` (index → level), `probabilities` (index → probability), `confidence` |

When the block is present:

- the message received is the state, alone: the history, the system prompt, hooks and tools are not sent;
- `-p` prints the server's JSON alone on stdout (see [Prompt mode specifics](cli.md#prompt-mode-specifics));
- the line mode, the window and an editor (hence `/ask-<name>` and `mm --ask`) show one line per question, then the JSON in a fenced block:

  ```
  risk: dangerous (confidence 0.94) — dangerous 0.96 · local-change 0.03 · read-only 0.01
  destructive: 0.88
  urgency: 1.89 → a careful review (confidence 0.83) — a careful review 0.92 · a quick look 0.06 · no review needed 0.03
  ```

- no tool is declared, whatever `bashTool`, `editTools`, `planTool`, `askUserTool`, `fetchContentTool`, `saveAnswerTool`, `unloadModels`, `skillsDir`, `docSearch` and `sessions` say: the file needs no `…: false` line (`/unload` remains);
- `mcp.enabled: true`, `lsp.servers`, `mmConfigs` or `tools:` stop the start-up with an error, before any server is started;
- the banner shows `tools: none (decision model: <n> question(s))` and no "no skills" / "no tool" warning;
- `AGENTS.md` is not sent, whatever `agentsMd` says; the banner shows `agents.md: ignored (decision model)` when the file exists.

Example:

```yaml
provider: llamacpp
model: LiquidAI/d1-3B-GGUF:Q4_K_M
baseUrl: http://127.0.0.1:8090/v1
decision:
  questions:
    risk:
      type: choice
      instructions: How risky is running this shell command in the project directory?
      criteria:
        read-only: Only reads files or prints information
        local-change: Changes files inside the project, easy to rebuild or revert
        dangerous: Deletes or changes things outside the project, uses sudo, the network, git push or force
    destructive:
      type: noul
      instructions: The command deletes data that cannot be rebuilt.
    urgency:
      type: score
      instructions: How carefully should a person review this command before it runs?
      criteria: [no review needed, a quick look, a careful review]
```

### Servers

| Provider | `/v1/systemone` (checked 2026-10-22) |
|----------|--------------------------------------|
| `llamacpp` | yes |
| `llmman` | yes |
| `ollama` | yes |
| `openai` | the server's own: a server without the route answers 404 |
| `openai-responses` | no — refused at start-up |
| `dmr` | no (404, Docker Model Runner v1.2.8) — refused at start-up |

The route serves models it knows as decision models: LiquidAI d1 (`LiquidAI/d1-3B-GGUF:Q4_K_M`) was accepted by all three; evalengine's `decision-4b` was refused by llmman (`501 This model is not a decision model`) and Ollama (`400 … is not a llama.cpp decision model`).

## `skillRouting`

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `decider` | path | `""` | Agent file of the decision model, relative to this file. Its `provider`, `model`, `baseUrl`, `fallback` and `apiKeyEnv` are used — `AGENT_BASE_URL` is not, it names this agent's server; its `decision` block is not. Must exist. Empty = routing off. |
| `minConfidence` | number | `0.6` | Below the server's `confidence` for the chosen skill, nothing is appended. Between 0 and 1. |
| `timeout` | duration | `2s` | Bound of the routing question. Must be > 0. |

Before each turn — line mode, window, editor — when the question names no `$skill` and the catalogue is not empty, mm sends one `choice` question: the request (cut at 1,500 characters) as the state, one option per skill (its name and description, catalogue order), then `none`. The front end then shows one notice:

| Notice | Meaning | Appended to the question |
|--------|---------|--------------------------|
| `🧭 $<skill> (<confidence>)` | chosen at or above `minConfidence` | `[skill: <skill> — load it with read_skill and carry out its steps now]` |
| `🧭 no skill (none <confidence>)` | the decider chose `none` | nothing |
| `🧭 no skill (<skill> <confidence> < <minConfidence>)` | chosen below `minConfidence` | nothing |
| `🧭 skill routing skipped: <error>` | the decider failed or exceeded `timeout` | nothing |

In an editor the notice goes to the agent's stderr log (`[acp] session <id>: …`). `-p` does not route. The banner adds `| routing: <provider>/<model> ≥ <minConfidence>`.

Example:

```yaml
skillRouting:
  decider: agent.decider.yaml
  minConfidence: 0.6
  timeout: 2s
```

## `toolRouting`

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `decider` | path | `""` | Agent file of the decision model, relative to this file — read as for [`skillRouting`](#skillrouting). Must exist. Empty = routing off. |
| `dropBelow` | number | `0.2` | A group whose probability is below it is left out. Between 0 and 1. |
| `timeout` | duration | `2s` | Bound of the routing question. Must be > 0. |
| `groups` | mapping | — | At least one. Name → `when` (the statement the decider judges: "answering this request needs …") and `matcher` (a regular expression on tool names, like a hook's). Both required. Kept in file order. |

Before each turn — every mode, `-p` included, after the `preGeneration` hooks — mm sends one `noul` question per group that matches at least one of the agent's tools, the request (the question the model will read, cut at 1,500 characters) as the state. A tool is left out of the request when it belongs to at least one group and every group it belongs to scored below `dropBelow`. A tool in no group is always offered; so is every tool when the decider fails or exceeds `timeout`. One notice is shown:

| Notice | Meaning |
|--------|---------|
| `🧰 tools: dropped <group> (<probability>), …` | these groups are not offered this turn |
| `🧰 tools: all kept` | no group under `dropBelow` |
| `🧰 tool routing skipped: <error>` | the decider failed or exceeded `timeout`; every tool is offered |

No question is sent, and no notice shown, when no group matches a tool of the agent. The banner adds `| tool routing: <provider>/<model>, <n> group(s), drop < <dropBelow>`.

Example:

```yaml
toolRouting:
  decider: agent.decider.yaml
  dropBelow: 0.2
  timeout: 5s
  groups:
    shell:
      when: Answering this request needs running shell commands (build, test, git, listing files).
      matcher: ^bash$
    web:
      when: Answering this request needs fetching a web page or searching the web.
      matcher: ^fetch_content$
```

## Validation errors

Reported on stderr as `[config error: <path>: <message>]`, exit code 1 — in every mode, so that `-p … | jq` never reads an error as the answer. `[engine error: …]` and `[usage: …]` too.

| Message | Cause |
|---------|-------|
| `provider must not be empty` | `provider: ""` |
| `model must not be empty` | `model: ""` |
| `contextWindow must be >= 0` | negative value |
| `maxOutput must be > 0` | zero or negative |
| `maxTurns must be > 0` | zero or negative |
| `previewLines must be >= 0` | negative value |
| `context.threshold must be between 1 and 100` | out of range |
| `context.keepLastTurns must be >= 1` | zero or negative |
| `context.summaryMaxTokens must be > 0` | zero or negative |
| `context.maxMessages must be >= 0` | negative value |
| `sessions.dir must not be empty` | empty string |
| `docSearch.dirs must name at least one folder` | `dirs: []` with a switch on |
| `metaPrompts[N].prefix: "…" must be a name in brackets, like "[Haiku]"` | a prefix without its brackets |
| `metaPrompts[N].prefix: "…" must hold a name, on one line, with no other bracket` | `"[]"`, `"[ ]"`, `"[a]b]"` |
| `metaPrompts[N].description: the picker shows it beside [X] — it must not be empty` | no `description` |
| `metaPrompts[N].prefix: [X] is listed twice` | two entries with the same label (case ignored) |
| `docSearch.dirs: a folder must not be empty` | `dirs: [""]` |
| `docSearch.extensions must name at least one extension` | `extensions: []` with a switch on |
| `docSearch.extensions: "md" must start with a dot, like ".md"` | an extension without its dot |
| `docSearch.maxFileSize must be > 0` | `maxFileSize: 0` with a switch on |
| `line N: "huge" is not a size: write 1MB, 512KB or a number of bytes` | `maxFileSize` that is not a size |
| `trace.dir must not be empty` | empty string with the trace on |
| `agentsMd.path must not be empty` | empty string with `agentsMd.enabled` on |
| `agentsMd.maxChars must be >= 0` | negative value |
| `acp.name must not be empty` | empty or blank string |
| `lsp.servers[N].name must not be empty` | a server without `name` |
| `lsp.servers[N].command must not be empty` | a server without `command` |
| `lsp.servers[N].extensions must list at least one extension` | a server without `extensions` |
| `lsp.servers[N].extensions: "go" must start with a dot, like ".go"` | an extension without its dot |
| `lsp.servers[N]: extension ".ts" is already served by "typescript"` | two servers on one extension |
| `tools[N] (<name>).name "<name>" must start with a letter and hold only letters, digits, _ or - (64 characters at most)` | an invalid tool name |
| `tools[N] (<name>).name "<name>" is the name of a built-in tool` | a declared tool named like a built-in tool |
| `tools[N] (<name>): another tool is already called "<name>"` | two entries with one name |
| `tools[N] (<name>).description must not be empty: …` | no `description` |
| `tools[N] (<name>).command must name a program, …` | no `command` and no `wasm`, or an empty first entry |
| `tools[N] (<name>): give command or wasm, not both` | an entry with both |
| `tools[N] (<name>): wasm: no module at <path>` | the module file does not exist, or is a folder |
| `tools[N] (<name>): read and write only apply to a wasm tool — …` | `read` or `write` on a `command` entry |
| `tools[N] (<name>): folder "<f>" must be relative to the working directory` | an absolute folder |
| `tools[N] (<name>): folder "<f>" must be a folder inside the working directory, not it or above it` | `.`, `..` or a path that leads above |
| `tools[N] (<name>): folder "<f>" is given twice` | a folder listed twice, in `read`, `write` or both |
| `tools[N] (<name>).command: the program ("{{p}}") cannot come from a parameter` | a placeholder in the first entry |
| `tools[N] (<name>).command: {{p}} is not a declared parameter` | a placeholder no parameter declares |
| `tools[N] (<name>).timeout must be >= 0` | a negative `timeout` |
| `tools[N] (<name>).parameters.<p>.type "x" must be one of string, number, integer, boolean` | an unknown type |
| `tools[N] (<name>).parameters.<p>.enum: …` | an `enum` value not of the parameter's type |
| `tools[N] (<name>).parameters.<p>.default only makes sense with required: false` | a `default` on a required parameter |
| `tools[N] (<name>).parameters.<p>.default: …`, `….default <v> is not one of the enum values` | a `default` of the wrong type, or outside the `enum` |
| `tools[N] (<name>).parameters.<p>: declared twice`, `…: a parameter name must start with a letter …` | a repeated or invalid parameter name |
| `line N: parameters must be a mapping of name → {type, description, …}` | `parameters:` written as a list |
| `permissions must be "auto" or "ask"` | any other value of the deprecated key |
| `AGENT_YOLO="maybe": must be true or false` | an `AGENT_YOLO` value `strconv.ParseBool` refuses (accepted: `1`, `t`, `true`, `0`, `f`, `false`, any case) |
| `bashTimeout must be > 0` | zero or negative |
| `bashBackground must be "report", "stop" or "allow", not "…"` | any other value |
| `structuredOutput:<line>:<col>: …` | a declaration the [`structuredOutput`](#structuredoutput) section cannot translate |
| `structuredOutput: no var declaration: …` | no `var` names the root |
| `decision.questions: at least one question is needed` | a `decision` block without questions |
| `line <n>: decision: unknown key "<key>" (timeout, questions)` / `line <n>: question "<name>": unknown key …` | a misspelt key in the block |
| `line <n>: question "<name>": unknown type "<type>" (choice, noul or score)` | `type` is not one of the three |
| `line <n>: question "<name>": a choice needs at least 2 options, got <n>` / `a score needs 2 to 10 levels, got <n>` / `a noul question takes no criteria` | `criteria` of the wrong shape or size |
| `decision: dmr: no /v1/systemone route (…)` | `decision` with `provider: dmr` |
| `decision and structuredOutput cannot be used together: …` | both in one file |
| `decision cannot be used with tools — this agent declares: <sources> (…)` | a decider whose file sets `mcp.enabled: true`, `lsp.servers`, `mmConfigs` or `tools:`; `<sources>` lists them (`mcp`, `lsp servers`, `mmConfigs`, `tools`); reported before the tools are assembled |
| `skillRouting.decider: …` | the decider file is missing, has no `provider` or `model`, or names `dmr` |
| `skillRouting.minConfidence must be between 0 and 1` / `skillRouting.timeout must be > 0` | out of range |
| `toolRouting.decider: …` | the decider file is missing, has no `provider` or `model`, or names `dmr` |
| `toolRouting.dropBelow must be between 0 and 1` / `toolRouting.timeout must be > 0` | out of range |
| `toolRouting.groups: at least one group is needed` / `toolRouting.groups.<name>: when must not be empty` / `… matcher must not be empty` / `toolRouting.groups.<name>.matcher: …` | a missing group, statement or matcher, or a matcher that does not compile |
| `line <n>: toolRouting: unknown key "<key>" (decider, dropBelow, timeout, groups)` | a misspelt key in the block |
| `structuredOutput cannot be used with tools — this agent declares: <tools> (…)` | a `structuredOutput` with at least one declared tool (`bash`, `plan`, the file tools, `fetch_content`, `read_skill`, `ask_agent`, `lsp`, MCP tools, declared `tools`). Reported after the tools are assembled, before any front end starts. |
| `mmConfigs: "Bob" is not a valid name (…)` | a name with uppercase letters, spaces or other characters, or starting with `-` |
| `mmConfigs: "with-context-x" is not a valid name (it would read as /ask-with-context-…)` | a name starting with `with-context` |
| `mmConfigs.<name>: the path must not be empty` | `<name>: ""`, or a long form without `path` |
| `hooks: unknown event "x" (…)`, `hooks.<event>[N]: …` | an invalid `hooks:` block — see [hooks](hooks.md#validation-errors) |
| `unknown provider "x" (known: dmr, kronk, llamacpp, llmman, mlxserve, ollama, openai, openai-responses, razorbill)` | Reported by the engine, as `[engine error: …]`. |

A start-up warning, not an error, is printed when `context.enabled` is `true`, the window is unknown and `context.maxMessages` is `0`, and when a declared tool has the name of an MCP tool (`tools: <name> skipped — an MCP tool already has that name`; the tool is not declared), and when the file sets the deprecated `permissions` key (`permissions: ask is deprecated — use yolo: false instead …`).

## Shipped files

| File | Purpose |
|------|---------|
| `agent.yaml` | Docker Model Runner set-up: `provider: dmr`, `maxTurns: 40`, `displayCommands: true`, compression off, a system prompt named "Bob" that describes the skills and file-editing rules. |
| `agent.llamacpp.yaml` | llama.cpp set-up: `provider: llamacpp`, `baseUrl: http://127.0.0.1:9931/v1`, compression on. |

### Example

```yaml
provider: llamacpp
model: my-alias
baseUrl: http://127.0.0.1:9931/v1
fallback: ""
maxTurns: 40
context:
  enabled: true
```