Build programmatic agents with the Cursor SDK

· Source: Cursor Blog · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Intermediate, short

Summary

Cursor has released its SDK, enabling developers to build and deploy coding agents using the same runtime, harness, and models that power the Cursor application. The SDK, now in public beta, supports running agents locally, on Cursor's cloud via dedicated VMs, or on self-hosted workers, offering flexibility for various deployment needs. It abstracts away complexities like secure sandboxing, state management, and environment setup, allowing teams to focus on agent functionality. The SDK integrates Cursor's intelligent context management, MCP servers for external tools, automatic skill discovery, and hooks for agent loop control. It also provides access to all models supported by Cursor, including the cost-efficient Composer 2, and facilitates programmatic agent initiation from CI/CD pipelines, custom agent platforms, and embedded product experiences. Developers can get started by installing `@cursor/sdk` and exploring sample projects on GitHub.

Key takeaway

For AI Architects and VP of Engineering considering agent-driven automation, the Cursor SDK offers a streamlined path to deploy production-ready coding agents. Your teams can leverage pre-built infrastructure for sandboxing, state management, and model integration, significantly reducing development overhead. This allows you to focus on agent logic and specific use cases, accelerating the adoption of programmatic agents in workflows like CI/CD or internal tools, without needing to build the entire agent stack from scratch.

Key insights

The Cursor SDK provides a production-ready platform for building and deploying coding agents with robust infrastructure and model flexibility.

Principles

Method

Developers can create agents using the Cursor SDK by instantiating an `Agent` object with an API key, specifying a model, and choosing a runtime (local or cloud) to send prompts and stream responses.

In practice

Topics

Code references

Best for: AI Architect, CTO, VP of Engineering/Data, AI Engineer, Software Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Cursor Blog.