Envoy AI Gateway (now Agent Router): architecture, features, and install

Explainer · Gateways

Envoy AI Gateway is an open-source AI gateway that runs on Kubernetes as an extension of Envoy Gateway, giving applications one OpenAI-compatible endpoint for hosted models, self-hosted models, and MCP servers. On September 10, 2026, the project was renamed Agent Router and moved to the Agentic AI Foundation, but its custom resources, API group, Helm charts, and aigw CLI kept their names, so everything here applies under either name. Search results still list the project under its original name, so this explainer uses Envoy AI Gateway throughout. The AI gateways topic hub covers the wider category.

What is Envoy AI Gateway?#

Envoy AI Gateway is an open-source control plane, written in Go, that configures Envoy Proxy to route, authenticate, meter, and observe traffic from applications to generative AI services. Platform teams define providers, credentials, token budgets, and tool access once as Kubernetes resources, and Envoy applies them to every request. Application teams switch models by changing the model name in the request.

It is an AI gateway in the usual sense, with one OpenAI-compatible API, routing, failover, and usage tracking in one place; the docs add that it is not an agent framework. The explainer on what an AI gateway is covers the category.

  • 2024: Bloomberg engineers took the multi-provider problem to the Envoy community and built the project with Tetrate, with public development starting in October, per the Agentic AI Foundation announcement.
  • February 25, 2025: v0.1.0 shipped.
  • June 23, 2026: v1.0.0 declared five resources stable at v1beta1, with no breaking changes within 1.x unless a critical security fix requires one.
  • November 18, 2026: v1.3.0, the current release as of November 2026.

Envoy AI Gateway is now Agent Router: what changed#

In September 2026, Envoy AI Gateway changed its name, governance, and web addresses, but nothing that runs in a cluster. The project left the Envoy project inside the CNCF, became a standalone project named Agent Router, and joined the Agentic AI Foundation. The maintainers state that existing manifests apply unchanged and that there is nothing to migrate.

Item Before September 10, 2026 After the rename
Project name Envoy AI Gateway Agent Router
Governance Envoy sub-project in the CNCF Agentic AI Foundation project
Website aigateway.envoyproxy.io theagentrouter.ai
Repository github.com/envoyproxy/ai-gateway github.com/theagentrouter/agent-router
CRDs and API group aigateway.envoyproxy.io Unchanged
CLI and namespace aigw, envoy-ai-gateway-system Unchanged
Helm charts and images docker.io/envoyproxy/ai-gateway-* Unchanged
License Apache 2.0 Unchanged

Requests to the old website and repository return HTTP 301 redirects to the matching new addresses. Agent Router is distinct from the Tetrate Agent Router Service (TARS), a hosted model service listed among the project's supported providers.

Envoy AI Gateway vs Envoy Gateway#

Envoy Gateway is a general-purpose gateway that implements the Kubernetes Gateway API on Envoy Proxy, and Envoy AI Gateway is an add-on that cannot run without it. Envoy Gateway handles listeners, TLS, client authentication, retries, and service discovery. Envoy AI Gateway adds body-aware model routing, provider translation, upstream credentials, and token accounting.

The Envoy Gateway site describes it as "implementing and extending the Kubernetes Gateway API," the standard maintained by the Gateway API project. The AI layer reuses those resources: Gateway for listeners, Backend for upstream hosts, BackendTrafficPolicy for retries and rate limits, and SecurityPolicy for client authentication with JWT, API keys, or external authorization. Because the AI layer hooks into Envoy Gateway's translation step, Envoy Gateway must be installed with the project's values file.

Architecture: control plane and data plane#

Envoy AI Gateway splits into a control plane, where two controllers turn Kubernetes resources into Envoy configuration, and a data plane, where Envoy Proxy and an AI-aware external processor handle each request. The AI Gateway controller patches Envoy Gateway's output through an extension server, so Envoy Gateway keeps doing all the work that is not specific to AI.

