Cursor
Configure Cursor, the AI code editor, to route requests to your LLM through your agentgateway proxy.
Before you begin
Get the gateway URL
export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
-o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "Gateway address: $INGRESS_GW_ADDRESS"export INGRESS_GW_ADDRESS=$(kubectl get svc -n agentgateway-system agentgateway-proxy \
-o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
echo "Gateway address: $INGRESS_GW_ADDRESS"After port-forwarding, the gateway is accessible at http://localhost:8080. Use localhost:8080 wherever the instructions reference $INGRESS_GW_ADDRESS.
kubectl port-forward -n agentgateway-system svc/agentgateway-proxy 8080:80Configure Cursor
Open the Cursor Settings.
- macOS:
Cmd + ,or Cursor → Settings - Windows/Linux:
Ctrl + ,or File → Preferences → Settings
- macOS:
Navigate to the Models tab.
Enable Override OpenAI Base URL and enter your gateway address and the route path from your HTTPRoute configuration.
http://<INGRESS_GW_ADDRESS>/<route-path>For example, if your HTTPRoute uses path
/openaion yourai-example.comsecured host, usehttps://ai-example.com/openai.ℹ️You do not need to provide LLM provider credentials (such as an API key) through Cursor. The credentials are configured in agentgateway. Toggle off any API key overrides in Cursor.
Verify the connection
- Open the Cursor chat panel (
Cmd + Lon macOS,Ctrl + Lon Windows/Linux). - Send a message such as “test”.
- Cursor responds through your agentgateway backend.