What happened that made me realize AI agents needed a way to detect when they were stuck in a loop?
Dushyant Sharma: Runaway API loop cost is a widely known problem in the modern day, especially in the developer community. AI agents are built to have instructions and actions, but they sit in the same pipeline. Anything written in that pipeline can be argued with the request.
Metacognition means a system watching its own run and flagging it as thinly evaluated; that was the gap in front of me, not a missing feature but a missing governor.
So, I built one.
Since Gubernaut sits outside the model. It does not read the prompt. A sensor writes three numbers about the turn, and the governor reads only those; that’s what led to Gubernaut keel and Gubernaut Tiller.
A loop is not a bug in the model. It is a machine with no valve.

For someone who has never built an AI agent, how does Gubernaut recognize a loop and stop it before another paid call?
Dushyant Sharma: Gubernaut stops a repeating AI agent at the fourth call, so that call is never billed.
An AI agent is a program that calls a model, reads the answer, and calls again. Each call is a charge. When it gets stuck, it does not pause. It calls again.
Gubernaut sits on that path. Your code still believes it is talking to the model, but it is talking to Gubernaut Tiller, a local proxy. A proxy is a program that receives the call, watches it, and then passes it on, or does not. You put it there by changing one address: the base URL, which is the line that says where calls go.
No new app. No account. Tiller speaks the OpenAI API, so an existing client can point at it.
It does not read the words. A sensor writes three numbers.
- Intensity is how heated the turn is.
- Valence is how friendly it is.
- Repetition is how much it copies the last turn.
The governor reads only those numbers. On a copy-paste loop, the stop lands at turn 4. The first three calls still go out and still cost money. The fourth is never sent, so it cannot be billed.
Gubernaut Keel is the same decision inside the program. Keel decides; the calling code does the stopping. Tiller stops the call itself.

Your site shows substantial cost savings in tests where agents repeated the same request. What have you seen in real customer use, and where are the limits of those results?
Dushyant Sharma: Customer data regarding savings is not available to us, since it is open-source software and we don’t track consumer data.
The savings are from measured test runs, not from a named customer. On one runaway loop, the bill fell from $0.1669 to $0.0068, mathematically saving approximately 95% on that loop spend.
That run was GPT-5.6 Sol. Across seven measured configurations and four model families, Gubernaut cut 79.8 to 95.9 percent of a runaway loop’s token bill, because the next call was never sent. The governed arm paid 23 to 63 percent of the unguarded baseline.
The usual fix made it worse. A static calming prompt cost 117 to 192 percent of the unguarded bill. More words. Same loop. Asking nicely is how the invoice grows.
It saves money only when an agent is stuck repeating itself. An agent that never loops saves nothing. On the published test set, the repetition check caught 10 of 10 calm loops and recorded 0 of 30 false stops on ordinary traffic. A politely worded push can still slip past, not a copy-paste loop.

Who is using Gubernaut today, and what kinds of AI workflows are they protecting?
Dushyant Sharma: Gubernaut is free, open source under Apache-2.0, and runs on your own machine. It reports nothing home.
So, the only available stats are what’s in the public record as of today.
Paper – Live track ( 298 views, 58 downloads https://doi.org/10.5281/zenodo.21303518 )
Core – live count (41 downloads – https://crates.io/crates/gubernaut-core )
Gubernaut Tiller is the proxy. Gubernaut Keel is the library inside the program. A developer installs one of them and points an existing agent at it.
The workflow it is built for is any AI agent that calls a model in a loop. A tool that retries. A run that keeps going after it has stopped making progress. A support agent, a research agent, a coding agent, anything where the next call is another line on the invoice. It does not score the model. It watches the path and closes the valve when the calls start repeating.
The first check takes about thirty seconds, and it does not need an API key: https://github.com/thegubernaut/gubernaut/blob/main/docs/REPRODUCE.md

What is the hardest technical problem you’re tackling now, and where do you want to take Gubernaut next?
Dushyant Sharma: The hard problem is the reader, not the valve. A copy-paste loop is caught. A politely worded push often is not. That sharper reader is not in this release.
The governor does the right thing with the numbers it gets. Those numbers are still a basic reading of the turn. Today the valve closes on an API call. Next, it would close on an action the agent is about to take, still outside the model, still unable to be talked out of stopping. That step is drawn, not built. A loop that can look back at its own run is drawn, not built. The long direction is a physical machine, like a humanoid system, where the same idea would stop a motor instead of a request.
Links: Gubernaut website | Gubernaut on GitHub | Research paper on Zenodo | Gubernaut Core on crates.io