Envoy AI Gateway architecture: an AI Gateway controller and the Envoy Gateway controller watch the Kubernetes API, meet at the extension server, and configure the external processor sidecar, Envoy Proxy, and the rate limit service. Control planeData planeKubernetes API serverAI Gateway resources, Gateway API and Envoy Gateway resourcesAI Gateway controllerai-gateway-controllergenerates HTTPRoutes, SecretsEnvoy Gateway controllerGateway API to xDSdiscovery, TLS, load balancingAI Gateway ExtProcsidecar in the Envoy podtranslation, credentials, tokensEnvoy Proxyroutes, retries, fallbackRate limit serviceRedis-backed countersAI resourcesGateway APIextension server :1063config SecretxDSUnix sockettoken budget
Figure 1: Two controllers share the control plane. The AI Gateway controller configures the sidecar and patches xDS; Envoy Gateway configures Envoy Proxy and the rate limit service.

The control plane#

The AI Gateway controller runs as the ai-gateway-controller deployment in the envoy-ai-gateway-system namespace. Per the control plane docs, it watches the AI Gateway resources, generates HTTPRoute and HTTPRouteFilter objects, writes the external processor's rules and provider credentials into a Secret, rotates short-lived credentials, and injects the processor into each Envoy Proxy pod with an admission webhook.

The Envoy Gateway controller translates Gateway API resources into Envoy's xDS configuration. Before pushing xDS to the proxies, it calls the AI Gateway controller through the Envoy Gateway extension server, which adds what Gateway API cannot express, such as per-backend HTTP filters and priority on individual backendRefs. That is why the v1.3 envoy-gateway-values.yaml file requires Envoy Gateway's Backend API and an extension manager pointing at the controller on port 1063.

The data plane#

Each Envoy Proxy pod carries the AI Gateway external processor (ExtProc) as a sidecar, reached over a local Unix domain socket, and a Redis-backed rate limit service enforces token budgets. The sidecar placement makes cross-provider fallback work: a retry needs the processor instance that saw the original request body, and Envoy has no session affinity for external processors.

How a request moves through the gateway#

A request passes through the external processor twice. The router-level pass reads the model name; the upstream-level pass rewrites and signs the request for the chosen backend. Per the data plane docs, the split exists because Envoy retries at the upstream level without rerunning router filters, and a retry from OpenAI to AWS Bedrock needs a different body and credential.

Request flow through Envoy AI Gateway: the external processor reads the model, the upstream phase translates and signs the call, and the processor counts tokens from the response. Client appOpenAI SDKEnvoy Proxyroutes, retriesExtProcsidecarProviderOpenAI, Bedrock1POST chat request2router: read model3set x-ai-eg-model4translate and sign5forward to backend6response or stream7extract token usage8OpenAI-format reply
Figure 2: One chat completion request. Envoy checks the token budget after step 3, repeats steps 4 to 6 for each fallback attempt, and charges tokens after step 7.

Token counts land in per-request dynamic metadata under io.envoy.ai_gateway, and Envoy charges them to the rate limit service. A client already over budget gets a 429 before any provider is called.

The custom resources you configure#

Envoy AI Gateway is configured through six custom resources in the aigateway.envoyproxy.io API group. Three appear in every deployment: an AIGatewayRoute defines the client-facing API and routing rules, an AIServiceBackend represents one provider, and a BackendSecurityPolicy holds that provider's credentials. The others cover gateway-wide settings, MCP routing, and provider budgets.

Resource What it does API version in v1.3
AIGatewayRoute Model matching, backend weights and priorities, token cost tracking v1beta1 (stable)
AIServiceBackend One upstream and the API schema it speaks v1beta1 (stable)
BackendSecurityPolicy API keys or short-lived cloud credentials v1beta1 (stable)
GatewayConfig Gateway-wide external processor settings v1beta1 (stable)
MCPRoute One endpoint in front of several MCP servers v1beta1 (stable)
QuotaPolicy Token budgets per backend and model v1alpha1 only

