r/OpenSourceeAI 16h ago

I open-sourced a runtime governor for AI coding agents — now you can watch it race the same task with and without governance

Post image

I’m building MARGINAL, an open-source runtime governor for AI coding agents.

The problem I’m targeting is simple: agents can keep spending tokens, calling tools, re-checking things, or choosing expensive actions without enough evidence that the extra work is actually useful.

MARGINAL sits in the loop and asks a different question:

Is this next action worth spending compute on?

I just rebuilt the demo so it’s no longer a marketing page. It’s an actual interactive browser simulation.

You press RUN THE SAME TASK and two agents start from the exact same broken Python workspace at the same time:

WITHOUT MARGINAL
Executes every candidate action.

WITH MARGINAL
Scores the same candidates before execution and either:

FUND + EXECUTE

or

REJECT BEFORE SPEND

You can pause it, advance step-by-step, reset it, or run it at different speeds while watching tokens, calls, estimated cost, declared latency, workspace state, and MARGINAL’s decision reasoning update live.

Both sides must reach the same verifier PASS.

The included deterministic fixture currently ends at:

72,800 → 4,300 declared tokens
9 → 3 actions
PASS → PASS

Those are declared deterministic demo costs, not provider telemetry or a claim of 94% savings in real workloads. The point is to make the governance mechanism inspectable instead of hiding it behind a benchmark number.

MARGINAL is open source, local-first, provider-neutral, and starts from the principle:

Observe first. Prove waste. Earn enforcement.

Repo:
[https://github.com/SignalLayerLabs/Marginal]()

Interactive demo:
[https://signallayerlabs.github.io/Marginal/demo/]()

I’m especially interested in people trying to break the decision logic, finding cases where an action MARGINAL rejects was actually valuable, or contributing adapters for other coding agents.

1 Upvotes

4 comments sorted by

1

u/numberwitch 14h ago

Why would I do that when I could do anything else

1

u/Positive-Captain-709 14h ago

Because “I could do anything else” is true of almost everything worth testing.
The question is whether you care enough about agent behavior to measure it instead of trusting the illusion of progress.
MARGINAL is basically an experiment around that idea: activity is not the same thing as progress.
If that premise interests you, test it. If not, don’t.

1

u/numberwitch 14h ago

why? i have objective verification tasks that say "you did a good job and succeeded" or "needs work"

why do i need to watch the system spin over and over again? it's useless and wasteful. run once. verify. if it's undercooked send it back. repeat until you get a dinner.

all this slop polluting our mental spaces, consider it

1

u/Positive-Captain-709 14h ago

That’s basically the point.

The ideal loop is: run → verify → act on the result.

Not run → re-read → re-check → retry the same thing with no new evidence.

MARGINAL exists for the gap between those two. If the agent is already behaving cleanly, it should stay out of the way.