Developer Guide
Everything you need to deploy, configure, and extend gatez.
Quick Start
Deploy the full stack in 5 minutes with Docker Compose
Architecture
How L1 (API Gateway), L2 (AI Gateway), and L3 (Agent Gateway) work together
API Reference
AI Gateway, Agent Gateway, and Control Plane API endpoints
Configuration
Environment variables, Redis keyspace, ClickHouse schemas
Migration
Coming from Kong? We have a migration guide and config translator
Models & Providers
13 LLM providers supported. OpenAI-compatible API.
Quick Start
Get the full stack running locally in 5 minutes.
Prerequisites
| Requirement | Minimum |
|---|---|
| Docker | 24.0+ |
| Docker Compose | v2.20+ |
| RAM | 16 GB |
| git | 2.x |
Step 1: Clone the Repository
Step 2: Configure Environment
Step 3: Start the Stack
Step 4: Verify Services
Step 5: First API Call
Service Endpoints
| Service | URL | Purpose |
|---|---|---|
| API Gateway | localhost:9080 | All inbound traffic |
| AI Gateway | localhost:4000 | LLM routing (internal) |
| Agent Gateway | localhost:5001 | MCP/A2A (internal) |
| Control Plane API | localhost:4001 | Management API |
| Operator Portal | localhost:3003 | Platform admin UI |
| Developer Portal | localhost:3004 | Tenant user UI |
| Grafana | localhost:3002 | Dashboards |
| Keycloak | localhost:8081 | Identity |
| Jaeger | localhost:16686 | Traces |
| ClickHouse | localhost:8123 | Analytics |
| Prometheus | localhost:9092 | Metrics |
API Reference
HTTP endpoints for all three gateway layers.
/health
Health check
/v1/models
List available models
/v1/chat/completions
Chat completions (OpenAI-compatible)
/v1/budget/:tenant_id
Check token budget
/admin/reload
Hot config reload
/v1/providers/health
Provider health stats
/metrics
Prometheus metrics
/v1/sessions
Create agent session
/v1/sessions
List sessions
/v1/sessions/:id
Session details
/v1/sessions/:id
Terminate session
/v1/mcp/tools/call
Call MCP tool
/v1/mcp
Virtual MCP endpoint (multiplexed)
/v1/mcp/servers
Register MCP server
/v1/mcp/health
MCP server health
/v1/a2a/agents
Register A2A agent
/v1/a2a/send
Send A2A message
/v1/hitl/pending
HITL approval queue
/v1/hitl/:id/resolve
Approve/deny HITL
/api/tenants
Create tenant
/api/tenants
List tenants
/api/keys/request
Request API key
/api/analytics/traffic
Traffic analytics
/api/analytics/llm
LLM usage analytics
/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.