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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

agentgov_gateway-0.1.2-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for agentgov_gateway-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4f6e1f38193ad78495b76b8e14ae2d42547bc060c75d549be2e47a450b086db
MD5 29b33531107e60f748160e2b41c15c5b
BLAKE2b-256 f66d07cd52d46dcc1c80dde4d33fca781bc436e043dfd65ad4bae235e65fffe4

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