The Cursor Agent SDK vs Claude Agent SDK question did not exist a month ago. Cursor published “Introducing the Agent SDK” on October 20, 2026, tagged version 0.3.0 as the general availability release on October 23, and announced it widely on October 26. Now both companies sell a way to build your own coding agents in TypeScript, and they made opposite design choices.

Cursor treats an agent as a small software project: Markdown prompts, TypeScript tools, evals and deployment in one folder. Anthropic’s Claude Agent SDK treats an agent as Claude Code running inside your process, with every built-in tool already attached.

I read both SDKs’ docs end to end, plus Cursor’s launch post and Anthropic’s Managed Agents docs. I have not shipped a production agent on Cursor’s SDK yet, since it has been GA for under a week, so this is a docs-based comparison and I say so where it matters.

What Is the Cursor Agent SDK?

The Cursor Agent SDK is a framework for defining agents in code, testing them with evals, and deploying them on Cursor’s infrastructure or your own. Cursor’s launch post says the SDK “allows you to define agents in code and manage them like any other software project,” and that Cursor uses it to build its own managed agents, including Bugbot, Security Reviewer and Rollouts.

The package is @grok/agent-sdk, previously named @cursor/bdk. The rename fits the ownership: Cursor is now part of SpaceX and sold inside the X Subscription, which I covered in the Cursor X Subscription pricing breakdown. npm lists version 0.4.0, a Node 22.13+ requirement, and a custom license (“SEE LICENSE IN LICENSE.md”), so do not assume it is open source.

The project layout is the core idea. Per Cursor’s project layout reference, everything lives under bot/:

  • agent.ts calls defineAgent({ model?, local? })
  • instructions.md is the always-on system prompt
  • tools/approve_pr.ts becomes a tool named approve_pr, one typed tool per file
  • skills/, subagents/<id>/, mcp-connections/ and hooks/ (observe-only) each get a folder
  • channels/github.ts becomes an HTTP route at /v1/channels/github
  • schedules/ holds cron-driven runs

That convention-over-configuration approach will feel familiar to anyone who has used Next.js routing. Drop a file in the right folder and it becomes part of the agent. agent-sdk validate --dir . reports what is wrong, and agent-sdk info shows what was discovered.

The example in the launch post that sold me on the design is small. A Cursor team built “kb-reviewer” in about a day. It runs on every pull request in their main codebase, flags changes that contradict recorded lessons, and cites the relevant note.

Cursor’s SDK is built for team bots that react to events, and the folder structure makes those bots reviewable like any other code.

What Is the Claude Agent SDK?

The Claude Agent SDK gives you “the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript,” according to Anthropic’s Agent SDK overview. It is a library that runs the Claude Code binary inside a process you operate.

The capabilities come straight from Claude Code:

  • Built-in tools to read, write and edit files, run commands and search the web
  • Hooks at points in the agent lifecycle
  • Subagents for focused subtasks
  • MCP connections to external tools and data
  • Permissions that control which tools run automatically
  • Sessions you can resume or fork
  • Skills, commands and memory loaded from .claude/ and ~/.claude/, plus plugins

That last point is the one Cursor cannot match. If your team already has a .claude/ directory full of skills, subagents and hooks, the SDK picks them up. The Claude Code subagents guide and the Claude Code hooks guide both apply directly to SDK agents.

The minimal agent from Anthropic’s quickstart is a single query() call:

import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const message of query({
  prompt: "Review utils.py for bugs that would cause crashes. Fix any issues you find.",
  options: {
    allowedTools: ["Read", "Edit", "Glob"],
    permissionMode: "acceptEdits"
  }
})) {
  if (message.type === "result") console.log(`Done: ${message.subtype}`);
}

The agent reads the file, decides what is broken and edits it with no tool code from you. Cursor’s SDK makes you write the tools. Anthropic’s ships them.

The Claude Agent SDK is the faster path to an agent that works on a codebase, because the hard tools already exist and are already permissioned.

Cursor Agent SDK vs Claude Agent SDK: Side by Side

FeatureCursor Agent SDKClaude Agent SDK
LanguagesTypeScript onlyTypeScript and Python
Agent definitionFolder of Markdown and TS filesOptions object in your code
Built-in coding toolsYou write themRead, Edit, Bash, Glob, web search
EvalsBuilt in (agent-sdk eval)Not part of the SDK
HostingCursor-hosted or self-hosted Node processYour process; hosted via Managed Agents (beta)
Event channelsGitHub, GitLab, Bitbucket, HTTP routesYou wire them
ModelsCursor models (sample uses Composer 2.5)Claude models via API, Bedrock, Google Cloud, Foundry
AuthCursor login / CURSOR_API_KEYANTHROPIC_API_KEY or cloud credentials

(Source: Cursor Agent SDK docs and launch post; Anthropic Agent SDK overview and quickstart, October 2026.)

The table splits almost evenly, and the split follows the two design philosophies. Cursor wins on everything around the agent: tests, deployment, triggers. Anthropic wins on what the agent can do once it runs.

Evals: Cursor’s Biggest Advantage