The v1alpha1 versions of the first five are deprecated but still served, per the compatibility notes. The project's examples/basic/openai.yaml defines the three core resources:

apiVersion: aigateway.envoyproxy.io/v1beta1
kind: AIGatewayRoute
metadata:
  name: envoy-ai-gateway-basic-openai
  namespace: default
spec:
  parentRefs:
    - name: envoy-ai-gateway-basic
      kind: Gateway
      group: gateway.networking.k8s.io
  rules:
    - matches:
        - headers:
            - type: Exact
              name: x-ai-eg-model
              value: gpt-4o-mini
      backendRefs:
        - name: envoy-ai-gateway-basic-openai
---
apiVersion: aigateway.envoyproxy.io/v1beta1
kind: AIServiceBackend
metadata:
  name: envoy-ai-gateway-basic-openai
  namespace: default
spec:
  schema:
    name: OpenAI
  backendRef:
    name: envoy-ai-gateway-basic-openai
    kind: Backend
    group: gateway.envoyproxy.io
---
apiVersion: aigateway.envoyproxy.io/v1beta1
kind: BackendSecurityPolicy
metadata:
  name: envoy-ai-gateway-basic-openai-apikey
  namespace: default
spec:
  targetRefs:
    - group: aigateway.envoyproxy.io
      kind: AIServiceBackend
      name: envoy-ai-gateway-basic-openai
  type: APIKey
  apiKey:
    secretRef:
      name: envoy-ai-gateway-basic-openai-apikey

The full file adds a Backend for api.openai.com, a BackendTLSPolicy, and the Secret. The route matches the x-ai-eg-model header, which the gateway fills from the model field in the request body. The backend's schema names the API the provider speaks, so an OpenAI-format client can reach a schema: AWSBedrock backend through translation. Envoy Gateway policies attach to the HTTPRoute that the controller generates with the same name as each AIGatewayRoute.

Features in v1.3#

The capabilities index groups the features into provider integrations, inference optimization for self-hosted models, traffic management, upstream security, MCP, and observability, with agent-to-agent routing in preview. Each group below reflects v1.3.0, released November 18, 2026, and several features pair an AI Gateway resource with a standard Envoy Gateway policy.

Providers and fallback#

The supported-providers table lists 26 providers as of November 2026, including OpenAI, Azure OpenAI, AWS Bedrock, Vertex AI, Anthropic, and Mistral, plus self-hosted OpenAI-format servers such as vLLM. A modelNameOverride maps one application-facing model name to each provider's own ID. The LLM routing guide covers these patterns in general.

Provider fallback follows backendRefs priority, with retries from an Envoy Gateway policy attached to the generated HTTPRoute. The docs' policy makes one attempt per priority, so a failing primary is not retried before the fallback:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
  name: provider-fallback
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      name: provider-fallback # HTTPRoute is created with the same name as AIGatewayRoute
  retry:
    # This ensures that only one attempt is made per priority.
    # For example, if the primary backend fails, it will not retry on the same backend.
    numAttemptsPerPriority: 1
    numRetries: 5
    perRetry:
      backOff:
        baseInterval: 100ms
        maxInterval: 10s
      timeout: 30s
    retryOn:
      httpStatusCodes:
        - 500
      triggers:
        - connect-failure
        - retriable-status-codes

Token rate limits and QuotaPolicy#

Usage-based rate limiting caps each client's token spend on a route. The AIGatewayRoute records counts with llmRequestCosts, as in this snippet from the usage-based rate limiting docs:

spec:
  llmRequestCosts:
    - metadataKey: llm_input_token
      type: InputToken # Counts tokens in the request
    - metadataKey: llm_cached_input_token
      type: CachedInputToken # Counts cached input tokens in the request prompt
    - metadataKey: llm_output_token
      type: OutputToken # Counts tokens in the response
    - metadataKey: llm_total_token
      type: TotalToken # Tracks combined usage

