Agent SDK
By Steven Van ·
Agents are defined as a folder of code, tested with evals, and deployed to Cursor or self-hosted, with GitHub, GitLab, Bitbucket and Slack triggers.
The Agent SDK is now available, letting developers define an agent as a folder of code, test it with evals, and deploy it to Cursor or to their own infrastructure. Cursor described it as generally available in its announcement.
Getting started
Run npx @cursor/agent-sdk init ./my-bot, then agent-sdk dev to start the bot locally with a playground. Passing --template starts from one of several examples: a security reviewer, an owners-policy approver, a PR autofixer, or a Linear or Jira triager.
Agents as code
An agent is a project, laid out as files and folders:
- instructions.md is the prompt.
- Each file in tools/ is one typed action the model can call.
- skills/ holds procedures the model loads on demand.
- mcp-connections/ adds tools from MCP servers.
- channels/ defines where the bot receives and answers messages.
agent-sdk validate checks the project, and agent-sdk info prints what was discovered.
Channels
Agents wake on pull request, comment and CI events from GitHub, GitLab and Bitbucket. They also respond to mentions and DMs in Slack, to webhooks from any provider, and to a cron schedule. GitHub events pull through a Cursor account, so no public webhook URL is required. Each conversation keeps its own session and a complete record of every message and tool call, and follow-ups on a pull request or Slack thread resume the same session.
Evals
An eval sends a fixed message to the bot and asserts on what it did: which tools ran, with what input, and the shape of the reply. agent-sdk eval runs locally or in CI. agent-sdk github replay pr-url turns a real pull request into signed webhook payloads and sends them to the bot, so GitHub-driven bots can be tested without waiting for a push. Adding --dry-run --fixtures-dir fixtures/ saves the payloads as eval fixtures.
Deploying
Running agent-sdk deploy from the project directory builds the agent, gives it a URL, and starts it on Cursor's infrastructure. Secrets and integrations are managed from the dashboard, which uses the same logs, evals and playground available locally.
