Node and on-chain agents.

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

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.1, running entirely on your machine. View on npm Read the source

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

Node / on-chain 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%, measured from receipts/onchain/devnet_treasury.json. 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.

Can I govern a Node agent that is not built on ElizaOS?

@gubernaut/core is the controller itself, compiled to WebAssembly and bound for JavaScript, installed with npm install @gubernaut/core. It runs in-process with no proxy hop and no dependencies, so it works in a serverless function, an edge worker or a browser, where a local proxy process cannot run. It decides, it does not intercept. Acting on a REGROUND posture is the caller's job, which is the one thing the proxy does that this does not. An agent that wants the interception as well as the decision uses the proxy or this ElizaOS plugin.

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 95.9%. That ceiling is one measured run: gpt-5.6-sol at $0.1669 ungoverned, down to $0.0068 governed. Over seven measured configurations across four 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-07 · paper arXiv 2607.24339, DOI 10.5281/zenodo.21303518