Skip to main content

Gubernaut SDK — deterministic runtime governor for LLM agents: drop-in local proxy (gcc_proxy) plus a one-call SDK facade (gubernaut_sdk) with framework config helpers.

Project description

gubernaut-sdk — Gubernaut Cognitive Controller, local drop-in proxy

Deterministic runtime governor for LLM agents, packaged as an OpenAI-compatible local proxy. Adoption is one line:

openai.base_url = "http://localhost:8000/v1"

Install

pip install gubernaut-sdk
pip install -e .[dev]            # or: editable, for development

One distribution, two import packages: gcc_proxy (the proxy engine + CLI) and gubernaut_sdk (the one-call facade). Programmatic start is one import, one call:

from gubernaut_sdk import launch_proxy, langchain_kwargs

proxy = launch_proxy(upstream="https://api.openai.com")   # ephemeral port
llm = ChatOpenAI(**langchain_kwargs("gpt-4o-mini", base_url=proxy.base_url))
...
proxy.stop()

Run (CLI)

gcc-proxy --upstream https://api.openai.com        # or any OpenAI-compatible base
gubernaut-proxy --upstream ...                     # same entry point, alias

Every /v1/chat/completions request is governed on the way through:

  • IGL (telemetry v0) appraises each user turn locally into {intensity, valence, repetition} — raw text stops there.
  • HRL — a deterministic, token-free state machine over {equilibrium, arousal, perseveration} — commands a posture: DEFAULT / INHIBIT / REGROUND, plus a temperature ceiling.
  • Actuation applies the posture to the outbound request; saturated recursive loops are hard-stopped before the upstream call (deterministic fallback, zero upstream spend). Disable with --no-hard-stop.

State is re-derived per request by replaying the visible history — the proxy is stateless, deterministic, and fully replayable. Governed state is exposed in X-GCC-* response headers and at POST /gcc/state. Credentials are never stored: the client's Authorization header is forwarded verbatim.

Constants in gcc_proxy/config.py are working defaults for this reference implementation (env-overridable, GCC_*); they are not the evaluated configuration from the validation record.

Verify

python -m pytest tests -q             # 30 tests, incl. loop-trap REGROUND ≤ 4 turns
python ..\bench\latency_bench.py      # latency budgets, results as JSON

No consciousness claims: a measured, falsifiable regulation layer. Byline: Gubernaut Research.

Citation & license

Licensed under Apache-2.0 (see LICENSE). If you use Gubernaut, please cite the concept (all-versions) DOI:

Gubernaut Research. Gubernaut Cognitive Controller (GCC). Zenodo. https://doi.org/10.5281/zenodo.21303518

Byline: Gubernaut Research.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gubernaut_sdk-1.0.0.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gubernaut_sdk-1.0.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file gubernaut_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: gubernaut_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.5

File hashes

Hashes for gubernaut_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6f583365caf81e99901dccf8a7eef8037f8f5b3402c1248034089f9af460b6d0
MD5 d827b3a4516e4b27f30d516989d3bd2f
BLAKE2b-256 50f7926f606fe8913d0e479bf43cc9840c51d1e9aba4c970b1d81bb81308f1bf

See more details on using hashes here.

File details

Details for the file gubernaut_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: gubernaut_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.5

File hashes

Hashes for gubernaut_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c923a4a431867f6dcb419df947443b01154f4736127fbdd46285582f3b699286
MD5 40bab42f38c4e80651c63ecde0e2a2b2
BLAKE2b-256 ecf37474f6ba3d8174161127aed63f5086abb4aa70aa9b1fc4a5cc4cfa188658

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page