Limits then key on headers such as a tenant ID plus x-ai-eg-model. Budgets overshoot on streamed responses, because usage is known only when a stream ends and an admitted stream is never cut off.

QuotaPolicy protects the platform's provider budget instead, counting a model's tokens across every route that reaches a backend. The v1.3.0 release notes added weekly, monthly, and yearly windows, per-tenant limits from request metadata, and, in preview, failover away from backends whose quota is exhausted. Per the QuotaPolicy docs, the Helm chart does not deploy the Redis instance or rate limit service it needs, a modelName that does not match the route's modelNameOverride is skipped silently, and checks fail open unless controller.quotaRateLimitFailureModeDeny is set to true.

Upstream authentication#

BackendSecurityPolicy keeps provider credentials out of application pods. AWS Bedrock, Azure OpenAI, and Vertex AI use short-lived credentials from AWS STS, Entra ID, and Google STS, per the upstream authentication docs, and v1.3 added workload identity federation for OpenAI. A credentialOverride field lets a trusted ext_authz filter supply a credential per request, so each tenant can be billed to its own provider account.

Envoy AI Gateway MCP routing#

MCPRoute turns the gateway into an MCP gateway that puts several Model Context Protocol servers behind one endpoint, such as /mcp. The MCP docs list streamable HTTP from the June 2025 specification, OAuth, CEL-based authorization per tool, and tool filtering. Tools are prefixed with their backend name, as in github__issue_read, and tools/list applies the same rules as tools/call.

The guide to MCP security covers the threats these controls address.

Self-hosted models, observability, and A2A#

  • InferencePool: through the Gateway API Inference Extension, an endpoint picker routes each request to a model server using signals such as KV cache usage and queue depth.
  • Metrics: the metrics docs list Prometheus metrics in the OpenTelemetry GenAI format, including gen_ai.client.token.usage, request duration, time to first token, and time per output token, labeled by model and provider.
  • Tracing: spans follow OpenTelemetry with OpenInference attributes by default, which include full request and response content unless hidden through configuration; the LLM observability guide shows where gateway telemetry fits.
  • A2A (preview): agent-to-agent traffic has no route type yet; the A2A guide uses HTTPRoute, Envoy's alpha A2A filter, a dedicated Gateway, and Envoy Gateway v1.8 or newer.

How to install Envoy AI Gateway with Helm#

The Kubernetes install takes three Helm releases: Envoy Gateway with the project's values file, a CRD chart, and the controller chart. The v1.3 prerequisites page asks for Kubernetes 1.32 or later plus kubectl, helm, and curl. The commands below come from the v1.3 docs.

Step 1. Install Envoy Gateway v1.10.0 with the AI Gateway values file:

helm upgrade -i eg oci://docker.io/envoyproxy/gateway-helm \
  --version v1.10.0 \
  --namespace envoy-gateway-system \
  --create-namespace \
  -f https://raw.githubusercontent.com/theagentrouter/agent-router/v1.3.0/manifests/envoy-gateway-values.yaml
 
kubectl wait --timeout=2m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available

For token rate limiting or InferencePool, add -f flags for examples/token_ratelimit/envoy-gateway-values-addon.yaml and examples/inference-pool/envoy-gateway-values-addon.yaml from the same tag.

Step 2. Install the CRD chart:

helm upgrade -i aieg-crd oci://docker.io/envoyproxy/ai-gateway-crds-helm \
  --version v1.3.0 \
  --namespace envoy-ai-gateway-system \
  --create-namespace

Step 3. Install the controller chart. The installation page still publishes it under docker.io/envoyproxy:

helm upgrade -i aieg oci://docker.io/envoyproxy/ai-gateway-helm \
  --version v1.3.0 \
  --namespace envoy-ai-gateway-system \
  --create-namespace
 
kubectl wait --timeout=2m -n envoy-ai-gateway-system deployment/ai-gateway-controller --for=condition=Available

