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

RequirementMinimum
Docker24.0 or later, with Compose v2.20 or later
Memory8 GB for the core stack, 16 GB with every profile
Toolsgit, curl, make, python3 (the scripts parse JSON with it)
NetworkOnly 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. 1

    What make up starts

    The 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. 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. 3

    Run it again

    make up is idempotent: after a reboot or make down it re-checks health, re-applies the routes and prints the summary. make reset also deletes the volumes, and asks first. make smoke runs 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.

ProfileAddsTry
demoA 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
observabilityPrometheus, Grafana, Jaeger and an OpenTelemetry collector. Dashboards per layer; one trace across all three.COMPOSE_PROFILES=observability make up
ssoZitadel 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.

Clients apps · agents · portals API gateway Apache APISIX · Lua plugins routes · keys · rate limits · log AI gateway OpenAI-compatible · redaction budgets · cache · failover · usage log Agent gateway MCP tools · A2A delegation approval gate · allowlists · audit Models Ollama inside the wall cloud providers only if configured Tool servers · agents your MCP servers, your app other agents by A2A Redis · ClickHouse · etcd · the Control Plane API and the two portals configure all three gateways
Model traffic and agent traffic both enter through the API gateway. The control plane configures the gateways; it is not in the request path.

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.

ServiceAddressPurpose
API gateway (edge)localhost:9080Every inbound call. /v1/*, /api/*, agent routes.
Control Plane APIlocalhost:4001Management API. Also reachable through the edge as /api/*.
Operator Portallocalhost:3003Platform team. All teams, policies, approvals, health.
Developer Portallocalhost:3004One team. Its APIs, keys, usage, sessions, own approvals.
AI gateway127.0.0.1:4000Internal. Reached through the edge in normal use.
Agent gateway127.0.0.1:5001Internal. Reached through the edge in normal use.
ClickHouse127.0.0.1:8123Logs, usage, audit rows. HTTP interface.
Grafana · Jaeger · Prometheus127.0.0.1:3002 · :16686 · :9090Observability profile.
Zitadel127.0.0.1:8085SSO 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.

GET/v1/models POST/v1/chat/completions GET/v1/budget/:tenant_id GET/v1/providers/health GET/health GET/metrics

Full AI gateway reference →

Agent gateway

Sessions, tool calls, the approval gate, delegation.

POST/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

Full agent gateway reference →

Control Plane API

Teams, keys, analytics, audit export, providers.

GET/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

Full Control Plane reference →

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)
On the first call the function is registered as a tool on your team's own app server. A session is opened. The call goes through the gateway, which calls your app back to run it.
# 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")
The gate is a state, not a blocking call. 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.

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.