cursor-sdk
Python client for the Cursor SDK bridge.
What it is and what it does
cursor-sdk is a Python client for Cursor's agent platform, allowing you to script and automate the same AI agent that powers the Cursor IDE, CLI, and web app. It provides both synchronous and asynchronous interfaces to create and manage agents, with support for cloud-based agents that can run on empty VMs without a repository.
The SDK is in public beta and actively maintained, with wheels available for macOS, Linux, and Windows. It depends only on httpx for HTTP communication. Cloud agents can report billed token usage and dollar costs per run (server-derived and eventually consistent), though local agents are not yet supported. The package requires Python 3.10 or later and uses a shared versioning scheme with the JavaScript SDK starting from version 1.0.24.
Use it for:
- Automate code generation and refactoring tasks by scripting Cursor agents in CI/CD pipelines or batch processing workflows.
- Build no-repo cloud agents that run on ephemeral infrastructure without cloning a repository, for serverless or containerized agent execution.
- Track and monitor agent usage costs programmatically by querying per-run token consumption and billing data from cloud agents.
- Integrate Cursor's AI capabilities into custom Python applications via sync or async client APIs.
- Test and validate agent behavior across multiple environments by controlling agent creation and execution from Python scripts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for scripting Cursor agents with sync and async clients, enabling programmatic control of the same agent that runs in the Cursor IDE, CLI, and web app.
Yes, with conditions. The SDK is actively maintained and has no known vulnerabilities, but it is in public beta—APIs may change before general availability. Install if you need programmatic control of Cursor agents or are building cloud-based automation. Verify Cursor's proprietary license terms for your use case before integrating into production or commercial projects.
Install
cursor-sdk on PyPI
pip
pip install cursor-sdkuv
uv add cursor-sdkpoetry
poetry add cursor-sdkInstalling cursor-sdk
Before you install
Active maintenance with a release 1 day old. Medium install friction due to platform-specific wheels (macOS arm64/x64, Linux arm64/x64, Windows x64), but straightforward pip installation. Single runtime dependency on httpx.
License in practice
Licensed as Proprietary with unclear treatment. No standard SPDX identifier available. Users should review Cursor's licensing terms before integrating into commercial or redistributed projects.
Quickstart
pip install cursor-sdk
from cursor_sdk import Cursor
client = Cursor()
agent = client.agents.create(cloud=CloudAgentOptions(repos=[]))
Requires Python 3.10 or later. Cloud agents must be enabled for your account or team; repository-scoped API keys cannot create no-repo agents.
Verify before relying
- Whether the SDK's public-beta status implies breaking API changes are still expected before general availability.
- Cost calculation accuracy and eventual consistency guarantees for cloud agent usage billing.
- Support timeline and roadmap for local agents beyond current cloud-only implementation.
Package facts
| License | Proprietary (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — httpx |
| Maintenance | actively maintained — 1 days since the last release |
| First released | |
| Downloads | 383,602/month — #7,075 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cursor_sdk-1.0.28-py3-none-macosx_11_0_arm64.whl; cursor_sdk-1.0.28-py3-none-macosx_11_0_x86_64.whl; cursor_sdk-1.0.28-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; cursor_sdk-1.0.28-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; cursor_sdk-1.0.28-py3-none-win_amd64.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
hud-sdkHud-sdk is a lightweight runtime sensor that…
unclear · top 15,000 on PyPI
plato-sdkPlato SDK is a Python client library for…
unclear · top 15,000 on PyPI
clawmetryClawMetry provides a real-time observability…
permissive · top 15,000 on PyPI
deepagents-codeA terminal-based AI coding agent that works…
permissive · top 15,000 on PyPI
openhands-sdkOpenHands SDK provides Python and REST APIs for…
unclear · top 5,000 on PyPI
openhands-workspaceProvides Python and REST APIs for building…
unclear · top 15,000 on PyPI
openhands-toolsProvides Python and REST APIs for building AI…
unclear · top 5,000 on PyPI
openhands-aiOpenHands is a self-hosted developer control…
permissive · top 5,000 on PyPI
detect_agentDetects whether code is running in an AI agent…
unclear · top 15,000 on PyPI
pairmuxpairmux lets AI agents control interactive…
permissive · top 15,000 on PyPI