Step 4. Deploy the basic example, which includes a mock backend:

kubectl apply -f https://raw.githubusercontent.com/theagentrouter/agent-router/v1.3.0/examples/basic/basic.yaml
 
kubectl wait pods --timeout=2m \
  -l gateway.envoyproxy.io/owning-gateway-name=envoy-ai-gateway-basic \
  -n envoy-gateway-system \
  --for=condition=Ready

Step 5. Port-forward to the Envoy service, then send a request from a second terminal:

export ENVOY_SERVICE=$(kubectl get svc -n envoy-gateway-system \
  --selector=gateway.envoyproxy.io/owning-gateway-namespace=default,gateway.envoyproxy.io/owning-gateway-name=envoy-ai-gateway-basic \
  -o jsonpath='{.items[0].metadata.name}')
 
kubectl port-forward -n envoy-gateway-system svc/$ENVOY_SERVICE 8080:80
export GATEWAY_URL="http://localhost:8080"
 
curl -H "Content-Type: application/json" \
  -d '{
        "model": "some-cool-self-hosted-model",
        "messages": [
            {
                "role": "system",
                "content": "Hi."
            }
        ]
    }' \
  $GATEWAY_URL/v1/chat/completions

To reach a real model, apply examples/basic/openai.yaml with a real key in its Secret. Copy the ClientTrafficPolicy from basic.yaml into other Gateways too: it raises Envoy Gateway's default 32 KB buffer limit, which the docs call too small for most model responses, to 50Mi.

Standalone mode: running aigw without Kubernetes#

The aigw CLI runs the gateway as a standalone proxy on Linux or macOS, with no Kubernetes or Docker required. It reads the same configuration API as the custom resources, so a route tested on a laptop deploys to a cluster unchanged. The CLI docs mark it as experimental and under active development.

aigw auto-configures from the same environment variables as the OpenAI SDK and serves on port 1975, per the getting started page:

OPENAI_API_KEY=sk-your-key aigw run
curl http://localhost:1975/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-5", "messages": [{"role": "user", "content": "Say this is a test!"}]}'

The aigw run reference adds the rest:

  • Other backends: Azure OpenAI variables, or OPENAI_BASE_URL=http://localhost:11434/v1 for a local Ollama.
  • Custom configuration: aigw run config.yaml loads a file in the CRD API.
  • MCP gateway mode: aigw run --mcp-config mcp-servers.json reads the mcpServers JSON format used by Claude Desktop and serves the tools at /mcp.
  • Admin endpoints: /metrics and /health on port 1064.
  • Encryption seeds: Files API and MCP session IDs are encrypted with a well-known public seed by default, so set AIGW_FILE_ID_ENCRYPTION_SEED and AIGW_MCP_SESSION_ENCRYPTION_SEED before sharing an instance.

Binaries ship with each GitHub release, and the envoyproxy/ai-gateway-cli image runs the same command in Docker.

Envoy AI Gateway vs LiteLLM#

Envoy AI Gateway and LiteLLM solve the same problem from different stacks. Agent Router, as the project is now named, is a Go control plane that configures Envoy on Kubernetes through custom resources. LiteLLM is a Python SDK plus a self-hosted OpenAI-compatible proxy configured with a YAML model list.

Envoy AI Gateway (Agent Router) LiteLLM
Runtime Go control plane, Envoy Proxy data plane Python SDK and Python proxy server
Configuration Kubernetes CRDs, or the same API in an aigw file litellm_config.yaml with a model_list
State it needs Redis for token limits and quotas PostgreSQL for virtual keys
Provider coverage 26 providers in the v1.3 table "100+ LLMs," per its docs
Client authentication Envoy Gateway SecurityPolicy Proxy-issued virtual keys

A team standardized on Envoy gets token limits and provider routing without a second proxy technology, while a team without Kubernetes usually finds one LiteLLM proxy process simpler to stand up. The LiteLLM alternatives comparison covers more options.

