🧠AI / Deep LearningYear: 2026Complete

Negan Agent

An AI coding agent that judges its own work — written in Rust, and it runs offline

Negan Agent cover
RustRatatuiWebSocketlocal model backendsTOML skill memory

Most AI coding tools are a prompt and an API key. This one is a small system that checks itself.

What it is

An agent that takes a goal, breaks it into steps, and then — before moving to the next step — looks at what it just produced and asks whether it was any good.

That sounds like a small idea. In practice it changes the behaviour of the whole thing: because every step is reviewed, a step that quietly did nothing gets caught at that step instead of three steps later, and because the critique is recorded, the next attempt at the same kind of task starts from what was learned.

The other thing: it runs against local models. No API key, no account, no network. It talks to whatever model is running on the machine.

What it does

  • Plans a goal into executable steps.
  • Reviews each step’s output before continuing — this is the part that matters.
  • Scores code on a scale, so “better” means something specific rather than feeling better.
  • Criticises itself and records what went wrong.
  • Remembers skills as small TOML files, so the same lesson is not learned twice.
  • Keeps its own context clean, because a long-running agent that re-reads everything every step stops making progress.
  • Replays past sessions so a run can be re-executed and compared.
  • Blocks dangerous commands and restricts which files it can touch.
  • A terminal interface and a browser interface over a WebSocket API.

The numbers

~2,800 lines of Rust
30+ modules
0 API keys required

Why it’s worth a look

The reason to build this is not to have an agent. It is to find out whether the “check your own work” loop actually produces better output, or whether a model just agrees with itself convincingly.

The honest answer is: it helps for the mechanical checks and not for the judgement calls. Telling a model to verify that a function does not accidentally mutate its input is useful. Asking it whether an architecture is good produces confident agreement, which is worth very little. Designing a system around that distinction — measuring quality on a scale, keeping the memory focused on things that repeat — is more of the value here than the framework itself.

Current state

  • Quality scores are self-assigned, which is the fundamental weakness of anything in this category, mine included.
  • It is small. Thirty modules, not a platform.
  • Runs entirely on whatever local model you point it at, so output quality is bounded by that model.

More projects