Skip to main content
The Cursor SDK package runs Endor Labs Agent Kit workflows through Cursor’s Python SDK. Use it for automation, CI, backend services, orchestration, and scripted local or cloud runs. To install interactive agents into the Cursor IDE instead, use the Cursor plugin. The SDK package ships in the public distribution repository, endorlabs/ai-plugins, under cursor-sdk/. Clone the repository and run the commands below from its root. It includes a run_cursor_agent.py launcher, an agent_definitions.json agent map, generated prompt files, and a requirements.txt.
1

Install the dependency

Install the Cursor Python SDK dependency.
If you use uv, run uv pip install -r requirements.txt from the cursor-sdk directory instead.
2

Set your API key

Export your Cursor API key. Never paste it into a prompt.
3

Run an agent

Run a read-only agent against a local workspace.
To run against a Cursor cloud agent, pass --mode cloud with a repository URL and ref.
Cloud SDK agents appear in Cursor Web or the Cursor agents window under Filter > Source > SDK.

Safety

  • Setup is readiness guidance only. It does not run endorctl scan or endorctl host-check.
  • Mutating agents still require separate approval for file edits, branch pushes, PR or MR creation, comments, tickets, and Endor Labs policy writes.
  • Never paste Cursor, Endor Labs, source-provider, or package-registry secrets into prompts. Use the CURSOR_API_KEY environment variable for the SDK key.
See the Agent Kit overview for the full agent catalog, and the safety model for the complete safety contract.