A coding agent for your local model.
It drives whatever optiq serve is serving, a 4-bit quant on your MacBook or a 27B on a Mac Studio, through a read, edit, run-tests loop right in your terminal. Offline. Private. Yours.
$ pip install mlx-optiq$ optiq codeThe same loop a cloud agent runs. On your machine.
Describe a change. OptiQ Code plans, edits, and runs your tests, turn after turn, until the suite is green, pausing for your approval on anything that writes.
Ground it
Searches and reads the files it needs, so the change is grounded in your actual code.
Make the change
Writes a precise diff, or rewrites a whole file when that is cleaner. You approve it.
Run the suite
Runs your tests and reads the pass/fail count, so progress is measured, not guessed.
Close the loop
Feeds the failures back and tries again, until the tests pass or you stop it.
Where a weak model breaks, the harness holds.
A small model often reasons its way to the right fix and then loses it on the mechanics. OptiQ Code spends its engineering on exactly those failure modes, so the model you can actually run still lands the change.
git diff on every exit path. It never returns an empty patch.A valid patch, every time.
An initial version of OptiQ Code, driving a 4B local model, resolved 36% of a SWE-bench-Lite subset, a state-of-the-art result for a model that size, and produced a valid patch on every task. A comparable-budget baseline came up empty on 40%. That reliability is the point; a stronger local quant does the rest.
You stay in the loop.
A session banner that scrolls away, an open prompt, inline tool markers, and single-Enter approval before anything writes to your files. Or hand it the keys with auto mode.
Serve a model. Point Code at your repo.
Serve a model
--idle-timeout frees the RAM when you step away and reloads on the next turn.
$ optiq serve --model mlx-community/Qwen3.6-27B-OptiQ-4bit --idle-timeout 300
Launch in a repo
Zero config, it discovers the served model. Describe the change; approve edits with a single Enter, or run auto.
$ cd my-project && optiq codeOr run it headless
Auto-approve, run to completion, print the diff, exit non-zero if the goal was not met.
$ optiq code -p "Fix the failing test in parser.py" $ optiq code -c # resume the last session $ optiq code export -o s.jsonl
Run a coding agent that's yours.
No cloud, no API key, no per-token bill. Your model, your machine, your code.