Skip to content

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”
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”
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”
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
alpnarray
certstring
hostnamestring
insecureboolean
insecureHostboolean
keystring
rootstring
subjectAltNamesarray

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
nameResourceName
phasePolicyPhasephase defines at what level the policy runs at. Gateway policies run pre-routing, while Route policies apply post-routing. Only a subset of policies are eligible as Gateway policies. In general, norma… Default: route.
policyFilterOrPolicy
targetPolicyTarget

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 using API Keys
authorizationAuthorizationAuthorization policies for HTTP access.
backendAuthBackendAuthAuthenticate to the backend.
backendTLSLocalBackendTLSSend TLS to the backend.
backendTunnelTunnelTunnel to the backend.
basicAuthLocalBasicAuthAuthenticate incoming requests using Basic Authentication with htpasswd.
corsCorsSerdeHandle CORS preflight requests and append configured CORS headers to applicable requests.
csrfCsrfHandle CSRF protection by validating request origins against configured allowed origins.
directResponseDirectResponseDirectly respond to the request with a static response.
extAuthzExtAuthzAuthenticate incoming requests by calling an external authorization server.
extProcExtProcExtend agentgateway with an external processor
jwtAuthLocalJwtConfigAuthenticate incoming JWT requests.
localRateLimitarray of RateLimitSpecRate limit incoming requests. State is kept local.
mcpAuthenticationLocalMcpAuthenticationAuthentication for MCP clients.
mcpAuthorizationMcpAuthorizationAuthorization policies for MCP access.
oidcLocalOidcConfigAuthenticate incoming browser requests with OIDC authorization code flow.
remoteRateLimitRemoteRateLimitRate limit incoming requests. State is managed by a remote server.
requestHeaderModifierHeaderModifierHeaders to be modified in the request.
requestMirrorRequestMirrorMirror incoming requests to another destination.
requestRedirectRequestRedirectDirectly respond to the request with a redirect.
responseHeaderModifierHeaderModifierHeaders to be modified in the response.
retryPolicy3Retry matching requests.
timeoutPolicy2Timeout requests that exceed the configured duration.
transformationsLocalTransformationConfigModify requests and responses
urlRewriteUrlRewriteModify the URL path or authority.

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
allowCredentialsboolean
allowHeadersarray
allowMethodsarray
allowOriginsarray
exposeHeadersarray
maxAgestring

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
fillIntervalstring
maxTokensinteger
tokensPerFillinteger
typeRateLimitTypeDefault: 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.
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.
tracingTracingConfig

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

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
backendTLSLocalBackendTLSbackendTLS configures TLS 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
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.
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)
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
failureModeFailureMode4Behavior 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
failureModeFailureMode4Behavior 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
audiencesarray
authorizationLocationAuthorizationLocationDefault: map[header:map[name:authorization prefix:Bearer ]].
issuerstring
jwksFileInlineOrRemote
jwtValidationOptionsJWTValidationOptions
modeMcpAuthenticationModeDefault: strict.
providerMcpIDP
resourceMetadataResourceMetadata

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.
pathstringDefault: /v1/traces.
policiesSimpleLocalBackendPoliciesPolicies to connect to the backend
protocolTracingProtocolDefault: 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/.