Before starting this workshop, you will need:
- Solo.io Trial License Key: Enterprise Agentgateway requires a valid license key. You can obtain a free trial license by visiting Solo.io or contacting Solo.io sales.
- Kubernetes cluster (version 1.29.4 - 1.33.3 or compatible)
- kubectl CLI installed and configured
- helm CLI installed
See System Requirements for detailed cluster sizing, version support, and resource recommendations.
- Installation
- Routing
- Inference
- Security
- Rate Limiting
- Guardrails
- Transformations
- MCP (Model Context Protocol)
- Agent Frameworks
- Identity & Delegation
- Evaluations
- Load Testing
- Observability
- Upgrades & Lifecycle
- Platform Engineering
Start here. All other labs depend on these two.
OpenShift users: Use the OpenShift-specific versions instead:
Air-gapped / private-registry users: Use the air-gap variant that mirrors all chart-managed images into a private registry:
- Configure Mock OpenAI Server (OpenAI)
- Basic Routing to OpenAI (OpenAI)
- Routing by Match Type (Path, Header, Query Parameter) (OpenAI)
- Body-Based Routing (OpenAI + Mock LLM) (see also: Transformations)
- Semantic Routing with vLLM Semantic Router (OpenAI + vLLM Semantic Router) — one virtual model name routed to an economy, mid, or high tier model by prompt content, via ExtProc
- Routing to AWS Bedrock (AWS Bedrock)
- Routing to AWS Bedrock via API Keys (AWS Bedrock)
- AWS Bedrock with IRSA (AWS Bedrock / EKS)
- AWS Bedrock Titan Embeddings (AWS Bedrock)
- Routing to Anthropic (Anthropic)
- Routing to Groq (Groq) — OpenAI-compatible provider via
host/pathPrefixoverride - Routing to Azure OpenAI and Azure AI Foundry (Azure OpenAI / Azure AI Foundry)
- Azure OpenAI with Workload Identity (Azure OpenAI / AKS)
- Routing to Google Vertex AI (Google Vertex AI)
- Routing to Google Vertex AI via Service Account (Google Vertex AI)
- OpenAI Embeddings (OpenAI)
- OpenAI Batch API (OpenAI)
- OpenAI Streaming (OpenAI)
- OpenAI Audio (TTS & STT) (OpenAI)
- Direct Response
- Timeouts and Retries
- LLM Failover
- Advanced LLM Failover Patterns
- Inference Routing with vLLM (in-cluster vLLM + Gateway API Inference Extension)
- Virtual Keys (see also: Rate Limiting)
- JWT Auth with RBAC
- JWT Auth Through a Corporate Proxy (Tunnel) (Okta)
- JWT Auth Through a Corporate Proxy (Tunnel) (Entra)
- TLS Termination
- Frontend mTLS
- SNI Matching
- LLM BYO gRPC External Authorization (ext-authz)
- OPA Authorization
- Web Application Firewall (WAF) for Agentic Traffic (see also: Guardrails, MCP)
- MCP Eager OAuth with Auth0 (see also: MCP)
- MCP Eager OAuth with Okta (see also: MCP)
- MCP Pre-Issuance Entitlement Gating with Auth0 (see also: MCP, Identity & Delegation)
- Figma MCP with Auth0 + Token-Exchange Elicitation (see also: MCP, Identity & Delegation)
- Figma MCP with Microsoft Entra ID + Token-Exchange Elicitation (see also: MCP, Identity & Delegation)
- Local Token-Based Rate Limiting
- Global Rate Limiting (Request-Based & Token-Based)
- Virtual Keys (see also: Security)
- MCP Tool Rate Limiting (see also: MCP)
- Prompt Enrichment
- Request/Response Transformations
- Body-Based Routing (see also: Routing)
- In-Cluster MCP
- Remote MCP
- OpenAPI to MCP — External API
- OpenAPI to MCP — In-Cluster Deployment
- MCP Tool Federation
- Composable MCP — Tool Aggregation & Orchestration — one tool call fans out to distinct MCP + HTTP backends and merges the responses (vs. federation, which routes each call)
- MCP Tool Mode — Search
- MCP Tool Mode — Code
- MCP Tool Rate Limiting (see also: Rate Limiting)
- MCP BYO gRPC External Authorization (ext-authz) (see also: Security)
- MCP Eager OAuth with Auth0 (see also: Security, Identity & Delegation)
- MCP Eager OAuth with Okta (see also: Security, Identity & Delegation)
- MCP Pre-Issuance Entitlement Gating with Auth0 (see also: Security, Identity & Delegation)
- Figma MCP with Auth0 + Token-Exchange Elicitation — OpenAPI→MCP + eager OAuth (Auth0) + per-user Figma OAuth via elicitation (see also: Security, Identity & Delegation)
- Figma MCP with Microsoft Entra ID + Token-Exchange Elicitation — Entra front-door variant of the Auth0 lab (see also: Security, Identity & Delegation)
- CrewAI Agent with MCP and OBO Auth (see also: Identity & Delegation)
- Claude Code
- Keep Claude Code Authenticated with Per-User Auth0 Tokens (Auth0 / Anthropic) — per-user PKCE token renewed automatically via
apiKeyHelper - Claude Desktop
- Claude Code as MCP Client with Eager OAuth (Auth0)
- Claude Code as MCP Client with Eager OAuth (Okta)
- Claude Code → Figma MCP with Auth0 + Elicitation
- Claude Code → Figma MCP with Microsoft Entra ID + Elicitation
- OBO Token Exchange Fundamentals
- CrewAI Agent with MCP and OBO Auth (see also: MCP)
- Microsoft Entra ID OBO
- MCP Eager OAuth with Auth0 (see also: MCP)
- MCP Eager OAuth with Okta (see also: MCP)
- MCP Pre-Issuance Entitlement Gating with Auth0 (see also: MCP, Security)
- Figma MCP with Auth0 + Token-Exchange Elicitation — per-user credential forwarding to a vendor-provided IdP (Figma) via elicitation (see also: MCP, Security)
- Figma MCP with Microsoft Entra ID + Token-Exchange Elicitation — Entra front-door + Figma elicitation (why not OBO for a vendor-provided IdP) (see also: MCP, Security)
- LLM Cost Management (see also: Security, Rate Limiting)
- Production Observability, Alerting, and Scaling
Strategies for upgrading Enterprise Agentgateway without dropping traffic.
- Migration Guide: v2026.5.x → v2026.7.x — version-to-version deltas (image registry consolidation, Kubernetes floor, imagePullSecrets consolidation), prerequisites, and the exact upgrade commands
- In-Place Rolling Upgrades — Validate Zero Downtime
- Blue/Green Upgrades Across Namespaces
- Multi-Cluster Upgrades — upgrade a whole cluster while a peer serves the same global LLM over an ambient multicluster mesh
- MCP Endpoints, Delegated: Self-Service Within Guardrails — MCP servers are team workloads, so teams self-serve their endpoints; a platform chart owns the gateway, cost tiers, security, and URL space, and teams structurally cannot escape their tier, their prefix, or weaken a control (see also: Rate Limiting, Security, MCP)
- LLM Access, Centralized: The Platform as Provider — LLM backends are a vendor relationship, so the platform runs LLM consumption as an internal product: a model-alias catalog, per-team API keys and token budgets, one chart, no self-service
- Networking Architecture: Every Connection in a Single-Cluster Install — how the controller, proxies, extension services, and observability stack communicate: every port, protocol, and initiator, with a connection reference table for firewall and NetworkPolicy planning
- Admission Control with Kyverno
- Support Kubernetes Gateway API
- Install Enterprise Agentgateway
- Configure agentgateway for LLM, MCP, and A2A consumption
- Unified access point for consumption of LLMs
- LLM Providers supported in this repo:
- OpenAI
- AWS Bedrock (IAM credentials, API keys, and EKS IRSA)
- Anthropic (Claude)
- Azure OpenAI (API key and AKS Workload Identity)
- Google Vertex AI (user auth and GCP service account)
- Groq (and any other OpenAI-compatible provider, via a
host/pathPrefixoverride)
- OpenAI Embeddings support
- AWS Bedrock Titan embeddings support
- OpenAI Batches API support (asynchronous batch processing)
- Streaming responses support for real-time token generation
- OpenAI Audio API support (Text-to-Speech and Speech-to-Text)
- OpenAI Video Generation support (Sora)
- Claude Code CLI integration with full observability
- Claude Desktop integration as an MCP client
- CrewAI multi-agent workflow integration
- LangChain multi-agent pipeline integration
- LLM Providers supported in this repo:
- Identity & Delegation
- OBO (On-Behalf-Of) token exchange fundamentals (impersonation + delegation)
- CrewAI agent with MCP tools secured by OBO delegation
- Microsoft Entra ID On-Behalf-Of (OBO) token exchange
- LLM API Key Management
- API Key masking in logs
- Virtual keys — per-user API keys with independent token budgets and budget isolation
- Token-based metrics from LLM
- LLM request/response metadata in Traces
- Traffic Routing patterns (path, host, header, query parameter, request body)
- Semantic routing: one virtual model name (
auto_model) resolved to an economy, mid, or high tier model by prompt content, using vLLM Semantic Router as an ExtProc processor in thePreRoutingphase - Inference routing to in-cluster LLMs via the Gateway API Inference Extension (
InferencePool+llm-dEndpoint Picker) - Model Evaluations
- Security & Access Control
- Control access with org-specific API-key
- Control access with JWT authentication
- JWT-based RBAC (Role-Based Access Control)
- Keep an agent harness authenticated with Authorization Code + PKCE from a public client (no client secret) — Claude Code's
apiKeyHelperrenews a per-user Auth0 token silently, so the provider key never leaves the cluster and offboarding is an IdP action - Frontend TLS termination
- Frontend mTLS with client certificate validation
- SNI (Server Name Indication) matching for multi-domain HTTPS
- OPA authorization with custom Rego policies (ext-auth)
- BYO gRPC external authorization (ext-authz) for LLM and MCP routes
- Tunnel a backend connection (e.g. JWKS fetch) through a corporate forward proxy via
BackendTunnel(HTTPS_PROXY-style CONNECT)
- Prompt Guard & Content Moderation
- Comprehensive built-in Prompt Guard (prompt injection, jailbreak, PII, secrets, harmful content, encoding evasion, and more)
- External moderation guardrails (OpenAI moderation API)
- Advanced Webhook Prompt Guard
- Prompt Enrichment
- Rate Limiting
- Rate Limit on a per-request basis
- Local token-based rate limiting
- Global token-based rate limiting
- Request/Response Transformations
- Response transformations
- Header enrichment for observability
- MCP (Model Context Protocol)
- Route to in-cluster MCP servers
- Route to external/remote MCP servers through AgentGateway
- Dynamic MCP backends via label selectors (scale targets without editing the backend)
- Expose existing REST APIs as MCP tools from an OpenAPI spec (external public APIs and in-cluster services)
- Federate multiple MCP servers behind one backend (tool-name prefixing, FailOpen, per-persona tool filtering)
- Composite MCP tools that fan out to multiple MCP + HTTP backends and merge the responses — aggregation, sequential orchestration, and structured output
- MCP tool modes — Search (
get_tool/invoke_toolmeta-tools) and Code (run_codein a sandboxed JS runtime) - Secure MCP servers with JWT auth
- BYO gRPC external authorization (ext-authz) for MCP routes
- Eager OAuth with a pre-registered upstream IdP (Auth0 and Okta) — gateway acts as the OAuth Authorization Server visible to MCP clients
- Pre-issuance entitlement gating — gRPC ext_authz hook gates OAuth token issuance per user, redirects denied users to a configurable URL
- Two-layer OAuth for a real SaaS API (Figma) — eager OAuth front door (Auth0 or Microsoft Entra ID) plus per-user downstream credential forwarding to a vendor-provided IdP via token-exchange elicitation
- Tool-level access control
- Per-tool rate limiting for MCP traffic
- Integration with Claude Code CLI
- Direct Response / Health Checks
- Configure fixed responses without backend calls
- Timeouts and Retries
- Request timeout configuration
- Retry policies on specific error codes (503, etc.)
- Observing how timeouts and retries interact together
- LLM Failover
- Priority group failover between LLM providers
- Health-based routing across multiple backends
- Failover on rate limit errors (429)
- Intra-priority-group failover with per-provider eviction and P2C load balancing
- 5XX server-error failover via a CEL
unhealthyCondition
- Load Testing with k6
- Performance testing with k6 load generator
- LLM and MCP traffic load testing
- Ramping and constant load patterns
- Integration with Grafana and Prometheus metrics
- Observability & Cost Management
- Per-user / per-key LLM cost tracking and chargeback via access logs and PromQL
- Production observability, alerting, and autoscaling guidance
- Platform Engineering
- Platform/developer separation of concerns via two Helm charts
- Platform team owns the gateway, cost tiers, security baseline (JWT/WAF), observability, and URL space
- App teams self-serve LLM/MCP endpoints under a delegated path prefix without being able to set traffic policies
- Structural governance via route delegation (label + namespace + prefix contract) and a strict developer
values.schema.json - Assign and re-tier teams with a one-line platform values change; enable JWT gateway-wide without changing any team release
- Kubernetes 1.29.4 - 1.33.3
- Enterprise Agentgateway v2026.8.2
As a platform operator, I want the AI Gateway to apply granular token quotas and rate limits to requests based on either an API key or a user/group identified in a JSON Web Token (JWT), so that I can control costs, ensure fair resource usage, and have the necessary metrics and logs to enable real-time monitoring and accurate chargeback.
This section is a comprehensive list of all the functionality and data requirements.
- The AI Gateway must be able to authenticate requests using either a static API key or by validating a JWT.
- The gateway can be configured to identify the request source using the API key itself, or by extracting specific
user_idandgroup_idclaims from the JWT payload.
- The platform operator can define and apply token quotas and rate limits to individual API keys, specific users, or entire user groups.
- When a limit is reached, the gateway must enforce it by preventing further requests and returning an appropriate error response (e.g.,
429 Too Many Requests).
- The gateway must track and log the number of prompt and completion tokens for every request.
- Each log record must be tagged with the relevant identifier from the request (either the
api_key_idor theuser_idandgroup_idfrom the JWT).
- The gateway must generate structured, machine-readable logs for every request.
- These logs must include all relevant data points: a unique
request_id, timestamp,http_status_code,total_tokens, and the specific identifier of the request source. - The log format should be designed for easy ingestion into a centralized logging platform for long-term storage and detailed queries.
- The gateway must expose a
/metricsendpoint that provides real-time, Prometheus-compatible metrics. - The metrics must include dimensions that correspond to the request identifiers (
api_key_id,user_id,group_id) and key usage data (tokens_consumed_total). - This enables the operator to create real-time dashboards and configure automated alerts (e.g., "Alert me if the Marketing group's token usage exceeds 80% of their monthly quota").
- The combined logs and metrics must provide a complete and auditable data set that can be used to generate reports for cost attribution.
- The operator can easily query or export usage data aggregated by
api_key_id,user_id, orgroup_idover any given time period.
- The platform operator can manually set, adjust, and reset quotas for any user, group, or API key.
- The system can also be configured to perform automated, recurring quota resets (e.g., at the beginning of each calendar month).
This functionality is crucial for managing an enterprise-scale AI Gateway and directly addresses critical business needs:
- Financial Control: By setting and enforcing token quotas, the organization can prevent unexpected cost overruns and maintain predictable spending on AI services.
- Operational Excellence: Real-time metrics and detailed logs provide the necessary visibility to monitor system health, troubleshoot issues quickly, and ensure the gateway is performing as expected.
- Organizational Governance: The ability to track and attribute costs to specific teams or departments facilitates an accurate chargeback model, making business units accountable for their resource consumption and promoting efficient usage.
- Fair Access: Quotas and rate limits prevent a small number of users or applications from monopolizing resources and ensure that the AI services remain available and performant for all teams.
