For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Cursor
Configure Cursor AI code editor to use agentgateway
Configure Cursor, the AI code editor, to route requests to your LLM through your agentgateway proxy.
Before you begin
Tip
If you manage models and virtual API keys in the standalone Admin UI, Client Setup can generate the connection settings or snippet for this client. Review the gateway URL, select a model and key, choose the client from the Integration dropdown, and copy the recipe. Each recipe uses only the values that its client supports.
Client Setup generates client-side values from existing configuration. It does not create a route, model, authentication policy, virtual key, or provider credential. Follow the steps in this guide to configure those prerequisites or to set up the client manually.
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:3000Note
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.