LocalHarness — architecture
The System
the parts
- you a terminal or a chat app; every conversation comes in the same way.
- the orchestrator one main agent reads your task and runs the loop: think, act, check, repeat.
- tools read, write, run, search — an agent holds only the tools you allow.
- the helpers specialists take delegated pieces, each in a fresh window, fenced to its job.
- the model server the thinking runs on the server you already have — vLLM, Ollama, LM Studio, llama.cpp.
- the bus every step is written down in order; the live view and the replay read it.
- memory what it learns outlives the session — gated on the way in, filed while idle.
The Loop
One turn at a time — read, act, check. Gates keep a run honest and stop it running away.
the gates
- Budgets every run gets a ceiling on how many actions it may take and how long it may run, checked before each step.
- Act-guard if the model announces a plan but then stalls without doing anything, the harness nudges it once to actually take the step.
- Self-check before a plain answer goes out, the model is asked to review its own work and confirm it, or fix it.
- Parse-repair when the model’s tool request comes out garbled, the harness repairs the format and retries instead of crashing.
- Stuck-detector if it keeps repeating the same move without progress, the harness first nudges it, then stops the run rather than spin forever.
Each turn ends; what it learned doesn't — memory carries it to the next one.
Memory
It takes notes while it works, and files them while it sleeps — memory at every scale, from one window to forever.
at every scale
- the window big results park as short notes; one call pulls the full text back.
- the task a document bigger than the window is read in sections — and the section notes persist.
- the sitting every step is recorded in order; each sitting ends with a short summary on the shelf.
- for good facts survive across sittings, in a database and a file you can read.
how it learns
- two ways in it saves what you tell it to, and what surprises it.
- surprise, measured it learns each tool’s usual result; a surprising failure is worth remembering.
- new memories wait fresh notes stay out of view until idle time confirms them.
- it sleeps on it while idle, it files recurring lessons and lets stale ones fade.
- lessons become chapters related lessons are written up as one chapter that keeps its identity as it grows.
- corrections stay careful when you say “that’s wrong,” the fix is saved separately and can be undone.
- it never pretends every write is read back and checked; a failed write fails loudly.
The settings are just a starting point — the harness tunes them itself and keeps only what measurably helps.
Autoresearch
It tries one change at a time and keeps it only if it measurably helps.
the gate
- a stronger model proposes a separate, stronger model suggests one change at a time.
- tested in a throwaway copy the change runs a fixed task set in a disposable checkout; your setup is never touched.
- held to a real bar kept only if it clearly beats the current version, not if it just edges ahead by luck.
- a sealed set it never sees a final exam it cannot study for, checked only at the end.
- adopted as a commit a win lands as a git commit; undoing it is one command.
- the gate can say no a change that misses the bar is archived, never adopted.