Developer Guide

Everything you need to deploy, configure, and extend gatez.

Quick Start

Get the full stack running locally in 5 minutes.

Prerequisites

Requirement Minimum
Docker24.0+
Docker Composev2.20+
RAM16 GB
git2.x

Step 1: Clone the Repository

terminal
$ git clone https://github.com/gatez-dev/gatez.git
$ cd gatez

Step 2: Configure Environment

terminal
$ cp .env.example .env
# Edit .env with your LLM provider API keys
# Or leave empty to use Ollama (no key needed)

Step 3: Start the Stack

terminal
$ docker compose up -d

Step 4: Verify Services

terminal
$ curl localhost:9080/healthcheck
# API Gateway ready
$ curl localhost:4000/health
# AI Gateway ready
$ curl localhost:5001/health
# Agent Gateway ready

Step 5: First API Call

terminal
$ curl -H "Authorization: Bearer $TOKEN" \
-H "x-tenant-id: acme" \
http://localhost:9080/v1/chat/completions \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}]}'

Service Endpoints

Service URL Purpose
API Gatewaylocalhost:9080All inbound traffic
AI Gatewaylocalhost:4000LLM routing (internal)
Agent Gatewaylocalhost:5001MCP/A2A (internal)
Control Plane APIlocalhost:4001Management API
Operator Portallocalhost:3003Platform admin UI
Developer Portallocalhost:3004Tenant user UI
Grafanalocalhost:3002Dashboards
Keycloaklocalhost:8081Identity
Jaegerlocalhost:16686Traces
ClickHouselocalhost:8123Analytics
Prometheuslocalhost:9092Metrics

API Reference

HTTP endpoints for all three gateway layers.

GET
/health

Health check

GET
/v1/models

List available models

POST
/v1/chat/completions

Chat completions (OpenAI-compatible)

GET
/v1/budget/:tenant_id

Check token budget

POST
/admin/reload

Hot config reload

GET
/v1/providers/health

Provider health stats

GET
/metrics

Prometheus metrics

POST
/v1/sessions

Create agent session

GET
/v1/sessions

List sessions

GET
/v1/sessions/:id

Session details

DELETE
/v1/sessions/:id

Terminate session

POST
/v1/mcp/tools/call

Call MCP tool

GET
/v1/mcp

Virtual MCP endpoint (multiplexed)

POST
/v1/mcp/servers

Register MCP server

GET
/v1/mcp/health

MCP server health

POST
/v1/a2a/agents

Register A2A agent

POST
/v1/a2a/send

Send A2A message

GET
/v1/hitl/pending

HITL approval queue

POST
/v1/hitl/:id/resolve

Approve/deny HITL

POST
/api/tenants

Create tenant

GET
/api/tenants

List tenants

POST
/api/keys/request

Request API key

GET
/api/analytics/traffic

Traffic analytics

GET
/api/analytics/llm

LLM usage analytics

GET
/api/health/services

Service health

Configuration

Key environment variables and service configuration.

Core Services

Variable Default Description
REDIS_URL redis://gw-redis:6379 Redis connection
CLICKHOUSE_URL http://clickhouse:8123 ClickHouse HTTP
KEYCLOAK_URL http://gw-keycloak:8080 Keycloak base URL

LLM Providers

Variable Required Description
OPENAI_API_KEY No OpenAI API key
ANTHROPIC_API_KEY No Anthropic API key
GEMINI_API_KEY No Google Gemini key
OLLAMA_BASE_URL No Ollama endpoint (default: localhost:11434)
MODEL_ALIASES No Alias mappings (e.g., fast=gpt-4o-mini)

Ready to deploy?

Clone the repo and get the full stack running in 5 minutes.