Skip to content
✨ agentgateway has joined the Agentic AI Foundation (AAIF) — Learn more

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Page as Markdown

Configuration schema

Configuration reference for agentgateway configuration schema.

Generated from the agentgateway JSON schema.


Global Config

Top-level settings for DNS, admin, networking, observability, and session management.

Schema type: RawConfig

Global Config can be configured in the following sections:

config

You can configure the following fields:

FieldTypeDescription
additionalTrustDomainsstringComma-separated list of additional SPIFFE trust domains accepted on inbound HBONE connections. The local trust_domain is always implicitly included.
adminAddrstringAdmin UI address in the format “ip:port”, “localhost:port”, “unix:/path/to/socket”, or “off”
backendBackendConfigDefault: map[connectTimeout:10s keepalives:map[enabled:true interval:3m0s retries:9 time:3m0s] poolIdleTimeout:1m30s poolMaxSize:<nil>].
caAddressstring
caAuthTokenstring
clusterIdstring
connectionMinTerminationDeadlinestring
connectionTerminationDeadlinestring
dnsRawDnsConfigDNS resolver settings.
enableIpv6boolean
gatewaystring
hboneRawHBONE
localXdsPathstringLocal XDS path. If not specified, the current configuration file will be used.
loggingRawLogging
mcpRawMcpConfigMCP gateway settings.
metricsRawMetrics
namespacestring
networkstring
readinessAddrstringReadiness probe server address in the format “ip:port”, “localhost:port”, “unix:/path/to/socket”, or “off”
serviceAccountstring
sessionRawSessionConfiguration for stateful session management
skipValidateTrustDomainbooleanWhen true, skip SPIFFE trust-domain verification on inbound HBONE connections.
statsAddrstringStats/metrics server address in the format “ip:port”, “localhost:port”, “unix:/path/to/socket”, or “off”
tracingRawTracing
trustDomainstring
workerThreadsstring
xdsAddressstring
xdsAuthTokenstring

Binds & Listeners

Configure ports, listeners, hostnames, TLS, and routing.

Schema type: LocalBind

Binds & Listeners can be configured in the following sections:

binds[]

You can configure the following fields:

FieldTypeDescription
listenersarray of LocalListener
portinteger
tunnelProtocolTunnelProtocolDefault: direct.

Listener

Configure a listener within a bind, including hostname, protocol, TLS, and routes.

Schema type: LocalListener

Listener can be configured in the following sections:

binds[].listeners[]

You can configure the following fields:

FieldTypeDescription
hostnamestringCan be a wildcard
namestring
namespacestring
policiesLocalGatewayPolicy
protocolLocalListenerProtocol
routesarray of LocalRoute
tcpRoutesarray of LocalTCPRoute
tlsLocalTLSServerConfig

Route

Define an HTTP route with matching rules, backends, and inline policies.

Schema type: LocalRoute

Route can be configured in the following sections:

binds[].listeners[].routes[]
routeGroups[].routes[]

You can configure the following fields:

FieldTypeDescription
backendsarray of LocalRouteBackend
hostnamesarrayCan be a wildcard
matchesarray of RouteMatchDefault: [map[path:map[pathPrefix:/]]].
namestring
namespacestring
policiesFilterOrPolicy
ruleNamestring

Backends

Define backend targets including AI providers, static hosts, and load balancing.

Schema type: FullLocalBackend

Backends can be configured in the following sections:

backends[]

You can configure the following fields:

FieldTypeDescription
namestring
policiesLocalBackendPolicies

Backend TLS

TLS settings for backend connections.

Schema type: LocalBackendTLS

Backend TLS can be configured in the following sections:

