The Agent SDK
TL;DR Highlight
Cursor released Agent SDK, letting you define agents in code and deploy them with one command.
Who Should Read
A backend developer who wants to automate recurring work like PR review or incident investigation with agents that follow team rules.
Core Mechanics
- Build an agent like a software project
- Prompts are written in Markdown and tools are TypeScript functions.
- Tools, outside service connections, and evals (tests) live in one project.
- Since it is all code, it goes through your existing version control and review.
- One command, agent-sdk deploy, ships it
- Run from the project directory, it builds the agent, gives it a URL, and starts it on Cursor infrastructure.
- Secrets and integrations are managed in the dashboard, with the same logs, evals, and playground as local.
- You can also run it on your own infrastructure, since each agent is one Node process that fits in a container.
- Agents react to events your team handles
- They can respond to PR events from GitHub, GitLab, or Bitbucket.
- They can assess change risk, route to the right team, and approve changes that meet policy.
- Cursor built kb-reviewer in about a day
- An internal Cursor team checked every PR against its lessons-learned knowledge base.
- It now runs on every PR in their main codebase and flags changes that contradict a recorded lesson.
- Each finding cites the note behind it and asks engineers to reconcile the discrepancy.
- Subagents, evals, and event replay are built in
- Complex work can be handed to specialized agents with their own tools and sessions, or split among parallel subagents.
- Evals and event replay come out of the box.
- The PGA Tour uses it to power its software development factory.
- It underlies Cursor's own agents
- It is the framework behind Cursor's managed agents Bugbot, Security Reviewer, and Rollouts.
- It is generally available today.
- It ships with skills that guide coding agents, so you can point one at the docs and build together.
Community Reactions
- Opinion that AI tooling is becoming like JS framework churn
- Several comments said new tools appear daily and last week's tools get deprecated.
- One comment said the agent harness is the wheel being reinvented in 2026.
- Concerns about vendor lock-in and name collisions
- Comments noted OpenAI and Anthropic already have Agent SDK brands and Vercel has AI SDK.
- One commenter hoped for a standard like openresponses.org so apps are not tied to one vendor.
- Questions about why use this at all
- Commenters asked why use it over an open-source harness or the Anthropic SDK.
- One asked why an agent SDK isn't just a PROMPT.md plus a runtime that runs the LLM with tools.
- That comment wondered whether langchain-style abstractions exist for some determinism.
- Alternative experience and pointers to existing SDKs
- One commenter said Vercel's Eve worked well for an agent living on a server.
- A comment pointed to an existing Cursor TypeScript SDK post.
- Another noted the video still shows @grok/agent-sdk.
How to Apply
- Write up one recurring task as an agent candidate today
- In 30 minutes, pick PR review, a compliance check, or incident investigation and write its trigger event, input, and expected result on one page.
- Paste the prompt below into a coding agent to get a draft project structure.
- Hook your team knowledge base into PR checks
- If you have past decision or lesson notes, design a kb-reviewer-style agent that flags PRs contradicting them.
- State in the prompt that each finding must cite the note behind it.
- Write evals before deploying
- For each critical workflow, write expected outcomes as evals and run them locally first.
- Once they pass, deploy with agent-sdk deploy.
- Decide where the agent runs first
- Choose between Cursor infrastructure and your own.
- For self-hosting, package the agent as one Node process in a container.
Try It
// Paste into a coding agent like Claude Code or Cursor (prompt that makes it read the Agent SDK docs)
The code below is the basic agent definition for the Cursor Agent SDK.
import { homedir } from "node:os";
import { join } from "node:path";
import { defineAgent } from "@cursor/agent-sdk";
export default defineAgent({
name: "Robo",
model: {
id: "composer-2.5",
params: [
{ id: "effort", value: "high" },
{ id: "fast", value: "true" },
],
},
local: { cwd: join(homedir(), ".cache", "factory", "robo") },
})
# Instructions
First read https://cursor.com/blog/agent-sdk and the official docs.
Then propose an agent project structure that does {{what you want, e.g. flag changes contradicting the knowledge base}} when {{trigger event, e.g. a GitHub PR is opened}}.
Split it into Markdown prompts, TypeScript function tools, and evals.
Do not invent APIs that are not in the docs; say so if you don't know.
# Next steps
Run it in the local playground, and once evals pass, run agent-sdk deploy.Terminology
Related Papers
Here be monsters: What do you still need to know when agents do the work?
Owning agent-written code depends on fundamentals, breadth, and diving deep just in time.
AI promised less work. I've never worked more
Running agents in parallel brought my GitHub activity back to full-time engineer levels, and I'm exhausted.
Show HN: Corgi, a helpful {agent, terminal} multiplexer
A tmux-like terminal tool that shows the status of all your AI agents at a glance
Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?
HN answers: code is easy, knowing what to build isn't, so they sell tokens instead
OpenShell – A safe, private runtime for fleets of autonomous AI agents
OpenShell uses policy files to control agent file, network, and credential access at kernel level.
Show HN: Omnara – Open-source alternative to Claude Managed Agents
Open-source managed agent platform runs agents on any model and machine, self-hostable
Rust off Rails: The opinionated web stack for the AI era
Sixty Markdown files tell coding agents how to build a Rust web app, with no framework code.
LayerFS: The filesystem for AI coding agents
Mount an ephemeral workspace per agent, commit only the changes