Skip to content
agentgateway has joined the Agentic AI FoundationLearn more

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

Overview

Page as Markdown

Learn about the different policy sections.

The AgentgatewayPolicy custom resource lets you apply traffic management, security, observability, and backend connection policies to your agentgateway resources.

Policy sections

Each AgentgatewayPolicy has three top-level sections in the spec field that control different stages of request processing. You can include one or more of these sections in a single policy.

SectionDescriptionAvailable fields
frontendControls how the gateway accepts incoming connections. Applies at the gateway level before routing decisions.tcp, tls, http, networkAuthorization, accessLog, tracing
trafficControls how agentgateway processes traffic. Applies at the listener, route, or route rule level. Fields are listed in execution order.cors, jwtAuthentication, basicAuthentication, apiKeyAuthentication, extAuth, authorization, rateLimit, extProc, transformation, csrf, headerModifiers, hostRewrite, directResponse, buffer, timeouts, retry
backendControls how agentgateway connects to destination backends. Applies at the backend, service, route, or gateway level.tcp, tls, http, tunnel, transformation, auth, extAuth, health, ai, mcp

Backend policy fields

A traffic policy processes a request as it passes through a Gateway listener or route. A backend policy applies to the destination that agentgateway selects for that request, and each field configures one aspect of the connection to it.

Combine fields in one policy when they share a target and a lifecycle. For the resources that each field can attach to, and for how two policies that set the same field merge, see Targeting and merging.

FieldPurposeGuide
backend.tcpSet the connection timeout and TCP keepalive probes.Backend timeouts and HTTP connection settings
backend.httpSelect the upstream HTTP version and set the backend response deadline.Backend timeouts and HTTP connection settings
backend.tlsOriginate TLS or mutual TLS (mTLS) and configure certificate validation.Backend TLS
backend.tunnelReach the destination through an HTTP CONNECT proxy.Policy API reference
backend.authAdd credentials or exchange, sign, or pass through tokens for the destination.Backend authentication
backend.extAuthRun external authorization after agentgateway selects the destination.Bring your own external authorization service
backend.transformationTransform requests sent to the destination and responses returned from it.Transformations
backend.healthDetect unhealthy endpoints, evict them, and restore them after recovery.Backend health
backend.aiConfigure prompt guards, routing, transformations, and other AI-specific behavior.LLM features
backend.mcpConfigure Model Context Protocol (MCP) authorization, authentication, and guardrails.MCP features

Example guides

Check out the following sections for policy examples.

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/.