Prerequisites
- LiteLLM Agent Platform running
- Cursor API key (from your Cursor account settings)
1. Add your Cursor API key
Open Settings β Credentials in the UI and add your Cursor API key. Or via the API:2. Select the built-in runtime
cursor is a built-in runtime. You do not need to register a custom runtime harness unless you are proxying through your own Cursor-compatible service.
3. Create an agent
In the UI, click New Agent, choosecursor as the runtime, and save.
Or via the API:
4. Start a session with repo context
Cursor sessions acceptenvironment fields for repository and PR settings:
5. Stream events
assistant, tool_call, status, result) are normalized to the Anthropic event surface:
See Internal SDK contract for the Rust SDK types.
Cursor sessions can start immediately when you include
prompt in the POST /session body.