backends[].policies.backendTLS
binds[].listeners[].policies.extAuthz.policies.backendTLS
binds[].listeners[].policies.extProc.policies.backendTLS
binds[].listeners[].routes[].backends[].policies.backendTLS
binds[].listeners[].routes[].policies.backendTLS
binds[].listeners[].routes[].policies.extAuthz.policies.backendTLS
binds[].listeners[].routes[].policies.extProc.policies.backendTLS
binds[].listeners[].routes[].policies.remoteRateLimit.policies.backendTLS
binds[].listeners[].tcpRoutes[].backends[].policies.backendTLS
binds[].listeners[].tcpRoutes[].policies.backendTLS
frontendPolicies.accessLog.otlp.policies.backendTLS
frontendPolicies.tracing.policies.backendTLS
llm.models[].backendTLS
llm.policies.extAuthz.policies.backendTLS
llm.policies.extProc.policies.backendTLS
mcp.policies.backendTLS
mcp.policies.extAuthz.policies.backendTLS
mcp.policies.extProc.policies.backendTLS
mcp.policies.remoteRateLimit.policies.backendTLS
mcp.targets[].policies.backendTLS
policies[].policy.backendTLS
policies[].policy.extAuthz.policies.backendTLS
policies[].policy.extProc.policies.backendTLS
policies[].policy.remoteRateLimit.policies.backendTLS
routeGroups[].routes[].backends[].policies.backendTLS
routeGroups[].routes[].policies.backendTLS
routeGroups[].routes[].policies.extAuthz.policies.backendTLS
routeGroups[].routes[].policies.extProc.policies.backendTLS
routeGroups[].routes[].policies.remoteRateLimit.policies.backendTLS

You can configure the following fields:

FieldTypeDescription
alpnarrayALPN protocols to offer to the backend.
certstringClient certificate file to present to the backend.
hostnamestringServer name to use for TLS verification and SNI.
insecurebooleanSkip certificate trust verification for the backend connection.
insecureHostbooleanSkip hostname verification for the backend certificate.
keystringPrivate key file for the client certificate.
keyExchangeGroupsarray of KeyExchangeGroupKey exchange groups allowed for negotiating TLS.
rootstringRoot certificate bundle used to verify the backend certificate.
subjectAltNamesarrayAdditional subject alternative names accepted for the backend certificate.

Policies

Attach reusable policies for authentication, rate limiting, authorization, and more.

Schema type: LocalPolicy

Policies can be configured in the following sections:

policies[]

You can configure the following fields:

FieldTypeDescription
nameResourceNamePolicy name used when attaching this policy to a target.
phasePolicyPhaseWhen the policy runs. Gateway policies run before route selection, while route policies run after route selection. Use route policies by default unless the policy needs to affect route selection. Default: route.
policyFilterOrPolicyPolicy settings to apply to the selected target.
targetPolicyTargetGateway, listener, route, or backend that this policy attaches to.

Policy & Filter Fields

All available policy and filter fields that can be used inline on routes, listeners, gateways, and backends.

Schema type: FilterOrPolicy

Policy & Filter Fields can be configured in the following sections:

binds[].listeners[].routes[].policies
mcp.policies
policies[].policy
routeGroups[].routes[].policies

You can configure the following fields:

