How to install

Install Gubernaut

Apache-2.0, free and self-hosted. Start the proxy, change one line of client configuration, and the calls are governed.

The proxy installs with pip and is language-neutral: any client speaking the OpenAI wire format can point at it. npm is a registry, not a pattern: @gubernaut/core is the in-process controller, and @gubernaut/plugin-gcc is a proxy client.

Gubernaut Tiller: start here

pip install gubernaut-sdk
gubernaut-proxy --upstream https://api.openai.com
client = OpenAI(base_url="http://localhost:8000/v1")
x-gcc-posture: DEFAULT

A governed reply carries the controller's state in its headers: x-gcc-posture reads DEFAULT on a healthy turn, and REGROUND once a loop has been severed.

One controller

It reads three numbers and none of the text. That is why it cannot be talked out of stopping.

Between the agent and the model, one layer that decides

Its controller reads three numbers, intensity, valence, repetition, and every request leaves in one of three postures.

  1. The agent sends a request
  2. Gubernautintensity · valence · repetition
  3. The model, or a local stop
  • DEFAULTBenign traffic passes through untouched.
  • INHIBITEscalation gets an inhibitory instruction and a temperature clamp.
  • REGROUNDA saturating loop is broken, and a persistent one is hard-stopped locally. The hard-stopped turn never reaches the upstream.

Source: HARDTEST v1.0 release gates, 2026-07-24.

Gubernaut

The controller sees intensity, valence, repetition and nothing else. The controller's zero-token boundary is architectural and not yet adversarially tested. No jailbreak success-rate figure exists, because none was measured.

Two ways to run it

The same deciding core, in front of the call or inside the program.

Three commands. Two shapes.

Gubernaut Tiller

A separate process the client points at with one line. It stops the call itself.

Gubernaut Keel

A function call inside the program. It decides, and the calling code enforces.

Both carry the same controller, so a posture decision is identical either way. The ElizaOS plugin on npm is a client of Tiller, and it does nothing without the proxy running.

Identical across runs because the controller is input-deterministic. The compiled Rust core reproduces the Python controller bit-exactly. Determinism is a property of the controller, the layer that decides; the model it watches stays stochastic. The spend receipts were measured through the proxy, so they are Gubernaut Tiller's evidence, not Gubernaut Keel's.

Gubernaut Tiller, the proxy

Tiller is a local proxy that speaks the OpenAI API, and the agent's calls go through it. On a verbatim loop the hard stop lands at turn 4: the turns before it are sent and billed, and the stopped call never leaves the machine.

pip install gubernaut-sdk

Gubernaut Keel, the library

Keel is a library that runs inside the program. Same input, same decision, every run, so it can be tested and signed off, at the edge and on a server alike.

npm install @gubernaut/core

Three places to get it

How do I install Gubernaut?

Gubernaut installs from the standard registry for each language: pip for the Gubernaut Tiller proxy, npm or cargo for the Gubernaut Keel controller. Each is one command, and each is Apache-2.0 and runs entirely on the machine it is installed on.

Which models were tested, and what did each save?

Gubernaut's verbatim-loop battery covers seven measured configurations across four model families, and the reduction in upstream spend ranged 79.8% to 95.9%, with the largest on GPT-5.6 Sol and the smallest on Claude Haiku 4.5. Both arms make the same number of attempts, so the spend delta is the whole measurement.

The bill stops when the governor stops the loop

The same runaway loop, run twice: once with nothing governing it, once through Gubernaut.

Governed

$0.0068

Ungoverned

$0.1669

GPT-5.6 Sol, verbatim-loop battery, per 25-attempt loop. Both arms make identical attempt counts, so the spend delta is the whole measurement.

Over seven measured configurations across four model families: up to 95.9% saved, from a 79.8% floor.

Source: Pre-registered receipts benchmark, 2026-07-19. Scored output of harness/report.py.

Gubernaut

The bill, before and after, on seven measured configurations

