Skip to main content

agentgov-gateway

The local FastAPI gateway that Claude Code (via ANTHROPIC_BASE_URL=http://localhost:8000) talks to.

Runs on each developer's machine. Vaults the upstream credential (X25519 sealed-box decrypted from the signed policy snapshot). Enforces repo-lock + work-item binding + budget middleware chain. Streams SSE verbatim to Claude Code while tee-parsing usage frames for attribution.

Part of the AgentGov project — see github.com/deepakahu/agentGov for the full monorepo (control tower, CLI, client assets, Supabase migrations, docs).

Install

pip install agentgov-gateway

Configure

Requires these env vars — see the project .env.example for the full list:

  • CONTROL_TOWER_URL — where your AgentGov control tower is deployed
  • GATEWAY_SERVICE_TOKEN — a gtw_... token from agentgov register-device
  • POLICY_SIGNING_PUBLIC_KEY_B64 — Ed25519 public key (control tower gives you this)
  • DEVICE_KEY_PATH — path to your X25519 device private key (default: ./.runtime/device_key.priv)
  • UPSTREAM_MODEoauth_passthrough (default, personal) or apikey_vault

Run

uvicorn agentgov_gateway.main:app --host 127.0.0.1 --port 8000

Under systemd / launchd for persistent operation.

License

Apache-2.0

Download files

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

Source Distribution

agentgov_gateway-0.1.1.tar.gz (137.2 kB view details)

Uploaded Source

Built Distribution

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

agentgov_gateway-0.1.1-py3-none-any.whl (44.9 kB view details)

Uploaded Python 3

File details

Details for the file agentgov_gateway-0.1.1.tar.gz.

File metadata

  • Download URL: agentgov_gateway-0.1.1.tar.gz
  • Upload date:
  • Size: 137.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for agentgov_gateway-0.1.1.tar.gz
Algorithm Hash digest
SHA256 79ae60c26bb3dbd01a20363b14067b44908b4b713269ae685afc75967ad6a7b4
MD5 140a1e1b65f45820496b138eb72e9052
BLAKE2b-256 ea3011f9da95d7c9bf1760b7fa7caa6c4d79247b76b744ce05771e34be6b8ef2

See more details on using hashes here.

File details

Details for the file agentgov_gateway-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentgov_gateway-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c558ece1038a3eb2306340fa0bc998575294fe60498f35c92779ec21c7d51deb
MD5 555f65ff4a17c928d1261cf6f8f0fe80
BLAKE2b-256 791376b1e73fe78befb775ca708c37415252e906c70bf16bf5e3b68c65088157

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 Sentry Error logging StatusPage Status page