Skip to content

AI Gateway

Lightweight LLM inference gateway on AWS — route any AI agent to any model provider through a single endpoint.


AI Gateway deploys agentgateway — a Rust LLM/MCP proxy on a distroless base — on ECS Fargate behind an Application Load Balancer, giving your AI coding agents a unified entry point to multiple model providers. It speaks both the OpenAI Chat Completions and Anthropic Messages API formats natively on a single port, so every major agent works without translation layers or custom adapters. Provider and model selection is server-side: agentgateway routes through a priority-group failover chain defined in its config.

Authentication is handled by Cognito M2M (client_credentials grant) with ALB-native JWT validation — no API Gateway required, no per-request cost added.


FeatureDescription
Dual API formatServes /v1/chat/completions (OpenAI) and /v1/messages (Anthropic) natively on one port
Multi-provider routingRoutes to Bedrock, OpenAI, Anthropic, Google, and Azure OpenAI via server-side priority-group failover
Cognito M2M authMachine-to-machine JWT authentication with ALB-native validation
Zero per-request costALB JWT validation eliminates the need for API Gateway
Auto-scalingECS Fargate scales on CPU utilization and ALB request count
Inline content safetyBedrock Guardrails called in-path (ApplyGuardrail), detect/log-only by default
ObservabilityOpenTelemetry sidecar with CloudWatch logs, X-Ray traces, and operational dashboards

AgentAPI FormatEndpoint
Claude CodeAnthropic Messages/v1/messages
OpenCodeOpenAI Chat Completions/v1/chat/completions
GooseOpenAI Chat Completions/v1/chat/completions
Continue.devOpenAI Chat Completions/v1/chat/completions
LangChainOpenAI Chat Completions/v1/chat/completions
Codex CLIOpenAI Chat Completions/v1/chat/completions

Getting Started

Clone, install, deploy, and make your first request in under 5 minutes.

Quick start

User Guide

Configure your AI agent, learn the API, and troubleshoot common issues.

User guide

Admin Guide

Deploy, manage environments, configure security, and monitor the gateway.

Admin guide

Developer Guide

Contribute to the project, understand the architecture, and run CI locally.

Developer guide