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.0.tar.gz (136.9 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.0-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentgov_gateway-0.1.0.tar.gz
  • Upload date:
  • Size: 136.9 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.0.tar.gz
Algorithm Hash digest
SHA256 bf5783917e645cae7aef6c73f3d16454e7e89831333cd17dbe7aa30f67f3b73a
MD5 698b6af5bdfe68a7775e64572d1440b2
BLAKE2b-256 444d7549b535a1665f2d1647aa81aa12c6a898a1b7bf5cf1b74ac5d942f60306

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agentgov_gateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 531f6a7346e1bb883a1e5494062921edab47e055963bf986dae565e4898e63a5
MD5 37b0115daa714cc50e00170652dedd08
BLAKE2b-256 a5cb942f11f4c3aaafcaba672cf4ef4fb833ecccf4fead6b3d9652aa7237ea8b

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