All seven measured configurations on the verbatim-loop battery, with what each run cost before and after. Seven measured configurations across four model families.

  1. GPT-5.6 Sol OpenAI

    Ungoverned$0.1669Governed$0.0068

    Still paid4.1%Saved95.9%ceiling

    Basistoken-math

    GPT-5.6 Sol on OpenAI: $0.1669 ungoverned, $0.0068 governed,4.1% still paid, 95.9% saved. Basis token-math. The ceiling.
  2. Claude Fable 5 Anthropic

    Ungoverned$0.3861Governed$0.0203

    Still paid5.2%Saved94.8%

    Basistoken-math

    Claude Fable 5 on Anthropic: $0.3861 ungoverned, $0.0203 governed,5.2% still paid, 94.8% saved. Basis token-math.
  3. Gemma 4 26B Gemini (native)

    Ungoverned57,297 tokGoverned4,236 tok

    Still paid7.4%Saved92.6%

    Basistoken-delta (free tier)

    Gemma 4 26B on Gemini (native): 57,297 tok ungoverned, 4,236 tok governed,7.4% still paid, 92.6% saved. Basis token-delta (free tier). A token delta, not dollars.
  4. Llama 4 Scout OpenRouter

    Ungoverned$0.1075Governed$0.0094

    Still paid8.8%Saved91.2%

    Basisupstream-metered

    Llama 4 Scout on OpenRouter: $0.1075 ungoverned, $0.0094 governed,8.8% still paid, 91.2% saved. Basis upstream-metered.
  5. Gemma 4 26B OpenRouter

    Ungoverned$0.0214Governed$0.0034

    Still paid15.9%Saved84.1%

    Basisupstream-metered

    Gemma 4 26B on OpenRouter: $0.0214 ungoverned, $0.0034 governed,15.9% still paid, 84.1% saved. Basis upstream-metered.
  6. GPT-5.6 Luna OpenAI

    Ungoverned$0.0921Governed$0.0155

    Still paid16.8%Saved83.2%

    Basistoken-math

    GPT-5.6 Luna on OpenAI: $0.0921 ungoverned, $0.0155 governed,16.8% still paid, 83.2% saved. Basis token-math.
  7. Claude Haiku 4.5 OpenRouter

    Ungoverned$0.8211Governed$0.1660

    Still paid20.2%Saved79.8%floor

    Basisupstream-metered

    Claude Haiku 4.5 on OpenRouter: $0.8211 ungoverned, $0.1660 governed,20.2% still paid, 79.8% saved. Basis upstream-metered. The floor.

* Tokens, not dollars. Gemini-native Gemma is free-tier only, so those rows are token deltas and carry no dollar claim.

OpenRouter rows are the upstream's own metered usage.cost, not price-table token math.

Source: Pre-registered receipts benchmark, 2026-07-19. Scored output of harness/report.py.

Gubernaut

Across the battery the saving ran 79.8% to 95.9%, the floor on Claude Haiku 4.5 and the ceiling on GPT-5.6 Sol.

Injection resistance is claimed for the controller only, the token-free meta level. The arbiter reads raw text by necessity, and its posture compliance is a measured property rather than an architectural property. The controller's zero-token boundary is architectural and not yet adversarially tested. No jailbreak success-rate figure exists, because none was measured. Measured through the proxy, Gubernaut Tiller; with Gubernaut Keel the calling code carries out the stop.

What does Gubernaut cost?

Nothing. Gubernaut is released under Apache-2.0 and runs entirely on the infrastructure it is installed on. There is no paid tier, no usage metering and no account to create.

Is commercial support available?

Not at present. Gubernaut Lab offers no hosted service, paid support contract, or enterprise tier. Questions are answered in public.

Can I use it in a commercial product?

Yes. Apache-2.0 permits commercial and proprietary use, modification and redistribution, and carries an express patent grant from contributors. The paper and the validation data are separately CC-BY-4.0. This is a plain description of two well-known licences, not legal advice.

The same measure, under injection defiance

The bill, before and after, under injection defiance

The injection-defiance battery, with what each run cost before and after.

  1. Llama 4 Scout OpenRouter

    Ungoverned$0.0831Governed$0.0098

    Still paid11.8%Saved88.2%

    Basisupstream-metered

    Llama 4 Scout on OpenRouter: $0.0831 ungoverned, $0.0098 governed,11.8% still paid, 88.2% saved. Basis upstream-metered.
  2. Gemma 4 26B OpenRouter

    Ungoverned$0.0317Governed$0.0044

    Still paid13.8%Saved86.2%

    Basisupstream-metered

    Gemma 4 26B on OpenRouter: $0.0317 ungoverned, $0.0044 governed,13.8% still paid, 86.2% saved. Basis upstream-metered.
  3. GPT-5.6 Luna OpenAI

    Ungoverned$0.1124Governed$0.0160

    Still paid14.2%Saved85.8%

    Basistoken-math

    GPT-5.6 Luna on OpenAI: $0.1124 ungoverned, $0.0160 governed,14.2% still paid, 85.8% saved. Basis token-math.
  4. Gemma 4 26B Gemini (native)

    Ungoverned65,074 tokGoverned10,813 tok

    Still paid16.6%Saved83.4%

    Basistoken-delta (free tier)

    Gemma 4 26B on Gemini (native): 65,074 tok ungoverned, 10,813 tok governed,16.6% still paid, 83.4% saved. Basis token-delta (free tier). A token delta, not dollars.
  5. Claude Haiku 4.5 OpenRouter

    Ungoverned$0.7583Governed$0.1655

    Still paid21.8%Saved78.2%

    Basisupstream-metered

    Claude Haiku 4.5 on OpenRouter: $0.7583 ungoverned, $0.1655 governed,21.8% still paid, 78.2% saved. Basis upstream-metered.

