The three layers
Static configuration
Static configuration
Static configuration is read exactly once during process startup. It controls global settings such as:
- Admin, stats, and readiness server addresses
- Worker thread count
- Logging format and level
- Tracing and metrics settings
- DNS resolver behavior
- Session key for encrypted session tokens
- Connection to an XDS control plane
-f flag, or through environment variables. It cannot be changed without restarting the process.See all static config fields →Local configuration
Local configuration
Local configuration is loaded from the same YAML or JSON file and supports the full feature set: binds, listeners, routes, backends, and policies. Agentgateway watches the file for changes and applies updates without restarting.Local config translates into an internal representation (IR) shared with XDS. Some fields are remapped for ergonomics — for example, you can specify a backend with a simple
host: field and the gateway will resolve it into a full backend definition.See local config structure →XDS configuration
XDS configuration
XDS configuration lets a remote control plane manage the proxy dynamically. Agentgateway uses the XDS Transport Protocol with purpose-built types (not Envoy types).Unlike local config, XDS translation does not fetch from URLs or files — it is optimized for efficiency and direct mapping from control plane to proxy. Resources reference their parents rather than embedding children, keeping update fan-out minimal.Connect to an XDS control plane by setting
config.xdsAddress and optionally config.xdsAuthToken in your static config.Configuration file format
The configuration file supports both YAML and JSON. YAML is recommended for human-authored configs due to its readability and support for comments.Specifying the config file
Pass the config file path to the gateway using the-f flag:
Environment variable overrides
Selected static configuration fields can be overridden using environment variables without changing the config file. Environment variables take precedence over file-based settings. For example, the DNS EDNS0 setting can be overridden via:Environment variable support is field-specific. Check individual field descriptions in the static config reference to see which fields support environment variable overrides.
Dynamic reloading
Agentgateway watches the config file for changes at the filesystem level. When you save an updated file, the gateway reloads local configuration automatically — no restart required. Only local configuration (binds, listeners, routes, backends, policies) is dynamically reloadable. Static configuration fields (logging, worker threads, admin address, etc.) take effect only at startup.Minimal working config
The smallest valid config that proxies MCP traffic needs only a bind, a listener, a route, and a backend:config.yaml and start the gateway:
http://localhost:3000.
Configuration reference
Static config
Global settings: logging, tracing, DNS, session keys, admin ports, and XDS connection.
Local config
Runtime configuration: binds, listeners, routes, backends, and policies.
Binds
Port bindings — the entry points for all incoming traffic.
Listeners
Virtual hosts, protocols, and TLS settings per port.
Routes
Traffic matching rules that connect listeners to backends.
Backends
Upstream MCP servers, A2A agents, and HTTP services.