Skip to content

Cursor Agent SDK packages agents as code you can deploy

Cursor's new SDK keeps an agent in a folder of files, tests which tools it calls with evals, then ships it with a deploy command.

Draftship Editorial3 min read

Cursor's Agent SDK is available now, according to the Agent SDK changelog entry dated Oct 20, 2026. The Cursor Agent SDK lets a developer keep a bot in a directory of files, exercise it against scripted tests, then run it on Cursor's servers or on infrastructure the team controls. Setup starts with npx @cursor/agent-sdk init ./my-bot, after which agent-sdk dev runs the bot locally alongside a playground. The init step accepts --template, offering four patterns to borrow from: a security reviewer, an owners-policy approver, a PR autofixer, and a triager for Linear or Jira.

The folder layout replaces a pile of scripts

Under the SDK, each bot is a project on disk rather than a prompt with glue around it. instructions.md carries the prompt. Every file under tools/ describes a single typed action available to the model. skills/ contains procedures the model pulls in when a task calls for them. mcp-connections/ brings in tools from MCP servers, and channels/ says where the bot listens and where it replies. Two commands check the result: agent-sdk validate inspects the project, and agent-sdk info lists what the tool found.

Triggers, sessions and where the bot lives

A bot can be woken by pull request, comment and CI activity on GitHub, GitLab or Bitbucket, by mentions and direct messages in Slack, by webhooks from any provider, and by a cron schedule. GitHub traffic arrives through the Cursor account, so there is no public webhook endpoint to expose. Slack support is described as solid without extra setup. Conversations are kept apart: each one has its own session plus a record of all messages and tool calls, and a follow-up in a pull request or a Slack thread continues the existing session rather than starting a new one.

Testing against a real pull request

An eval feeds the bot a preset message and then checks the outcome: the tools it invoked, the arguments it passed, and how the answer was shaped. Evals run locally or in CI. For GitHub-driven bots, agent-sdk github replay <pr-url> converts a live pull request into signed webhook payloads and delivers them to the bot, which removes the wait for someone to push. Adding --dry-run --fixtures-dir fixtures/ stores those payloads as fixtures for later evals.

Deployment and what stays the same

agent-sdk deploy, run inside the project directory, compiles the agent, assigns it a URL and runs it on Cursor's infrastructure. Secrets and integrations are handled from a dashboard, and the logs, evals and playground from local development remain available. Deploying elsewhere is mentioned as an option, though the post does not explain how that path works.

What this likely means for teams running agents

Teams that already point bots at repositories and chat threads get a structure a reviewer can read one file at a time, and the deploy command folds hosting into the same tool. The eval design also targets something prompt text cannot settle on its own: whether the model called the correct tool with the correct arguments. This suggests Cursor expects agents to be maintained like application code rather than tuned by trial and error in a chat window. That reading is an inference from the feature list, not a claim the post makes.

Limits and open questions

The announcement gives no pricing, quota or plan requirement. It does not name the models an agent may call, the runtime the folder is compiled into, or how a self-hosted deployment is packaged. Retention and access rules for the stored message and tool-call records are not covered. Nor is it clear whether the four templates are maintained projects or one-off starting points.

For people building apps with AI

The SDK targets bots that act inside code hosts, ticketing systems and Slack. The testing idea travels further: any app with an AI feature gains from fixed inputs plus assertions about which actions the model took. If you are wiring a model into an app you are building, Draftship's guide to adding AI to your app covers connecting a model to your app's logic.

Primary sources

This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.