When it fits, and what it costs to run#

Envoy AI Gateway fits platform teams that already run Kubernetes and Envoy and want shared model access, provider credentials, and token budgets under one set of Gateway API policies. The cost is operational: two controllers, an admission webhook, a sidecar in every proxy pod, and version pinning against Envoy Gateway.

It earns that setup when several teams share model access and need per-tenant token limits, when provider keys must stay out of application pods, when hosted providers and self-hosted inference engines need one API and one set of metrics, or when agents use MCP servers and each caller should see only its permitted tools.

Releases are tested against specific dependencies, so v1.3.x pairs with Envoy Gateway v1.10.0 or later, Envoy Gateway is upgraded first, and v1.3 must be reached from v1.2.x. Debugging a misrouted request means reading generated HTTPRoutes, extension-server patches, and xDS.

For next steps, the AI gateways directory lists self-hosted and managed gateways by deployment model, and vLLM vs Ollama compares two model servers that commonly sit behind a gateway like this one.

Frequently asked questions

What is Envoy AI Gateway?

Envoy AI Gateway is an open-source AI gateway that configures Envoy Proxy to route application traffic to generative AI services. It runs on Kubernetes as an extension of Envoy Gateway and gives applications one OpenAI-compatible API for hosted providers, self-hosted models, and MCP servers, with provider credentials, failover, token budgets, and metrics managed centrally. Since September 2026 the project is called Agent Router.

Is Envoy AI Gateway the same as Agent Router?

Yes. Agent Router is the new name for Envoy AI Gateway, which left the Envoy project in the CNCF and joined the Agentic AI Foundation on September 10, 2026. The code, maintainers, release cadence, and Apache 2.0 license stayed the same, and the CRDs, API group, aigw CLI, Helm charts, and images were not renamed. Old documentation and GitHub links redirect to the new locations.

Is Envoy AI Gateway open source?

Yes. Envoy AI Gateway is released under the Apache 2.0 license, and the rename to Agent Router did not change it. The source is at github.com/theagentrouter/agent-router, and each release publishes Helm charts, container images, and aigw CLI binaries. The repository has no separately licensed enterprise directory, and the six custom resource definitions ship in the same open-source CRD chart.

What is the difference between Envoy Gateway and Envoy AI Gateway?

Envoy Gateway is a general-purpose gateway that implements the Kubernetes Gateway API on top of Envoy Proxy. Envoy AI Gateway is an add-on that requires Envoy Gateway and adds AI-specific behavior: routing by the model name in the request body, translation between provider APIs, provider credential management, token-based rate limits, and MCP routing. Envoy Gateway still handles listeners, TLS, client authentication, retries, and service discovery.

Does Envoy AI Gateway support MCP?

Yes. The MCPRoute resource puts several MCP servers behind one gateway endpoint, such as /mcp. It supports the streamable HTTP transport, OAuth authentication, CEL-based authorization per tool, and tool filtering, and it prefixes each tool with its backend name so calls reach the right server. The aigw CLI can also run as a local MCP gateway from a Claude Desktop-style JSON file.

Does Envoy AI Gateway include guardrails?

Not as a built-in feature. The v1.3 capabilities index covers providers, routing, fallback, quotas, rate limits, upstream authentication, MCP, and observability, but lists no prompt or response guardrails. The gateway passes provider-side results through: since v1.3, an AWS Bedrock guardrail intervention maps to the content_filter finish reason. Content inspection otherwise needs a separate guardrail service.

Terms in this guide

Cite this guide

The AI Engineering Editors. "Envoy AI Gateway (now Agent Router): architecture, features, and install." The AI Engineering, updated Nov 26, 2026. https://theaiengineering.com/articles/envoy-ai-gateway

Title
Envoy AI Gateway (now Agent Router): architecture, features, and install
Author
The AI Engineering Editors
Publisher
The AI Engineering
Published
Updated
View as Markdown

The AI Engineering Editors ·