Cursor
Configure Cursor AI code editor to use agentgateway running in Kubernetes
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"Configure 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.