Docs
Run it first. Then read how it works.
One command starts the whole stack on a laptop. This page gives the quickstart, says what each service is, and points to the full reference. Nothing here needs a sales call to verify.
Quickstart
One command on one machine.
make up starts the gateway, the portals and the stores from pinned images, sets up the routes, and prints the Operator Portal login at the end. Measured at 7.5 minutes on a fresh machine; later starts reuse the built images.
Before you start
| Requirement | Minimum |
|---|---|
| Docker | 24.0 or later, with Compose v2.20 or later |
| Memory | 8 GB for the core stack, 16 GB with every profile |
| Tools | git, curl, make, python3 (the scripts parse JSON with it) |
| Network | Only to pull images. A host with no internet uses your own registry or a tar file. |
Provider keys are optional. With none set, the AI gateway serves the local Ollama model only, and no call leaves the network. Never commit .env; the pre-commit hook blocks it.
Four steps
# 1. clone (the URL comes with evaluation access) git clone <your clone URL> gatez && cd gatez # 2. the defaults work locally cp .env.example .env # 3. core stack → routes → access summary make up # 4. printed at the end Operator Portal http://localhost:3003 Developer Portal http://localhost:3004 Control Plane API http://localhost:4001 Admin (first boot) email: admin@gatez.local password: <printed once>
Sign in to the Operator Portal with the printed account. The first sign-in forces a password change. Anyone who can read the container log can use the printed password until then, so change it first. make creds prints the summary again, only until the change.
- 1
What
make upstartsThe core: etcd, the API gateway, Redis, ClickHouse with its one-shot migration, the AI gateway, the agent gateway, the Control Plane API and both portals. Every service waits for its dependencies' health checks.
- 2
What it does next
Sets the edge routes:
/api/*to the Control Plane API,/v1/*to the AI gateway, the agent routes to the agent gateway. Seeds the demo scenario only when the demo profile is running. - 3
Run it again
make upis idempotent: after a reboot ormake downit re-checks health, re-applies the routes and prints the summary.make resetalso deletes the volumes, and asks first.make smokeruns the smoke test.
Profiles
Add only what you need.
The core is the gateway and its stores. Optional profiles are added through COMPOSE_PROFILES in .env or on the shell.
| Profile | Adds | Try |
|---|---|---|
| demo | A mock upstream, a second agent gateway, Qdrant for the semantic cache, this site. make demo also seeds the NovaTrust scenario: four teams, routes, keys, tool servers. | make demo |
| observability | Prometheus, Grafana, Jaeger and an OpenTelemetry collector. Dashboards per layer; one trace across all three. | COMPOSE_PROFILES=observability make up |
| sso | Zitadel as a federated identity provider on top of the built-in sign-in. Start it with federation off, provision the clients, then turn federation on. | COMPOSE_PROFILES=sso make up |
Sign-in is built in: sessions are signed by the Control Plane API and checked against Redis on every request. An identity provider is optional.
Architecture
One entry point. Three gateways. One control plane.
Every call enters through the API gateway. Model traffic continues to the AI gateway, agent traffic to the agent gateway. The same team id follows the call through all three and into every log row. These are the services, named as facts.
API gateway
Apache APISIX with Gatez plugins written in Lua. Routes, API keys, rate limits per team per route, and the request log, written to ClickHouse from the log phase, never in the request path. Configuration lives in etcd.
AI gateway
A Gatez service. One OpenAI-compatible endpoint in front of cloud providers and local models. Personal data is redacted before any model call. Token budgets per team are checked before the call and deducted after. Exact-match cache in Redis, semantic cache in Qdrant. Circuit breaker, retry and failover to the next provider, which can be the local model.
Agent gateway
A Gatez service. Tool calls by MCP and agent-to-agent delegation by A2A. The approval gate, tool allowlists (deny by default), session budgets, delegation depth and loop checks, and the audit rows all live here. Every delegation hop carries a short-lived token by RFC 8693 token exchange.
Control plane
A Gatez API plus two React portals. The Operator Portal is for the platform team: every team, policy and approval. The Developer Portal is for one team and never shows another. Built-in sign-in; Zitadel optional. ClickHouse holds request logs, model usage and audit rows, partitioned by month with retention per table.
- Local models through Ollama; in local-model mode no call leaves the network.Live
- Every service runs from container images with no internet access. Images verified by digest from your registry or a tar file.Live
- OpenTelemetry traces across all three gateways; Prometheus metrics; Grafana dashboards; Jaeger for traces (observability profile).Live
- One bundle command for the whole offline stack, and a software bill of materials beside every image.In progress
Local ports
Where each service answers on a laptop.
From the local Compose file. Internal services bind to the loopback address only.
| Service | Address | Purpose |
|---|---|---|
| API gateway (edge) | localhost:9080 | Every inbound call. /v1/*, /api/*, agent routes. |
| Control Plane API | localhost:4001 | Management API. Also reachable through the edge as /api/*. |
| Operator Portal | localhost:3003 | Platform team. All teams, policies, approvals, health. |
| Developer Portal | localhost:3004 | One team. Its APIs, keys, usage, sessions, own approvals. |
| AI gateway | 127.0.0.1:4000 | Internal. Reached through the edge in normal use. |
| Agent gateway | 127.0.0.1:5001 | Internal. Reached through the edge in normal use. |
| ClickHouse | 127.0.0.1:8123 | Logs, usage, audit rows. HTTP interface. |
| Grafana · Jaeger · Prometheus | 127.0.0.1:3002 · :16686 · :9090 | Observability profile. |
| Zitadel | 127.0.0.1:8085 | SSO profile. Optional identity provider. |
API reference
Three APIs, one tenant model.
Every call carries the team's id, from a tenant key or a signed session. The endpoints below are the ones most evaluations touch. The full reference, with request and response bodies and error codes, is on the documentation site.
AI gateway
OpenAI-compatible. Point an existing client at the edge.
/v1/models
POST/v1/chat/completions
GET/v1/budget/:tenant_id
GET/v1/providers/health
GET/health
GET/metrics
Agent gateway
Sessions, tool calls, the approval gate, delegation.
/v1/sessions
POST/v1/mcp/tools/call
GET/v1/mcp
PUT/v1/policies/:tenant_id
GET/v1/hitl/pending
POST/v1/hitl/:id/approve · /deny · /modify
POST/v1/a2a/send
PUT/v1/a2a/policies/:tenant_id
Control Plane API
Teams, keys, analytics, audit export, providers.
/api/tenants
POST/api/keys/request
POST…/keys/requests/:id/approve
GET/api/analytics/traffic · /llm
GET/api/audit
GET/api/audit/export
GET/api/providers
GET/api/health/services
A team with no stored tool policy cannot call tools; the gateway answers 403 policy_missing. A policy must name at least one tool. /api/audit/export returns a CSV plus a signed manifest (EdDSA) that anyone can verify against the gateway's public key.
Python SDK
Three verbs an app already understands.
llm, approve, trace. Standard library only; the gateway does the work. Decorate a function and a person decides before it runs, by policy, not by code in the agent.
from gatez import Gatez gz = Gatez() # reads GATEZ_URL and GATEZ_API_KEY # a person decides before it runs — by policy @gz.approve("refund", reversible=False) def refund(order_id: str, amount: float): return payments.refund(order_id, amount) answer = gz.llm.chat(model="gpt-4o-mini", messages=msgs) # runs now, or raises PendingApproval (id + portal link) refund("ORD-789", 79.99)
# scripts that can block: wait for the decision refund = gz.approve("refund", reversible=False, mode="wait", timeout=30)(refund) # services: the signed webhook, verified by the SDK @gz.on_approved("refund") def after_refund(decision): notify_customer(decision.result) # .decision too # one id across model call, gated action, audit row with gz.trace() as t: gz.llm.chat(model="m", messages=msgs) refund("ORD-1")
reversible=False tools are gated by the team policy the gateway creates for you; an operator can tighten it in the portal, the SDK never loosens it.The SDK lives in the repository under sdk/python, with its README, examples and offline unit tests. Your app endpoint must sit where only the gateway can reach it; the README says how to verify the gateway's caller token.
Full documentation
The long answers.
The documentation site is built from the same repository as the code. These pages are the ones a security reviewer and an engineer ask for first.
- Quickstart — the walkthrough behind
make up, the first API call, troubleshooting. - Architecture overview — the three gateways, the control plane, the data flow.
- Environment variables — every setting, with its default.
- Authentication — built-in sign-in, sessions, the optional identity provider.
- Agent identity — delegated identity by token exchange, the actor chain, what the tool server receives.
- Provider management — model providers, key references, custom OpenAI-compatible endpoints. See also models and providers on this site.
- Feature matrix — what is built, by layer.
- Air-gapped install — the procedure for a host with no internet (your registry or a tar file, images verified by digest) is in the repository under
docs/deployment/air-gap.md.
See it run before you read any further.
Thirty minutes on a live system, with your scenario: a risky action held, approved, resumed and recorded. Inside your walls, or your own cloud.