Cursor SDK (April 29, 2026): Build Programmatic Agents with the Same Runtime That Powers Cursor
Cursor launched a TypeScript SDK on April 29, 2026 that exposes the same agent runtime, harness, and models that power the Cursor IDE. Run agents locally or on Cursor's cloud, integrate them into your own apps, and reach for any frontier model behind a single interface.
Editorial Team
The AI Coding Tools Directory editorial team researches and reviews AI-powered development tools to help developers find the best solutions for their workflows.
On April 29, 2026 Cursor published a TypeScript SDK (@cursor/sdk) that exposes the same agent runtime, harness, and models that power the Cursor IDE. You can use it to build your own programmatic agents — running locally or on Cursor's cloud — and they show up in the Cloud Agents API as durable, streamable runs you can manage end-to-end.
The AI-native code editor with $1B+ ARR, 25+ models, and background agents on dedicated VMs
It's the next step after Cursor 3.2's Agents Window upgrades: 3.2 made parallel agent work feel first-class inside the IDE, and the SDK now puts that same agent loop behind a public API.
TL;DR
@cursor/sdkis a TypeScript SDK that runs Cursor's agents from your own code.- Agents can run locally (against your filesystem) or on Cursor's cloud.
- Compatible with any frontier model; the published example uses
composer-2.- The Cloud Agents API was reorganized around durable agents with run-scoped operations, SSE event streaming with reconnect, and lifecycle controls (archive, unarchive, delete).
- A public cookbook at
github.com/cursor/cookbookships a quickstart, prototyping web app, kanban board, and CLI.
Quick Start
Install the SDK and set your API key from the Cursor integrations dashboard:
npm install @cursor/sdk
export CURSOR_API_KEY=...
Then create a local agent and stream from it:
const agent = await Agent.create({
apiKey: process.env.CURSOR_API_KEY!,
model: { id: "composer-2" },
local: { cwd: process.cwd() },
});
The local: { cwd } block tells the SDK to run the agent against your filesystem instead of a cloud workspace; drop it (or pass cloud configuration) and the same code spins up a Cloud Agent run instead.
What the SDK Actually Gives You
Cursor's announcement frames the SDK as the same runtime that powers the IDE, exposed as a library. Concretely, that means:
- Same agent loop as the desktop, CLI, and web apps — not a thinned-down chat API.
- Same model harness, so models that work well inside Cursor (composer-2 in the launch example) work the same way through the SDK.
- Local or cloud execution from a single interface.
- Streaming output so you can render tool calls, edits, and reasoning as they happen.
This matters because most "agent SDKs" are really model wrappers — you still have to assemble the prompting, tool routing, and review loop yourself. The Cursor SDK ships the harness Cursor has already tuned for production coding work.
Cloud Agents API: Now Built Around Durable Agents
Alongside the SDK launch, Cursor reworked the Cloud Agents API so it lines up with how the SDK thinks about agents:
- Durable agents with run-scoped operations — the agent is the long-lived object, runs hang off it.
- SSE event streaming with reconnect — pick up a run mid-flight without losing events.
- Lifecycle controls —
archive,unarchive, anddeleteare first-class. - Standardized v1 response shapes and error codes across endpoints.
If you were already wiring up Cloud Agents from a backend, this is a cleaner contract; if you weren't, the SDK is now the path of least resistance.
The Cookbook: Four Reference Apps
The official cursor/cookbook repository (TypeScript-heavy, public on GitHub) ships four samples that double as starting points:
- Quickstart — a minimal Node.js example that creates an agent and streams its output.
- Prototyping Tool — a web app that scaffolds new projects in a sandboxed cloud environment.
- Kanban Board — a UI for browsing Cloud Agents by status and repository, plus creating new ones.
- Coding Agent CLI — a terminal app that spawns Cursor agents from your shell.
The kanban board is the most interesting reference if you're building internal tooling: it's effectively a dashboard for a fleet of long-running Cursor agents, exactly the workflow Cursor 3.2's /multitask and worktrees pushed toward.
How This Sits Next to Other Coding-Agent SDKs
| SDK | Language | Agent loop included | Local + cloud execution | Notes |
|---|---|---|---|---|
| Cursor SDK | TypeScript | Yes (same as IDE) | Yes | composer-2 example, @cursor/sdk |
| Anthropic Claude Agent SDK | TypeScript / Python | Yes | Local-first; cloud via your infra | Powers Claude Code |
| OpenAI Agents SDK | Python / TypeScript | Yes | Local-first | Tied to ChatGPT/Codex backends for cloud |
The differentiator for Cursor is that the SDK ships the same composer-2 harness Cursor uses for paid IDE traffic, and that the Cloud Agents API is set up to host long-running runs without you operating the infrastructure.
Anthropic's terminal-based AI coding agent with Claude Opus 4.7, /ultrareview, Routines, /ultraplan, and 80.9% SWE-bench
Practical Takeaway
If you're already a Cursor user, three places this is worth reaching for first:
- Internal tools — a kanban board, a PR-triage queue, or a docs-update bot that uses Cursor's agent loop instead of a hand-rolled one.
- Repo automation — kick off a Cloud Agent on a webhook, stream the result back, archive when done.
- Custom CLIs — wrap the SDK in your own command so a teammate doesn't have to be inside Cursor to use it.
For broader context on agent SDKs and where they fit, see our AI coding agents explained guide, the background agents explained post, and the Cursor tool page.
Sources
- Cursor changelog — SDK Release (April 29, 2026): cursor.com/changelog
- Cursor changelog — Cursor 3.2 (April 24, 2026): cursor.com/changelog
- Cursor Cookbook (official samples): github.com/cursor/cookbook
- npm package:
@cursor/sdk
For more recent Cursor coverage, see the Cursor 3.2 update, the Cursor pricing guide, and our Cursor vs Claude Code comparison.
Tools Mentioned in This Article
Claude Code
Anthropic's terminal-based AI coding agent with Claude Opus 4.7, /ultrareview, Routines, /ultraplan, and 80.9% SWE-bench
SubscriptionCursor
The AI-native code editor with $1B+ ARR, 25+ models, and background agents on dedicated VMs
FreemiumZed
High-performance Rust code editor with agentic AI and open-source edit prediction
FreemiumFree Resource
2026 AI Coding Tools Comparison Chart
Side-by-side comparison of features, pricing, and capabilities for every major AI coding tool.
No spam, unsubscribe anytime.
Workflow Resources
Cookbook
AI-Powered Code Review & Quality
Automate code review and enforce quality standards using AI-powered tools and agentic workflows.
Cookbook
Building AI-Powered Applications
Build applications powered by LLMs, RAG, and AI agents using Claude Code, Cursor, and modern AI frameworks.
Cookbook
Building APIs & Backends with AI Agents
Design and build robust APIs and backend services with AI coding agents, from REST to GraphQL.
Cookbook
Debugging with AI Agents
Systematically debug complex issues using AI coding agents with structured workflows and MCP integrations.
MCP Server
AWS MCP Server
Interact with AWS services including S3, Lambda, CloudWatch, and ECS from your AI coding assistant.
MCP Server
Context7 MCP Server
Fetch up-to-date library documentation and code examples directly into your AI coding assistant.
MCP Server
Docker MCP Server
Manage Docker containers, images, and builds directly from your AI coding assistant.
MCP Server
Figma MCP Server
Access Figma designs, extract design tokens, and generate code from your design files.
Frequently Asked Questions
What is the Cursor SDK?
How do I install the Cursor SDK?
Does the SDK only run in Cursor's cloud?
Which models can I use?
Is this related to Cursor 3.2?
Related Articles
Claude Code v2.1.120 → v2.1.123 (April 28–29, 2026): claude ultrareview in CI, Windows Without Git Bash, MCP alwaysLoad, plugin prune
Claude Code's late-April 2026 point releases (v2.1.120–v2.1.123) make /ultrareview runnable from CI as a non-interactive subcommand, drop the Git Bash requirement on Windows in favor of PowerShell, add an alwaysLoad option for MCP servers, and ship claude plugin prune for orphaned plugin dependencies.
Read more →NewsClaude Code Week 17 (April 20–24, 2026): /ultrareview Public Preview, Session Recap, Custom Themes, Web Redesign
Claude Code Week 17 opened /ultrareview to public research preview, made session recap a first-class CLI feature, shipped custom themes you can build and ship in plugins, and redesigned Claude Code on the web with a sessions sidebar and drag-and-drop layout.
Read more →NewsClaude Code Week 16 (April 13–17, 2026): Opus 4.7, xhigh Effort, Routines, /ultrareview, /usage, Native Binaries
Anthropic's Claude Code Week 16 update made Opus 4.7 the default on Max and Team Premium, added the xhigh effort level and /effort slider, shipped Routines and /ultrareview on the web, a /usage breakdown, and moved the CLI to native binaries.
Read more →