FieldTypeDescription
a2aA2aPolicyMark this traffic as A2A to enable A2A processing and telemetry.
aiPolicyMark this as LLM traffic to enable LLM processing.
apiKeyLocalAPIKeysAuthenticate incoming requests with API keys.
authorizationAuthorizationAuthorization rules for incoming HTTP requests.
backendAuthBackendAuthAuthentication credentials sent to the backend.
backendTLSLocalBackendTLSTLS settings used when connecting to the backend.
backendTunnelTunnelTunnel settings used when connecting to the backend.
basicAuthLocalBasicAuthAuthenticate incoming requests with Basic Auth credentials from an htpasswd user database.
bufferBufferBuffer request and response bodies.
corsCorsSerdeHandle CORS preflight requests and append configured CORS headers to applicable requests.
csrfCsrfHandle CSRF protection by validating request origins against configured allowed origins.
directResponseLocalExplicitOrConditionalReturn a configured response instead of forwarding the request.
extAuthzLocalExplicitOrConditional3Authorize incoming requests by calling an external authorization service.
extProcLocalExplicitOrConditional4Send request and response data to an external processing service.
jwtAuthLocalJwtConfigAuthenticate incoming requests with JWT bearer tokens.
localRateLimitLocalRateLimitPolicyLocal rate limits for incoming requests.
mcpAuthenticationLocalMcpAuthenticationAuthenticate MCP clients.
mcpAuthorizationMcpAuthorizationAuthorization rules for MCP requests.
oidcLocalOidcConfigAuthenticate browser requests with OIDC authorization code flow.
remoteRateLimitLocalExplicitOrConditional2Remote rate limit checks for incoming requests.
requestHeaderModifierHeaderModifierModify request headers before forwarding.
requestMirrorRequestMirrorSend a copy of matching requests to another backend.
requestRedirectRequestRedirectReturn a redirect response instead of forwarding the request.
responseHeaderModifierHeaderModifierModify response headers before returning to the client.
retryPolicy3Retry matching failed upstream requests.
timeoutPolicy2Set request timeout limits.
transformationsLocalExplicitOrConditional5Modify request and response headers, bodies, or metadata.
urlRewriteUrlRewriteRewrite the request path or authority before forwarding.

CORS

Cross-Origin Resource Sharing (CORS) policy configuration.

Schema type: CorsSerde

CORS can be configured in the following sections:

binds[].listeners[].routes[].policies.cors
mcp.policies.cors
policies[].policy.cors
routeGroups[].routes[].policies.cors

You can configure the following fields:

FieldTypeDescription
allowCredentialsbooleanAdd Access-Control-Allow-Credentials: true on allowed CORS responses.
allowHeadersarrayValues to return in Access-Control-Allow-Headers for allowed preflight requests.
allowMethodsarrayValues to return in Access-Control-Allow-Methods for allowed preflight requests.
allowOriginsarrayRequest origins that receive CORS response headers. Use * to match any origin.
exposeHeadersarrayValues to return in Access-Control-Expose-Headers for allowed CORS responses.
maxAgestringValue to return in Access-Control-Max-Age for allowed preflight requests.

Rate Limiting

Rate limit configuration for controlling request throughput.

Schema type: RateLimitSpec

Rate Limiting can be configured in the following sections:

binds[].listeners[].routes[].policies.localRateLimit[]
mcp.policies.localRateLimit[]
policies[].policy.localRateLimit[]
routeGroups[].routes[].policies.localRateLimit[]

You can configure the following fields:

FieldTypeDescription
fillIntervalstringHow often the local bucket is refilled.
maxTokensintegerMaximum number of tokens that can accumulate in the local bucket.
tokensPerFillintegerNumber of tokens added to the local bucket each fill interval.
typeRateLimitTypeWhether this limit counts requests or LLM tokens. Default: requests.

OIDC Authentication

Browser-based OIDC authentication policy using authorization code flow.

Schema type: LocalOidcConfig

OIDC Authentication can be configured in the following sections:

binds[].listeners[].policies.oidc
binds[].listeners[].routes[].policies.oidc
llm.policies.oidc
mcp.policies.oidc
policies[].policy.oidc
routeGroups[].routes[].policies.oidc

Browser-based OIDC authentication policy. Explicit mode is still OIDC: it supplies provider metadata manually instead of using discovery. Unauthenticated non-callback requests always redirect to the provider login flow. Routes that need non-redirect authentication behavior should use a different auth policy.

You can configure the following fields:

FieldTypeDescription
authorizationEndpointstringAuthorization endpoint used to start the browser login flow.
clientIdstringOAuth2 client identifier used for authorization and token exchange.
clientSecretstringOAuth2 client secret used for token exchange.
discoveryFileInlineOrRemoteOptional discovery document override. If omitted, discovery uses ${issuer}/.well-known/openid-configuration.
issuerstringIssuer used for discovery and ID token validation.
jwksFileInlineOrRemoteJWKS source used to validate returned ID tokens.
redirectURIstringAbsolute callback URI handled by the gateway. This policy always redirects unauthenticated non-callback requests back through this login flow.
scopesarrayAdditional OAuth2 scopes to request. openid is always included.
tokenEndpointstringToken endpoint used to exchange the authorization code.
tokenEndpointAuthTokenEndpointAuthToken endpoint client authentication method for explicit provider configuration. Discovery mode derives this from provider metadata. Explicit mode defaults to clientSecretBasic when omitted.

