Repository navigation
A rewrite focused on small local models: about 3,000 lines in a flat package, tuned and measured on 4B and 9B models. On the 36-task eval suite, qwen3.5:4b went from 88% to 97% of runs passed, with about a quarter fewer tool calls and prompt tokens per task.
Breaking changes
- Tools were renamed:
shell_exec→shell,code_edit→edit_file,list_directoryandfind_files→list_files,memory_store/memory_recall→remember/recall.memory_forgetbecame the/forgetcommand. Old names intools.confirmand from models still work. write_filerefuses to overwrite a file the agent hasn't read in the session.agent.temperature: nullnow means the tier's default.restrictToWorkspaceis deprecated; usetools.sandboxLevel.- Ollama
thinkdefaults tofalse, and the default model isqwen3.5:9b. chat -minto a pipe prints only the reply on stdout; everything else goes to stderr.- The package is flat:
agent/,channels/andbus.pyare gone (nowloop.py,prompt.py,tools.py,memory.py,web.py,telegram.py). Plugins, config files and sessions keep working.
New
- Budgets by tier: the model's size (reported by Ollama, or read from its name) sets the context budget, round limit, tool output size and Ollama
num_ctx. - Forgiving tool calls: common argument and tool names (
file_path,cmd,old_string,bash,str_replace), string numbers and JSON-object content are accepted. - Workspace paths the way small models write them:
/notes.txtand/workspace/notes.txtmean the workspace file in the sandbox. - Errors that say what to do next, such as "there is no tool 'python'; call shell with the command".
- Replies are capped at 4,096 tokens; a repeated tool call gets one nudge, then a forced answer.
- A shorter system prompt (about 240 tokens) that names the OS and keeps a stable prefix for KV-cache reuse.
read_fileaccepts a negative offset (counts from the end);edit_filetolerates tabs and indentation differences.chat --report FILEwrites a JSON report of a run.- An OpenAI provider module again, alongside the OpenAI-compatible
localprovider.
Docs
- docs/how-it-works.html: a plain-English, interactive tour of the architecture, one message step by step, a tool call checker, tiers and context pruning.
Evals
- 36 tasks across chat, simple, multi-step, robustness and safety categories (up from 9), with
--repeat,--setand--compare. - qwen3.5:4b: 88.0% → 97.2% of runs passed; 3.0 → 2.3 tool calls per task; 6,608 → 5,121 prompt tokens per task.
- qwen3.5:9b: 97.2% → 96.3%, with 2.7 → 2.2 tool calls per task. Full results in evals/README.md.