◆ Huginn · "Thought"

The raven that thinks.

A self-hosted, model-agnostic coding agent & harness

Huginn takes a task, plans it, edits the files, runs the code, reads the failures, and loops until a real test passes — the harness doing the heavy lifting, not just the model. Built in Rust, it runs against any OpenAI-compatible endpoint, including a quantized open model on a single home GPU box.

68.2%
SWE-bench Verified resolved (341/500), scored with the official harness.
~$0
per instance — a local, quantized open model, no frontier API.
tied
statistical dead heat with the SWE-bench team's own reference harness on the same model.
What it does

A loop that closes itself

Most of the capability lives in the harness — the scaffolding around the model that turns "write some code" into "make the test pass."

Anchored edits

The model never retypes a file. Edits are anchored to surrounding lines, so changes land precisely even in large files — fewer broken diffs, less wasted context.

Verify loop

It runs the code. Build, test, and run output feed straight back into the next step, so the agent reacts to what actually happened instead of guessing.

Repro-test-first

For a bug fix, it re-runs the bug's own reported test before it's allowed to call the job done. No "looks fixed" — the failing case has to actually pass.

Static-analysis gate

After self-review, the language's real linter runs over the touched files and its findings flow through the same block-and-auto-fix gate — deterministic ground truth the model can miss.

Repo map & code intelligence

A tree-sitter map of the repository plus language-server smarts (diagnostics, go-to, references, rename) so the agent navigates code the way a developer does.

Plans with checkpoints

Big tasks are split into phases, each committed to git as it lands — visible progress and a clean trail you can read, review, or roll back.

Learns skills & failures

Clean jobs are distilled into reusable "skills"; failed ones are tagged by cause. Each new task surfaces what worked before and avoids the traps that didn't.

Model-agnostic & resilient

Any OpenAI-compatible endpoint. Load can round-robin across interchangeable hosts, with automatic fail-over to a backup brain if one goes down.

Architecture

Four loops, stacked

Each loop wraps the one beneath it — from a single edit all the way up to the harness improving its own method.

  1. The agent core. Native tool-calling: read, edit, run, search — the moment-to-moment work of changing code.
  2. The verify loop. Run the code, read the result, and a self-review critic that auto-fixes its own blocking findings before moving on.
  3. The worker. A headless service that takes coding jobs off a queue, streams progress, and runs an independent reviewer that re-verifies before "done" stands.
  4. Self-improvement. Every finished job is logged to a scorecard; the harness mines its own failures and proposes concrete changes to its own settings — kept only when a real benchmark score says they helped.
The proof

Measured against the field's own benchmark

To isolate the harness from the model, the SWE-bench team's reference harness was run on the same open model, the same 500 verified problems, graded by the same official scorer.

Harness · same model, n=500Resolved
Huginn (this project)341 / 500 · 68.2%
mini-SWE-agent (reference)351 / 500 · 70.2%
Paired McNemar testχ²=1.09 — statistically tied
Union of the two (complementary)383 / 500 · 76.6%

A solo-built agent landing in a dead heat with the field's reference harness — on that team's own benchmark, run on a quantized open model from a home GPU box — is the headline. And the two are complementary: they solve different problems, so together they clear 76.6%. On harness levers alone the same model still climbs measurably — evidence the scaffolding is doing real work.

How you use it

Four ways in

TUI — a terminal cockpit with live streaming, plan panel, inline diffs, and a resource bar One-shot — fire a single task from the command line REPL — an interactive session Worker — headless, taking jobs off a queue