Frontend Policies

Gateway-wide policies applied to all incoming traffic.

Schema type: LocalFrontendPolicies

Frontend Policies can be configured in the following sections:

frontendPolicies

You can configure the following fields:

FieldTypeDescription
accessLogLoggingPolicySettings for request access logs.
connectConnectEnable or disable downstream HTTP CONNECT handling.
httpHTTP2Settings for handling incoming HTTP requests.
networkAuthorizationNetworkAuthorizationCEL authorization for downstream network connections.
proxyProtocolProxyEnable downstream PROXY protocol handling on this gateway or port, including version matching and whether PROXY headers are required or optional.
tcpTCP2Settings for handling incoming TCP connections.
tlsTLSSettings for handling incoming TLS connections.
tracingTracingConfigSettings for exporting request traces.

LLM Gateway

Configure the LLM gateway with models, providers, and prompt guards.

Schema type: LocalLLMConfig

LLM Gateway can be configured in the following sections:

llm

You can configure the following fields:

FieldTypeDescription
modelsarray of LocalLLMModelsmodels defines the set of models that can be served by this gateway. The model name refers to the model in the users request that is matched; the model sent to the actual LLM can be overridden on a pe…
policiesLocalLLMPolicypolicies defines policies for handling incoming requests, before a model is selected
portinteger
tlsLocalTLSServerConfig

LLM Models

Configure an LLM model with provider, prompt guards, and caching.

Schema type: LocalLLMModels

LLM Models can be configured in the following sections:

llm.models[]

You can configure the following fields:

FieldTypeDescription
authBackendAuthauth configures authentication when connecting to the LLM provider.
backendTunnelTunnelbackendTunnel configures tunneling when connecting to the LLM provider.
defaultsobjectdefaults allows setting default values for the request. If these are not present in the request body, they will be set. To override even when set, use overrides.
guardrailsPromptGuardguardrails to apply to the request or response
healthLocalHealthPolicyhealth configures outlier detection for this model backend.
matchesarray of LLMRouteMatchmatches specifies the conditions under which this model should be used in addition to matching the model name.
namestringname is the name of the model we are matching from a users request. If params.model is set, that will be used in the request to the LLM provider. If not, the incoming model is used.
overridesobjectoverrides allows setting values for the request, overriding any existing values
paramsLocalLLMParamsparams customizes parameters for the outgoing request
passthroughLocalLLMPassthroughpassthrough controls how requests are handled. By default, requests will be parsed and translated as needed. With passthrough, they will be unmodified and optionally inspected (with detect). In this…
promptCachingPromptCachingConfigpromptCaching configures cache point insertion for supported LLM providers.
providerLocalModelAIProviderprovider of the LLM we are connecting too
requestHeadersHeaderModifierrequestHeaders modifies headers in requests to the LLM provider.
responseHeadersHeaderModifierresponseHeaders modifies headers in responses from the LLM provider.
tlsLocalBackendTLStls configures TLS when connecting to the LLM provider.
transformationobjecttransformation allows setting values from CEL expressions for the request, overriding any existing values.

LLM Parameters

Parameters for LLM model routing, failover, and spending limits.

Schema type: LocalLLMParams

LLM Parameters can be configured in the following sections:

llm.models[].params

You can configure the following fields:

