Guide

When the brain is unsure

Two trained heads decide most of what a character does: the reflex head, every tick on the player's machine, and the planner, once per wake on our service. Each knows when it is out of its depth. This page is what happens then, what leaves the machine, and how those moments make the next brain better.

The reflex head, torn

Below its confidence bar the reflex head does not guess. It records the moment: the situation as feature names, the two verbs it was torn between, a hashed name. Never text. The character keeps to its plan or its routine, and the moment goes to the flywheel.

That is the whole story unless you give the lane a model. With one configured, a moment that matters (someone armed and close, just hit, near a bad memory, the player engaged) asks your model for one of the two verbs. The answer lands one or two ticks later and is served through the same path a confident reflex uses, re-checked against the manifest first, so a verb outside the character's can is discarded. It reads as a beat of thought, not lag. Your model, your key, your bill, exactly like the talk lane.

LW_ESC_BACKENDwhat it uses
unsetnothing is asked; the moment is captured (the default)
anthropicANTHROPIC_API_KEY, LW_ESC_MODEL (a small fast model is plenty: the question is one of two words)
openaiany OpenAI-style chat endpoint at LW_ESC_URL: a local model, vLLM, your own proxy; LW_ESC_KEY optional

The question is one sentence of plain words and the answer is one word, so a small local model handles it. Offline, or with no backend, nothing changes: the lane adds, it never blocks and never waits.

The planner, torn

When the composer's two best plans score within a hair of each other, the chooser's word is final, and the receipt carries the whole ranked list so lw why shows you how close it was.

Give the lane a model and that changes in one narrow window. The character starts on the chooser's plan at once; your model is asked which of the two courses this person would actually take, in plain words, and if it answers before the first step fires, the plan is swapped. It picks between two lawful plans and never writes one, so it cannot invent a verb or break a rule. Same setting and key as the reflex lane, LW_ESC_BACKEND, so you configure one thing for both. The pick is uploaded as a labelled moment for the planner's retrain.

What leaves the machine, and what comes back

momentwhat goes upwhat comes back
reflex tornfeature names, the two verbs, a hashed name, the tuplea better reflex head after a retrain
reflex torn, your model answeredthe same, plus the verdictthe same, and the retrain learns your model's calls
planner wakethe wake itself (see Local and hosted)the plan

No journal text, no player identity, no positions. lw sync --dry-run prints the exact rows before anything is sent; lw escalations --lane student counts them.

Both kinds of row feed the same retrain. A torn moment your model answered carries its label. A torn moment nobody answered is resolved on our side when the retrain is made, so nothing captured is wasted either way. Your own retrain (lw train student --propose) folds them into the reflex head that comes back to you; the base every new studio starts from is retrained on everyone's, under the same never-worse gate.

Whose key, whose model

lanemodelkey
dialogue (the talk lane)yours, or a free local oneyours
a verdict when the reflex is torn, or between two near-tied plansyours, if you give it one; otherwise noneyours
planningours, no language modelnone of yours

Two lanes can take a key of yours, and both are optional: Add dialogue and this one.

In a shipped build

Never put a key of yours in a bundle: point LW_ESC_URL at your own proxy or a model that ships with the game, as with the talk lane. The bundle uploads the reflex lane's torn moments with its build key, ninety seconds after launch and every ten minutes after that, on a thread that never touches the tick. A build key may wake and upload that lane, and nothing else. A verdict served shows in the receipts as served: llm-verdict.

Next: Ship with a licence.