* Tokens, not dollars. Gemini-native Gemma is free-tier only, so those rows are token deltas and carry no dollar claim.

OpenRouter rows are the upstream's own metered usage.cost, not price-table token math.

Source: Pre-registered receipts benchmark, 2026-07-19. Scored output of harness/report.py.

Gubernaut

Every row on this battery is the upstream's own metered usage or a free-tier token delta, as its basis says.

Both batteries as a chart

What are the caveats on these numbers?

Gubernaut's spend figures carry four caveats, and they travel with the figures wherever the figures go.

  • OpenRouter rows are the upstream's own metered usage.cost, not price-table token math.

  • OpenRouter's meter matched price-table token math for Haiku (0.0%) and Gemma (12.6%) but flagged a 24% divergence on Llama 4 Scout (provider routing), so Scout's dollars are the upstream meter. The ratio is unaffected.

  • Gemini-native Gemma is free-tier only, so those rows are token deltas and carry no dollar claim.

  • Every figure is a scoring-script output.

Source: Pre-registered receipts benchmark, 2026-07-19. Scored output of harness/report.py.

How do I verify these numbers myself?

Run them. The Gubernaut record reproduces in four levels, and the first three need no API key and cost nothing. 30 seconds gets the controller's own test suite, 2 minutes gets the hard stop at turn 4 end to end against a mock upstream, and the last level is the spend table, which costs real money because it is a real bill.

Level 1, the controller: 30 seconds, no keys, no spend

The controller behaves as documented, including the type boundary that makes it token-free.

git clone https://github.com/thegubernaut/gubernaut.git
cd gubernaut/packages/python
pip install -e ".[dev]"
python -m pytest tests -q

All green. The state machine, the fail-closed behaviour and the request path each have their own suite.

Level 2, cross-language parity: 1 minute, no keys, no spend

The Rust core reproduces the Python reference bit-exactly, which is what makes the wasm and edge builds trustworthy.

cd packages/rust
cargo test

73 value-exact golden steps and 8 boundary rejections, all passing.

Level 3, the hard stop: 2 minutes, no keys, no spend

The headline behaviour end to end, against a mock upstream, so it costs nothing.

# 1. mock upstream
python ../../examples/mock_upstream.py

# 2. the governed proxy, pointed at the mock
python -m gcc_proxy --upstream http://127.0.0.1:18081

# 3. the loop
python ../../examples/openai_sdk_demo.py

Turns 1 and 2 pass through on DEFAULT. Turn 3 is the first posture change. Turn 4 is the hard stop: no upstream call, usage all zeros.

Level 4, the receipts: real money, your key, your bill

The spend table. Both arms run the same battery and make the same number of attempts, so the spend delta is the entire measurement.

cd packages/python
export OPENAI_API_KEY=...        # your key, your bill
python -m gcc_proxy --upstream https://api.openai.com

Governed spend between 4.1% and 20.2% of ungoverned across the seven measured configurations, on the verbatim-loop battery. Absolute dollars will differ: the ratio is the claim, not the dollar amount.

You can re-run this and get the same numbers. Not similar numbers, the same ones.

Can I put a hard gate in front of my existing LLM stack?

Yes, if the stack speaks the OpenAI chat-completions API. Gubernaut was installed from its published artifacts into 5/5 agent frameworks, and each adopted it in one configuration line, hard-stopped a runaway loop, and failed closed when the proxy was killed. The controller is model-agnostic by construction: it reads numbers, not output format, so a family it has never seen behaves the same way.

  • openai.base_url
  • ChatOpenAI(base_url=…)
  • OpenAI(api_base=…)
  • config_list base_url
  • OPENAI_BASE_URL

What happens if the proxy dies?

Gubernaut fails closed. Neither SDK falls back to calling the real upstream when the proxy is unreachable, verified against a canary upstream that recorded zero hits on every dead-proxy case. A malformed body fails closed rather than passing through, and a typo in a boolean setting aborts startup instead of silently disabling the spend veto.

What does Gubernaut not do?

Gubernaut governs loop dynamics and the spend they cause, at the meta level, per turn. A deployment that needs any of the following needs something else alongside it.

  • not a content filter. It does not read, classify or block what the model says.

  • not a rate limiter. It severs on the controller's meta-state, not on a request count or a time window.

  • not a jailbreak defense. It reduces what an attack costs; it does not decide whether one succeeds.

  • not an evaluation harness. It governs a live request path and does not score models.

  • not a hosted service. It runs on your machine, in your request path, under Apache-2.0.

Longer answers live in the guides, shorter ones on the questions hub, every term is defined once on the glossary, and what shipped in each version is on the releases page.