FieldTypeDescription
apiKeySecretFromFileAn API key to attach to the request. If unset this will be automatically detected from the environment.
awsRegionstring
azureApiVersionstringFor Azure: the API version to use
azureProjectNamestringFor Azure: the Foundry project name (required for foundry resource type)
azureResourceNamestringFor Azure: the resource name of the deployment
azureResourceTypeAzureResourceTypeFor Azure: the type of Azure endpoint (openAI or foundry)
baseUrlstringBase URL for the upstream provider. Expands to hostOverride, pathPrefix, and tls for https URLs.
hostOverridestringOverride the upstream host for this provider.
modelstringThe model to send to the provider. If unset, the same model will be used from the request.
pathOverridestringOverride the upstream path for this provider.
pathPrefixstringOverride the default base path prefix for this provider.
tokenizebooleanWhether to tokenize the request before forwarding it upstream.
vertexProjectstring
vertexRegionstring

MCP Gateway

Configure the MCP gateway with targets, authentication, and fan-out behavior.

Schema type: LocalSimpleMcpConfig

MCP Gateway can be configured in the following sections:

mcp

You can configure the following fields:

FieldTypeDescription
failureModeFailureMode5Behavior when one or more MCP targets fail to initialize or fail during fanout. Defaults to failClosed.
policiesFilterOrPolicy
portinteger
prefixModeMcpPrefixMode
statefulModeMcpStatefulMode
targetsarray of LocalMcpTarget

MCP Backend

Configure an MCP backend target with transport and authentication.

Schema type: LocalMcpBackend

You can configure the following fields:

FieldTypeDescription
failureModeFailureMode5Behavior when one or more MCP targets fail to initialize or fail during fanout. Defaults to failClosed.
prefixModeMcpPrefixMode
statefulModeMcpStatefulMode
targetsarray of LocalMcpTarget

MCP Authentication

Authentication settings for MCP clients using OAuth/OIDC.

Schema type: LocalMcpAuthentication

MCP Authentication can be configured in the following sections:

binds[].listeners[].routes[].policies.mcpAuthentication
mcp.policies.mcpAuthentication
policies[].policy.mcpAuthentication
routeGroups[].routes[].policies.mcpAuthentication

You can configure the following fields:

FieldTypeDescription
audiencesarrayAccepted token audiences, matched against the JWT aud claim.
authorizationLocationAuthorizationLocationWhere to read the JWT from in incoming MCP requests. Default: map[header:map[name:authorization prefix:Bearer ]].
clientIdstringOAuth client ID advertised to MCP clients when needed.
issuerstringExpected token issuer, matched against the JWT iss claim.
jwksFileInlineOrRemoteJSON Web Key Set used to verify token signatures. Can be inline, from a file, or fetched remotely.
jwtValidationOptionsJWTValidationOptionsClaim requirements to enforce after the token signature is verified.
modeMcpAuthenticationModeControls whether MCP requests must include a valid JWT. Default: strict.
providerMcpIDPIdentity provider type used to derive MCP authorization metadata and default JWKS URLs.
resourceMetadataResourceMetadataProtected resource metadata returned to MCP clients.

Tracing

Configuration for distributed tracing with OpenTelemetry.

Schema type: TracingConfig

Tracing can be configured in the following sections:

frontendPolicies.tracing

Configuration for dynamic tracing policy

You can configure the following fields:

FieldTypeDescription
attributesOrderedStringMap_ExpressionSpan attributes to add, keyed by attribute name.
clientSamplingExpressionOptional per-policy override for client sampling. If set, overrides global config for requests that use this frontend policy.
pathstringOTLP HTTP path used to export traces. Default: /v1/traces.
policiesSimpleLocalBackendPoliciesBackend policies used when exporting traces.
protocolTracingProtocolOTLP protocol used to export traces. Defaults to HTTP. Default: grpc.
randomSamplingExpressionOptional per-policy override for random sampling. If set, overrides global config for requests that use this frontend policy.
removearrayAttribute keys to remove from the emitted span attributes. This is applied before attributes are evaluated/added, so it can be used to drop default attributes or avoid duplication.
resourcesOrderedStringMap_ExpressionResource attributes to add to the tracer provider (OTel Resource). This can be used to set things like service.name dynamically.
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.