Cursor’s eval system is the feature I would point a skeptical engineering manager at. Per Cursor’s evals reference, each case is a file in evals/ that sends a fixed input to the real agent and asserts on what happened:

import { defineEval, includes } from "@grok/agent-sdk/evals";

export default defineEval({
  tags: ["smoke"],
  async test(t) {
    await t.send("Is https://github.com/acme/checkout/pull/42 ready to approve?");
    t.succeeded();
    t.calledTool("inspect_pr");
    t.notCalledTool("approve_pr");
    t.check(t.reply, includes(/ready|blocked|approve/i));
  },
});

Asserting which tools ran, and which did not, is the right primitive for agents. The scary failure for a PR bot is not a badly worded comment. It is the bot approving something it should have blocked, and t.notCalledTool("approve_pr") tests exactly that.

The rest of the eval tooling is thoughtful too:

  • matches(zodSchema) checks JSON output shape, and t.judge.factuality() adds a model-graded check with a 0 to 1 threshold
  • maxConcurrency in evals.config.ts runs cases in parallel
  • --junit writes CI-ready reports
  • agent-sdk github replay saves a real PR’s webhook payloads as fixtures
  • Tools can check ctx.session.purpose === "eval" and skip real writes

Evals run real tools, and Cursor’s docs warn you to guard writes first. That purpose check is the guard, and I would make it a lint rule on any tool that touches an external system.

The Claude Agent SDK docs I read have nothing equivalent. You can build an eval harness around query() with your own test runner, and plenty of teams do, but it is your code to write and maintain. This is the clearest gap between the two products.

If you need to prove an agent’s behaviour before it touches production, Cursor’s SDK gives you that on day one and Anthropic’s does not.

Hosting, Models and Cost

Cursor offers two deployment paths. agent-sdk deploy builds the agent, assigns a URL and runs it on Cursor’s infrastructure, with secrets in the dashboard. Or you self-host, since each agent “runs as a single Node process that can be packaged in a container.”

Self-hosting the process does not make you independent of Cursor. Model turns need a Cursor credential such as CURSOR_API_KEY, and the docs only show Cursor’s own models. The launch post’s sample config uses composer-2.5 with high effort and fast mode on.

Pricing is the weak spot in Cursor’s launch. Cursor publishes no separate price for the Agent SDK or for hosted deployments. Per Cursor’s models and pricing page, paid plans draw from a weekly usage pool, and Composer 2.5 beyond the pool costs $0.50 input, $0.20 cache read and $2.50 output per million tokens. How hosted agent turns are metered against that pool is not documented yet. I would not move a high-volume bot onto it until that is written down.

Anthropic’s model is plainer. The SDK is free, governed by Anthropic’s Commercial Terms, and you pay Claude API rates: Sonnet 5.5 at $2 / $10 and Haiku 5.5 at $0.10 / $0.50 per million tokens, with the full table on the AI model pricing tracker. It also runs on Amazon Bedrock, Claude Platform on AWS, Google Cloud and Microsoft Foundry, which matters for anyone whose procurement goes through a cloud contract.

One restriction trips people up. Anthropic’s docs say that, unless previously approved, third-party developers may not offer claude.ai login or subscription rate limits in products built on the SDK. Your users bring an API key, or you pay.

If you want Anthropic to host the agent, that is a different product. Claude Managed Agents is a hosted harness with a cloud or self-hosted sandbox and scheduled runs. It is still in beta behind the managed-agents-2026-04-01 header, and it is not eligible for Zero Data Retention or HIPAA BAA coverage because it stores session state server-side.

Cursor’s SDK is easier to deploy but its costs are undocumented, while Anthropic’s costs are predictable but deployment is your job unless you accept a beta.

Which Agent SDK Should You Use?

Pick the Cursor Agent SDK if:

  • You are building event-driven team bots: PR reviewers, policy checkers, triage bots, scheduled reports
  • You want evals and CI gating without building a harness
  • Your team already pays for Cursor and is happy with Composer or Grok models
  • You want one TypeScript project that a reviewer can read top to bottom

Pick the Claude Agent SDK if:

  • The agent needs to read, edit and run code on a real repository
  • You want Python, or you need Bedrock, Google Cloud or Foundry
  • You already have Claude Code skills, subagents and hooks in .claude/
  • You want per-token billing you can forecast from a public price sheet

The two do not have to compete. Cursor’s own example, a reviewer that checks PRs against recorded lessons, is a bot that comments. An agent that fixes the bug the reviewer found needs file editing and shell access, which is where Claude’s SDK is ahead. Picking the model underneath matters as much as the SDK, and the GPT-6.1 Terra benchmarks I published today show how fast the cheap agent tier is moving.

My recommendation: prototype a PR-review bot on Cursor’s SDK this week if you already pay for Cursor, because the eval tooling alone will teach you how to test agents. For anything that changes code, start with the Claude Agent SDK and borrow Cursor’s eval pattern, asserting which tools ran, in your own test suite.

The Cursor Agent SDK is the better framework for agents as software. The Claude Agent SDK is the better engine for agents that write software.