News

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.

By AI Coding Tools Directory2026-04-305 min read
Last reviewed: 2026-04-30
ACTD
AI Coding Tools Directory

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.

Cursor logo
CursorFreemium

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/sdk is 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/cookbook ships 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 controlsarchive, unarchive, and delete are 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:

  1. Quickstart — a minimal Node.js example that creates an agent and streams its output.
  2. Prototyping Tool — a web app that scaffolds new projects in a sandboxed cloud environment.
  3. Kanban Board — a UI for browsing Cloud Agents by status and repository, plus creating new ones.
  4. 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.

Claude Code logo
Claude CodeSubscription

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:

  1. 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.
  2. Repo automation — kick off a Cloud Agent on a webhook, stream the result back, archive when done.
  3. 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


For more recent Cursor coverage, see the Cursor 3.2 update, the Cursor pricing guide, and our Cursor vs Claude Code comparison.

Free 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.

Frequently Asked Questions

What is the Cursor SDK?
The Cursor SDK is a TypeScript library (npm: @cursor/sdk) that exposes the same agent runtime, harness, and models that power Cursor's desktop, CLI, and web apps. You can use it to build your own agents — running locally on your machine or on Cursor's cloud infrastructure — against any supported frontier model.
How do I install the Cursor SDK?
Install with npm install @cursor/sdk and set CURSOR_API_KEY from the integrations dashboard. The official cookbook at github.com/cursor/cookbook ships a quickstart Node.js example, a prototyping web app, a kanban board for managing Cloud Agents, and a coding agent CLI.
Does the SDK only run in Cursor's cloud?
No. Agents created with the SDK can run locally — for example pointed at process.cwd() — or on Cursor's cloud agent infrastructure. The same SDK covers both, and the Cloud Agents API was reorganized around durable agents with run-scoped operations as part of the launch.
Which models can I use?
Cursor's docs frame the SDK as compatible with any frontier model. The published TypeScript example uses composer-2 as the model id, and the same model catalog Cursor uses internally is available through the SDK.
Is this related to Cursor 3.2?
It builds on it. Cursor 3.2 (April 24, 2026) made the Agents Window multitask-aware via /multitask, async subagents, and multi-root workspaces. The SDK exposes that same agent runtime as a programmable API, so you can drive it from your own apps instead of the Cursor UI.