Mori docs
Thinking stages
Four gears, Spark to Trance, that change how deeply Mori thinks, how long it can act, and how hard it verifies.
What a stage is
A thinking stage is not a label on the same behavior. Each stage reconfigures real machinery for the turn: the reasoning effort sent to the model, the cap on how many tool steps the agent loop may take, how many times a failed tool call is retried, how many deep-research waves are run, and the wall-time estimate Mori shows you up front. Deeper stages genuinely think longer, act longer, and verify more before claiming done.
Stage selection happens entirely on your machine. Mori is local-first and bring-your-own-keys: the stage shapes the request body that goes straight from your desktop to your provider. And a stage never changes what Mori is allowed to do, risky actions are approval-gated at every stage, including the longest Trance run.
The four stages
- Spark: instant. Quick answers and edits, no ceremony. Effort
low, up to 15 tool steps, 0 retries, 0 research waves. ETA: seconds. - Flow: the default. Normal agentic work. Effort
high, up to 50 tool steps, 1 retry, 1 research wave. ETA: under 2 minutes. - Forge: deep build. Plans first, verifies everything. Effort
xhigh, up to 90 tool steps, 2 retries, 2 research waves. ETA: 2 to 10 minutes. - Trance: maximum. Long autonomous think-build-prove runs. Effort
max, up to 200 tool steps, 3 retries, 3 research waves. ETA: 10 to 45 minutes.
The ETA is shown before the run starts, so you know what you signed up for. If a stage name Mori doesn't recognize ever reaches the resolver, it falls back to Flow rather than failing.
What each knob does
- Effort: the depth of the model's reasoning and how much it accomplishes per turn. On Anthropic models this is the
output_config.effortparameter; on OpenRouter it becomes a thinking budget (see below). - Tool-step cap (
depthCap): the maximum number of tool-loop iterations in one turn. Spark stops at 15 steps; Trance can chain up to 200 before yielding. - Retries: how many times a failed tool call is retried before the agent gives up on that step. Spark fails fast; Trance retries three times.
- Research waves: how many waves of deep research a research task runs. Spark skips research entirely; each deeper stage adds a wave.
Use Spark for lookups and one-line edits, Flow for everyday tasks, Forge when you want a plan and verification of every change, and Trance when you want Mori to keep working, and keep proving its work, until the job is genuinely finished.
Selecting a stage
The composer has a stage selector; pick one and it becomes the session's stage for every subsequent turn. The order in the menu is Spark, Flow, Forge, Trance, and each entry carries a one-line blurb of what it does. Flow is the default, you only touch the selector when a task is trivially small or unusually large.
Per-turn prefix override
You can deepen (or lighten) a single turn without changing the session stage by prefixing your message with a stage name and a colon. The prefix is case-insensitive, tolerates surrounding whitespace, and is stripped before the message reaches the model. It applies to that turn only, the next message returns to the session stage.
trance: port the sync engine to the new schema and prove every test passes
spark: what does this error mean?How effort reaches Anthropic models
On the Anthropic path, outputConfigFor builds the output_config fragment of the request body from the stage's effort. The effort parameter is not universal, so Mori gates it per model and never emits an illegal value:
- Models that reject effort entirely (Haiku, Sonnet 4.5, and 3.5/3.7-era models) get no
output_configat all, sending one would be a 400. - Models that accept
lowthroughmaxbut notxhigh(Sonnet 4.6, Opus 4.5/4.6) have Forge'sxhighdowngraded tohigh. - Models with the full range (Fable 5, Opus 4.7+, Sonnet 5) receive the stage's effort unmodified.
// Forge on a full-range model
{ "output_config": { "effort": "xhigh" } }
// Forge on Opus 4.6 → downgraded
{ "output_config": { "effort": "high" } }
// Any stage on Haiku → fragment omitted entirelyHow effort reaches OpenRouter models
On OpenAI-compatible endpoints, reasoningFor produces the equivalent reasoning.effort fragment, but only when the base URL is openrouter.ai and the model family is known to accept it (Claude, GPT-5, o1/o3/o4, Gemini 2.5, DeepSeek-R1, Grok). Fast tiers: Haiku, mini, flash, get no reasoning fragment at all, keeping them instant.
The stage's five-level effort maps onto OpenRouter's three: Spark (low) omits reasoning entirely, Flow (high) sends medium, and Forge/Trance (xhigh/max) send high. OpenRouter converts the value into a thinking budget as a fraction of max tokens, which is how Forge and Trance genuinely think deeper on that path too. Because Mori is bring-your-own-keys, this all runs against your own OpenRouter account.
// Trance on an eligible OpenRouter model
{ "reasoning": { "effort": "high" } }
// Spark, or any fast tier → fragment omittedWatching a stage think
Every stage shows its reasoning as it happens. The thinking types into view word by word and holds until the last word lands, then the reply follows. The pace is capped for reading, but the words are the model's real reasoning stream, not an animation over a spinner.
Deeper stages think longer, so you watch more of it. Beside the thinking, the right rail fills in the plan phase by phase, so a long Forge or Trance run is never a black box.
Stages and safety
Stages scale persistence, not permission. A Trance run can take hundreds of tool steps over 45 minutes, but every risky action inside it, shell commands, file writes outside the workspace, anything destructive, still stops at the same approval gate as a Spark turn. Depth buys you thoroughness; it never buys the agent autonomy you didn't grant.