Governance for AI agents, in one self-hosted gateway.

Gardagent sits between your agents and their model providers. Each agent gets its own key, a daily budget and a list of allowed models and tools, and every call is written to a tamper-evident log. Open source, Apache 2.0.

View on GitHub Quick start Release v0.4.2

How it works

Your agents keep their usual SDK. You change the base URL and give each agent its own key. The gateway checks, forwards, counts and records.

Your agentsOpenAI or Anthropic SDK, MCP clients
→
Gardagentidentity · budget · log
→
Model providerscloud APIs or local models
01 · Identity

One key per agent

No more shared API key. Each agent is named, limited to the models you allow, and can be cut off on its own without stopping the others.

02 · Budget

A cap that holds

Each agent has a daily budget. The cost is reserved before the call, so parallel streaming requests cannot run past the limit.

03 · Proof

A tamper-evident log

Every request is appended to a hash-chained log in PostgreSQL. The database refuses updates and deletes, and an integrity check shows any break in the chain.

04 · Verify

Check it without trusting us

Export the log and verify it offline with a standalone, dependency-free verifier. Keep a checkpoint outside the database to also detect truncation.

05 · Mandate

Who allowed what

Named, revocable operator tokens, immutable policy revisions and correlated approval decisions are recorded in the log. A token proves possession of a credential, not a human identity.

Features

Get started

git clone https://github.com/bedfir/gardagent.git
cd gardagent
cp .env.example .env     # set the admin token, then your provider URL and key
docker compose up -d --build
curl http://127.0.0.1:8080/health

A prebuilt image is available: ghcr.io/bedfir/gardagent:0.4.2. The release workflow builds it with a signature, an SBOM and provenance; the steps to check them are in verify-release. Version 0.4.2 stops the gateway from following upstream redirects with credentials and validates the Origin header on MCP; 0.4.1 fixed two issues in 0.4.0, including one that let a disabled agent keep calling MCP tools: read the advisory and upgrade. No-key local trial: the README's local quickstart uses a small local model, with one measured run of about 4 minutes on a small machine (details). Upgrading from 0.3.0? Read the upgrade guide first, it contains breaking changes. Full instructions are in the README and the docs.

Honest limits

Version 0.4.2 is young and not yet 1.0 (what 1.0 requires). The Anthropic endpoint has passed one recorded run against the real provider (one model), and other providers are untested. The gateway has run through a single pilot, and the code has not had an independent human review yet. Rate-limit counters do not survive a restart, and a single instance is supported. Read SECURITY.md before exposing it, and keep the admin API on a private network.

Contribute

Issues, questions and pull requests are welcome on GitHub. Security reports go through GitHub's private vulnerability reporting, see the security policy.