Cursor
Configure Cursor, the AI code editor, to route requests to your LLM through your agentgateway proxy.
Before you begin
- Agentgateway running at
http://localhost:3000with a configured LLM backend. - Cursor installed (version 0.30 or later).
Example agentgateway configuration
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
llm:
port: 3000
models:
- name: "*"
provider: openAI
params:
apiKey: "$OPENAI_API_KEY"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 agentgateway address.
http://localhost:3000ℹ️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.