Skip to main content

GAX — Governed Agent eXecution

Your MCP gateway can't see bash. GAX governs both.

GAX is a governed execution layer for agent shell commands. Agents get a command-line-shaped surface; OAuth, policy, audit, and tenancy live in a sidecar the model never sees.

The guarantee: an agent can only run commands you registered, every invoke is checked against a capability token before any backend runs, and every invoke produces an audit_id.

It complements MCP rather than competing with it — MCP servers become adapters behind stable command names, so one policy file and one audit trail cover both your MCP calls and your shell calls.

Full docs, research, and evaluation: https://github.com/0sparsh2/GAX


Install

pip install gax-cli
gax init --profile k8s --profile github

That creates ~/.gax, mints a 30-day read-only capability, starts the sidecar, and registers 22 real commands. Measured on a clean machine: about a second.

gax k8s.pod.logs --pod web-1     # works immediately, no exports needed
gax doctor                       # diagnose config, capability, sidecar, backends

See it stop something dangerous

export GAX_K8S_MOCK=1            # no cluster needed
gax k8s.namespace.delete --namespace prod
{
  "ok": false,
  "error": {
    "kind": "policy_denied",
    "message": "side_effects 'destructive' exceeds capability ceiling 'read'"
  },
  "audit_id": "aud_cef808f0fadd41e7"
}

Refused before kubectl was ever spawned, and the denial is audited with its arguments.

Even if the command sits on the token's allowlist it is still refused, because the danger ceiling is a separate control — two independent things must be wrong before something gets deleted.

To run it, raise the ceiling deliberately, with --dry-run available first:

export GAX_CAP="$(gax auth cap-mint --command k8s.namespace.delete \
  --scope k8s:namespaces:write --max-side-effect destructive --raw)"

gax k8s.namespace.delete --namespace staging --dry-run

Use it from any MCP client

claude mcp add gax -- gax-mcp

Publishes exactly three tools — gax_search, gax_doc, gax_invoke — keeping the registry behind them, so schema cost stays constant no matter how many commands you register.

Add your own command

One YAML file in ~/.gax/manifests/:

command: db.migration.run
version: "1.0.0"
description: Apply pending migrations
adapter: exec
required_scopes: [db:schema:write]
side_effects: destructive     # sets the ceiling required to invoke it
input_schema:
  type: object
  properties:
    env:     { type: string, description: Target environment }
    dry_run: { type: boolean, description: Validate without applying }
  required: [env]

CLI flags are generated from the schema. Omit side_effects and GAX fails closed — undeclared commands are treated as destructive.

Generate manifests instead of writing them: gax openapi generate spec.json.

Commands

gax init / gax doctor Setup and diagnostics
gax profile list / add Bundled command sets (k8s, github)
gax search / doc / schema Lazy discovery
gax <command> Invoke a registered command
gax auth cap-mint Mint a capability (--max-side-effect read|write|destructive)
gax auth login OAuth 2.0 device flow
gax plan run <file> Multi-step / parallel workflows
gax vault put / get Tenant secrets (file or HashiCorp)
gax compliance export SOC2-aligned audit export
gaxd start / stop / status Sidecar lifecycle
gax-mcp Run GAX as an MCP server (stdio)

Audit log: ~/.gax/audit.jsonl, one JSON object per invocation, including denials.

Honest scope

  • Raw CLI costs ~3.5× fewer tokens than GAX on like-for-like tasks. Governance is not free, and we publish that number rather than a flattering one.
  • Vault, SPIFFE, and OPA integrations are hooks and stubs, not production features.
  • The evaluation is a self-assessment by the author; methodology and known defects are documented in the repository.

MIT licensed. Issues and contributions: https://github.com/0sparsh2/GAX

Release files for gax-cli 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gax-cli 0.4.0
File Size Uploaded
gax_cli-0.4.0.tar.gz 66.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gax-cli 0.4.0
File Interpreter ABI Platform
gax_cli-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size:134.6 kB

Release files / gax_cli-0.4.0.tar.gz

Download URL gax_cli-0.4.0.tar.gz
Size 66.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8a043849118d2f82a5bd4263f1c5c5985248813a44324da6e8abc3728dbf57fe
BLAKE2b-256 checksum
How to use checksums
959b1b918b41b4c71dbc13f7f8c3540d4de0d9f90715ddabaf6788932ee55cee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Release files / gax_cli-0.4.0-py3-none-any.whl

Download URL gax_cli-0.4.0-py3-none-any.whl
Size 68.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e98ccd9d11a4f0b0d6c467329786e1bf317377892bf67463aaebea8477dbcd7
BLAKE2b-256 checksum
How to use checksums
b5f3064e66b018342ad4b8386eac6947a970453a393ef6aa892b96f5591f9c2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page