Skip to content

Agent SDK ​

Agent SDK lets you define, test, evaluate, and deploy agents as code. It uses the Cursor SDK harness that powers Bugbot, Security Review, Approval Bot, and Rollouts.

An Agent's behavior is defined in a folder of Markdown and TypeScript that combines deterministic code with model judgment. Agent SDK makes it easy to build useful agents, with APIs to interact on Slack, pull requests, issue trackers, Cursor, and the other places where you get work done.

After you deploy an agent, open Deployed Agents to manage it.

Get Started with your Coding Agent ​

Paste this prompt into your coding agent. It installs the CLI, asks what your agent is for, scaffolds and checks a first project, and tells you how to test and deploy it.

text
Set up my first Agent SDK project.

Read https://cursor.com/docs/agent-sdk.md. Add .md to any page under
https://cursor.com/docs/agent-sdk/ to read it as Markdown.

1. Check that Node is 22.13 or newer, then run:
   npm install --global @grok/agent-sdk
2. Follow the agent-sdk-create-agent skill at
   "$(npm root -g)/@grok/agent-sdk/skills/create-agent/SKILL.md".
3. Do not deploy or push until I ask. End by telling me what the agent
   does, how to test it locally, and how to deploy it.

Why Agent SDK ​

Your instructions, tools, and evals are files you review, test, and version like the rest of your code. You write the instructions and tools, and Cursor runs the model loop that calls them.

When to use Agent SDK ​

Cursor AutomationsGrok BotAgent SDK
You defineA prompt, model, and trigger in the dashboardInstructions, skills, and connected tools in the appA versioned Markdown and TypeScript project
Where it runsCursor-managedCursor-managedCursor-managed hosting or your infrastructure
Choose it whenThe job fits a schedule or event triggerYou want to configure and talk to an agent without writing codeYou want code around model judgment that your team can version control, review, test and hillclimb

Get started ​

Install @grok/agent-sdk, then scaffold and run a project. The package was @cursor/bdk before.

bash
npm install --global @grok/agent-sdk
agent-sdk init ./my-bot
cd my-bot
agent-sdk dev

Project layout explains every folder under bot/.

Next steps ​

Architecture ​

Agent SDK architecture