Web3 and Node.

An ElizaOS plugin for autonomous on-chain agents, where a retry loop does not just cost tokens. It costs gas, every lap, until the wallet is empty.

Install from npm

@gubernaut/plugin-gcc
npm install @gubernaut/plugin-gcc@1.0.0

Adoption

add the plugin
import { gccPlugin } from "@gubernaut/plugin-gcc";

plugins: [gccPlugin],

The npm package is an ElizaOS plugin. Adoption is adding it to your character, not setting a base URL.

Free and Apache-2.0, version 1.0.0, running entirely on your machine. View on npm

01 · Quickstart

How do I use it once it is installed?

Point your existing client at the local proxy and change nothing else. Every turn then passes the controller, which reads intensity, valence, repetition and holds a posture. A saturating loop is hard-stopped at turn 4.

character.ts
import { gccPlugin } from "@gubernaut/plugin-gcc";

export const character = {
  name: "treasury-agent",
  plugins: [gccPlugin],
};

// a hard stop arrives as a governed refusal, not a thrown error,
// so the host process stays up and the next benign call succeeds.
//
// or skip the plugin entirely and set the env var:
//   OPENAI_BASE_URL=http://localhost:8000/v1

02 · Notes

Web3 (npm) specifics

Why does this matter more for an on-chain agent?

Because a looping agent that submits transactions burns gas on every lap, and a reverted transaction still costs. On a local ephemeral EVM devnet the plugin severed a runaway retry loop at turn 4: the governed arm sent 3 reverting transactions where the ungoverned arm sent 8, and the governed wallet retained strictly more balance. Across 24 agents the governed arm preserved 94% of the treasury against 20%. That substrate is a local ephemeral EVM devnet (ganache, chain id 31337). Not a public testnet and not a mainnet. Every transaction in both arms reverted, because the contract fails on every call: the governor did not make failing calls succeed, it stopped paying to retry them.

What happens to the host process on a hard stop?

The host process survives a hard stop. The stop is delivered as a governed refusal through the normal response path, so the agent handles it as a reply rather than an exception. In clean-room testing against the real published ElizaOS core the host exited zero and a fresh benign call afterwards succeeded normally.

Does it fail closed if the proxy dies?

Yes. The plugin carries a fetch timeout and a transport catch, and it does not fall back to calling the upstream directly when the proxy is unreachable. A canary upstream recorded zero hits across every dead-proxy case tested.

03 · Why bother

What does the governor actually save?

On a saturating loop the governed arm cut upstream spend by up to 96%: the best measured case was gpt-5.6-sol at $0.1669 ungoverned to $0.0068 governed, a 95.9% reduction. Across seven model families the reduction ranged 79.8% to 95.9%. Both arms made the same number of attempts, so the delta is the measurement.

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

04 · Other runtimes

Other languages

The same controller ships for three runtimes. They share the deciding core, so a posture decision is identical whichever one you run.

Last reviewed 2026-08-02 · paper arXiv 2607.24339, DOI 10.5281/zenodo.21303518