Agentgateway is a high-performance proxy written in Rust that acts as the data plane for agentic AI connectivity. It sits between AI agents and their upstream targets — MCP servers, A2A agents, or HTTP services — adding security, observability, and governance to every interaction without requiring changes to your agents or tools.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/agentgateway/agentgateway/llms.txt
Use this file to discover all available pages before exploring further.
Configuration hierarchy
Agentgateway uses a four-level hierarchy to describe how traffic is received and forwarded:Binds
A Bind maps to a TCP port the proxy listens on. Each bind can host multiple listeners, one per virtual host or protocol.
Listeners
A Listener defines hostname matching, protocol selection (HTTP, MCP, A2A), and optional TLS termination within a bind.
Routes
A Route specifies match criteria (path, headers, method) and the policies to apply before traffic reaches a backend.
Backends
A Backend is an upstream target — an MCP server, an A2A agent, an HTTP service, or an AI provider.
Configuration types
Agentgateway supports three forms of configuration that serve different roles in the system.- Static config
- Local config
- XDS config
Static configuration is set exactly once early in the process lifecycle. It covers global settings like logging format, admin server address, connection pool sizes, tracing endpoints, and DNS resolver behavior. Routing, policies, and backends are not configurable here.Static config is provided via:
- Environment variables
- A YAML or JSON file passed to the
--configflag - Inline bytes on the command line
Because static config is loaded once at startup, changes require a process restart.
Internal Representation (IR)
Both local config and XDS config translate into a shared Internal Representation (IR) that the proxy uses at runtime. The IR is an in-memory data structure that the request processing pipeline reads directly.- Local config may fetch JWKS from URLs, resolve file paths, and perform other I/O during translation.
- XDS config performs only simple, mechanical remappings — no side effects.
- In some cases the IR and local config are identical; in others there are trivial field remappings.
The design goal is a nearly direct mapping from user-facing APIs → XDS → IR. This simplifies operations (configuration is easy to understand), reduces control plane complexity, and enables efficient delta updates.
xDS and zero-downtime updates
Agentgateway uses xDS as its dynamic configuration protocol, but with purpose-built resource types instead of Envoy’s types. This enables several important performance properties: Fine-grained resource cardinality. Each logical object in the user API maps to exactly one protobuf resource:| User API object | xDS resource |
|---|---|
One HTTPRoute rule | One Route resource |
One Kubernetes Pod | One Workload resource |
| One policy | One policy resource targeting its attachment point |
Policy targeting a Bind — one small message, regardless of how many routes or backends exist.
Kubernetes controller
When deployed on Kubernetes, Agentgateway includes a built-in controller that:- Watches Kubernetes Gateway API resources (
Gateway,HTTPRoute,ReferenceGrant, etc.) - Translates them into Agentgateway’s xDS resource types
- Pushes updates to the proxy over the xDS Transport Protocol
- Handles zero-downtime rollouts and configuration changes
Configuration
Deep dive into config file structure, file-watch reloads, and the full configuration schema
Protocols
Learn how Agentgateway proxies MCP, A2A, and HTTP traffic