SquidWings

Topic · Agent harness

Agent harness: making cheap models work correctly

The same model can fail or succeed depending on what surrounds it. A harness is the layer around the model that picks tools, checks every step, and fixes common mistakes before they turn into problems.

Updated 5 December 2026 · Source: the README on GitHub

01What a harness is

A language model only writes text. For it to work, a program has to offer tools, run the tools the model calls, send the results back, and decide when the job is done. That program is the harness, or agent harness.

A thin harness leaves all the discipline to the model. A thick harness moves that discipline into code: rules that always run, however smart the model is.

02Why cheap models need one

  • The tool call has the wrong format, or is written inside plain text.
  • Broken arguments: “5” for a number, “a, b” for a list, “1.250.000” for 1250000, a misspelt tool name.
  • Forgetting to check, then claiming success while the tests fail.
  • Repeating the same step over and over.
  • Doing sums or conversions in its head, and getting them wrong.

03What the SquidWings harness does

PartWhat it does
Model tiersModels are lite, standard or frontier. Cheap tiers are watched more closely and get fewer, shorter tools and guides
Tool pickerOnly relevant tools are offered, so the schemas stay cheap in tokens. More than 140 toolbox tools stay hidden until needed
Tool call readerTool calls written in the reply text are read in the formats of DeepSeek, Kimi, Mistral, Llama, Qwen, GLM and Gemma, and broken arguments are repaired
VerifierChecks files and tests before an answer is accepted
Loop breakerSpots repeated steps and stops them
RecoveryA catalogue of 600+ error cases: retried when safe, given a fix hint, or asked of the user when only they can solve it
Tier upIn Auto mode, the turn after a failed turn uses a stronger tier

04Your pick is never swapped behind your back

When you lock a model, the harness uses it as it is. When that model fails, the chat explains why (key refused, no credit, rate limit, context too long, timeout) and does not quietly move to another model. Moving up a tier only happens in Auto mode, and the reason shows in the chat.

05Tested, not promised

The harness is held by more than 3,000 offline tests, including a per-prompt routing accuracy check (python -m tests.routing_eval). Parts moved to Rust are checked until they answer exactly like the Python version. The code is open on GitHub.

06Common questions

What is an agent harness?

The program around a language model that offers tools, runs the tools the model calls, checks the results, and decides when the work is done. Without a harness, a model can only write text.

Does a harness make a cheap model as smart as an expensive one?

No. It covers the mistakes cheap models make most, such as tool call format, broken arguments, loops and skipped checks. Truly hard tasks still need a strong model, and Auto mode moves up a tier for them.

Which models does it work with?

Any OpenAI-compatible endpoint, including routers such as OpenRouter and local models in Ollama. Models without native tool calling can still use tools through their reply text.

Ready to try it? Follow the install guide. Read also: AI agents, cheap AI, Claude Code alternative, local AI.