Install with agentgateway
This guide provides step-by-step instructions for integrating the vLLM Semantic Router with agentgateway on Kubernetes. agentgateway acts as the Gateway API data plane for OpenAI-compatible traffic, and vLLM Semantic Router runs as an Envoy ExtProc server that classifies each request and mutates the request body before agentgateway forwards it to vLLM.
Architecture Overview
The deployment consists of:
- vLLM Semantic Router: Provides prompt classification, model selection, request mutation, and response processing through ExtProc
- agentgateway: Provides the Kubernetes Gateway API proxy,
AgentgatewayBackend,HTTPRoute, andAgentgatewayPolicyresources - Demo vLLM-compatible backend: Serves a base model and LoRA adapters through an OpenAI-compatible API
Prerequisites
Before starting, ensure you have the following tools installed:
- kind - Kubernetes in Docker (Optional)
- kubectl - Kubernetes CLI
- Helm - Package manager for Kubernetes
This guide requires agentgateway v1.3.0-alpha.1 or newer because it uses the ExtProc processingOptions and allowModeOverride fields that were added after v1.2.1.
Step 1: Create Kind Cluster (Optional)
Create a local Kubernetes cluster for testing:
kind create cluster --name semantic-router-agentgateway
# Verify cluster is ready
kubectl wait --for=condition=Ready nodes --all --timeout=300s