How Agentgateway works as a data plane for agentic AI — from configuration hierarchy to zero-downtime updates via xDS.
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.
The configuration hierarchy intentionally mirrors the Kubernetes Gateway API resource model: Gateway (Bind) → HTTPRoute → BackendRef. This makes Kubernetes deployments feel natural.
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:
Because static config is loaded once at startup, changes require a process restart.
Local configuration is a YAML or JSON file that defines the full feature set of Agentgateway: binds, listeners, routes, backends, and policies. It uses a file watch to dynamically reload changes without restarting the process.When a file change is detected, the local config is re-parsed and translated into the shared Internal Representation (IR). The proxy then applies the new configuration with zero downtime.
Local config is convenient for development and standalone deployments. For production at scale, consider XDS.
XDS configuration enables the proxy to be configured by a remote control plane over the xDS Transport Protocol. This is the mechanism used when running under the Kubernetes controller.Unlike local config, XDS does not perform side-effectful operations such as fetching JWKS from URLs or reading files. It is optimized for efficiency and simplicity over human ergonomics.XDS config uses purpose-built protobuf types rather than Envoy’s Listener/Cluster types, and maps directly to the same IR as local config.
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 file ──┐ ├──► IR ──► Request processingXDS control plane ──┘
The IR translation layer handles ergonomic differences between user-facing configuration and runtime needs:
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.
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
This contrasts with Envoy, where changing one route requires resending all routes for a listener — potentially megabytes of data per update. In Agentgateway, changing one route sends one small protobuf message.Policy merging at runtime. Policies can be attached at the Gateway, Listener, Route, or RouteRule level. Rather than flattening policies to the lowest level (which causes fanout), the control plane sends policies as-is with references to their attachment point. Precedence and merging are resolved at runtime.Example: A user changing a single global TLS cipher suite setting in Envoy would require updating every Cluster resource. In Agentgateway, this is a single Policy targeting a Bind — one small message, regardless of how many routes or backends exist.