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.
python3 -m pip install -r cursor-sdk/requirements.txt
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.
export CURSOR_API_KEY="crsr_..."
3

Run an agent

Run a read-only agent against a local workspace.
python cursor-sdk/run_cursor_agent.py endor-probe-droid-agent \
  --workspace /path/to/repo \
  "Explain what evidence you need to assess GitHub onboarding gaps. Keep it read-only."
To run against a Cursor cloud agent, pass --mode cloud with a repository URL and ref.
python cursor-sdk/run_cursor_agent.py endor-sca-remediation-agent \
  --mode cloud \
  --repo-url https://github.com/your-org/your-repo \
  --ref main \
  "Prepare a remediation plan only. Do not edit files or open a PR."
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.