Cursor API SDK for cloud agents, runs, artifacts, workers, models, repositories, and raw requests.
- cursor
- cloud-agents
- api
- sdk
- automation
- License
- MIT
- Published
- July 20, 2026
- Pinned commit
b6a74b3- Rating
- ★ 5.0 (1)
- Forks
- 2
- Stars
- 1
- Adaptation effort
- 1.0
One-click install
Install forks this package into your account and publishes it right away when it passes the standard package checks. An admin reviewed and trusted this exact version.
Log in to install this package.
Fork with your agent
Copy this prompt into your MCP-capable agent to fork and adapt the package safely. Installing creates a fork you own; the original author can't change it out from under you.
Use Kody to fork the community package "@kody/cursor" (listing id: ae5d80a6-eb3a-47a9-95fd-df242778699b). Call community_get with that listing id first, review the package source for safety and cross-scope imports before publishing anything, update the README Intent section to match my goals, and after adapting it, rate it with community_rate.
README
@kody/cursor
Intent
SDK for the Cursor Cloud Agents API. Transport is one compact authenticated request helper against https://api.cursor.com (Bearer {{secret:cursorApiKey}}). Domain modules keep agent lifecycle conveniences, artifact download shaping, run stream parsing, and GitHub PR enrichment. Use ./request for any unwrapped path (Enterprise Admin, Analytics, AI-Code-Tracking, Bugbot, etc.).
No public Cursor OpenAPI document was available for scaffolding; plumbing is intentionally thin rather than hand-rolled per endpoint.
When To Use
- Launch or manage Cursor Cloud Agents (create, list, follow-up runs, artifacts).
- Inspect fleet/worker utilization for self-hosted pools.
- Discover models and accessible GitHub repositories before creating agents.
- Call unwrapped Cursor API endpoints via
cursorRequest.
Required setup
- Secret
cursorApiKey(user scope): raw API key from cursor.com/dashboard → API Keys (key only, not an Authorization header). Cursor accepts Basic (API_KEY:) or Bearer; this package uses Bearer. - Optional
githubPersonalAccessToken: only foragentsWithOpenGithubPrs.
Exports
| Export | Description |
|---|---|
. | Package overview and domain map |
./request | cursorRequest — raw API escape hatch |
./agents | createAgent, listAgents, getAgent, archiveAgent, unarchiveAgent, deleteAgent, agentStatusOverview, agentsWithOpenGithubPrs |
./runs | createRun, listRuns, getRun, cancelRun, getAgentUsage, readRunStream |
./artifacts | listArtifacts, downloadArtifact |
./workers | listWorkers, getFleetSummary, getWorker, listPendingPoolRequests, createWorkerToken |
./models | listModels |
./repositories | listRepositories |
./me | apiKeyInfo |
Default exports: ./request → cursorRequest; ./agents → listAgents; ./runs → listRuns; ./artifacts → listArtifacts; ./workers → getFleetSummary; ./models → listModels; ./repositories → listRepositories; ./me → apiKeyInfo.
Example
import { createAgent } from 'kody:@kody/cursor/agents'
import { createRun } from 'kody:@kody/cursor/runs'
const { agent } = await createAgent({
prompt: 'Add a README with setup instructions',
repository: 'https://github.com/your-org/your-repo',
ref: 'main',
autoCreatePR: true,
})
const { run } = await createRun({
agentId: agent.id,
prompt: 'Also add a troubleshooting section',
})Enterprise-only endpoints via ./request:
import { cursorRequest } from 'kody:@kody/cursor/request'
await cursorRequest({ path: '/v1/admin/...' })Docs
Stars
1 star
Log in to star this package.
Report this listing
Log in to report this listing.