Head to head · Agent frameworks · October 2026 research run

Cursor Agent SDK vs Mastra

Mastra scores 74.2 (BB) on agent readiness against Cursor Agent SDK's 63.7 (B), and leads in 6 of 7 scored categories. Both do agent frameworks.

Best agent frameworks and SDKs · All 171 frameworks comparisons

Which one, for what

Cursor Agent SDK B

Best for Teams already on Cursor who want version-controlled agents for pull request review, triage and Slack, with evals in CI and one-command hosting.

Also in its favour

  • No incidents deducted, where Mastra loses 8 points for them

Watch for

Closed source under Cursor's terms, with no public repository, CI or issue tracker

Mastra BB

Best for TypeScript teams that want agents, workflows, memory, evals and a local Studio in one framework.

Ahead on

  • Reliability, 87 against 45
  • Schema & documentation, 98 against 82
  • Agent ergonomics, 92 against 80
  • Payments & pricing, 60 against 30
  • Maintenance & community, 96 against 74

Also in its favour

  • Agent-ready, a grade of BB or better
  • Open source

Watch for

Malicious versions of Mastra npm packages, including @mastra/core 1.42.1, were published on 17 June 2026

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Reliability Mastra +42

Cursor Agent SDK 45

Local-package reading, since the owner runs the framework, with Cursor's hosting as an option. Official npm package with Node 22.13 or newer stated in engines and in the docs, which also say never Bun (20). Closed source, so no public CI or test suite (0). No public issue tracker. github.com/cursor/cursor holds a README and SECURITY.md, and forum.cursor.com has no Agent SDK tag, so there's nothing to count open crashes against. The troubleshooting page lists known failures with fixes (5). A dated changelog of two entries, 0.2.29 and 0.3.0, both 23 October 2026, and 0.3.0 calls out the removed persistent option, but the 27 earlier @cursor/bdk versions and 123 @cursor/july versions have no notes, and one build ships under three package names (5). Version 0.3.0, but the changelog post of 20 October says generally available and the docs changelog labels 0.3.0 the GA release, which we read as declared stable (15). 20+0+5+5+15 = 45.

Mastra 87

Official npm packages, Node 22.13 or newer (20). Public CI workflows for unit, store, workspace and e2e tests; on 6 November the newest runs on main (Version Packages, Trigger Cloud Integration Tests) succeeded, while the test workflows themselves run on pull requests (22). 436 open issues and 795 open issues and pull requests on 6 November from GitHub's API, with 2,077 issues opened in the 90 days to 3 November; all 50 newest had a comment and 24 were closed, with issue-triage automation (18). A changesets CHANGELOG per package, a CI gate that needs approval for any major bump and migration guides, but no written versioning policy found, and .network() is deprecated without a removal date (12). 1.82.0 (15). 20+22+18+12+15 = 87, up from 74 on 6 October, when GitHub couldn't be read.

Payments & pricing Mastra +30

Cursor Agent SDK 30

Framework reading of the published rubric. No payment protocol (0). Per-million-token prices for Cursor models, including the default Grok 4.5 with Fast, and plan prices are public, but no price for managed hosting and no statement of which plans cover the Agent SDK were found (15). The package is free and the Free plan needs no card, but its usage is only described as limited agent requests (15). A person signs in through a browser or creates an API key in the dashboard before a model turn runs (0). 0+15+15+0 = 30.

Mastra 60

No payment protocol (0). Scored on the hosted platform, whose per-unit prices are public without a login ($10 per 100K observability events and $0.35 a CPU hour on Starter) (20). The Apache 2.0 packages install with no card (20) and no account, and run any model (20).

Maintenance & community Mastra +22

Cursor Agent SDK 74

0.3.0 on npm on 25 October 2026, per the 27 October check (npm not re-read on 2 November), and the docs changelog still ends at 0.3.0 of 23 October (30). Five @grok/agent-sdk versions from 22 to 25 October and 29 @cursor/bdk versions since 22 September, per the 27 October check (20). Closed product. A public changelog with two entries and a forum with no Agent SDK tag, so we couldn't see replies to SDK reports (8). The npm package is current and official, TypeScript only (12). Dependencies are current releases, but there's no public CI and the same build goes out under three names with a postinstall script (4). 30+20+8+12+4 = 74.

Mastra 96

@mastra/core 1.82.0 on 2026-11-04 (30). 27 stable releases in the 90 days to 6 November, 8 of them since 6 October (20). 436 open issues on 6 November, all 50 newest issues commented and 24 of them closed (22). Client, MCP and store packages are current, and @mastra/mcp 1.x stays supported beside 2.x (15). Renovate and CI configured, with the newest runs on main passing (9). 30+20+22+15+9 = 96.

Schema & documentation Mastra +16

Cursor Agent SDK 82

Framework reading. Typed TypeScript declarations ship in the package, tools take Zod or JSON Schema, agent-sdk help --json describes every command's flags and exit codes, and GET /v1/info and GET /v1/tools/:name return the discovered surface and each tool's schemas. No OpenAPI document for the HTTP routes (20). cursor.com/llms.txt lists every Agent SDK page with a Markdown twin, and the package ships the docs and an llms.txt (10). The overview has a table of when to use the Agent SDK, Automations or Grok Bot, and the hooks page has a table of what to use instead of a hook for each job (18). Typed config, effect as an enum or predicate, timeArgs checked against the input schema, and slug patterns stated (13). Examples on every page, with error tables for direct tool calls, HTTP 401, 403 and 409, the limit error's JSON and seven exit codes (15). A dated changelog, but only two entries, both from 23 October 2026 (6). 20+10+18+13+15+6 = 82.

Mastra 98

Typed TypeScript API with a reference section (25). llms.txt with a when-to-use list and condensed instructions for coding agents (10). The docs say when to use durable agents, and point multi-agent users from .network() to supervisor agents (20). Tools take Zod schemas (15). Examples on every page, and MastraError with ids and categories documented, though errors are spread across pages (13). Per-package changelogs and migration guides (15).

Agent ergonomics Mastra +12

Cursor Agent SDK 80

Framework reading, scored on what it takes to run a tool-calling agent with MCP. One file per tool and one file per MCP connection, tools and disallowedTools filters with effects: "read", and an allowlist for the harness's built-in tools (22). Concurrency caps with queued turns, --fields, page tokens and limits on list commands, and a per-session cost view. We found no turn cap or spend cap for a run (12). Built-in routes return { ok: false, error } codes, direct tool calls have documented 400, 404, 409 and 500 codes, and the CLI has seven exit codes (18). Reads and idempotent calls retry up to three times, writes run once, MCP readOnlyHint and idempotentHint decide retries for connection tools, and dry-run sessions stub writes (20). agent-sdk init scaffolds a working project and every agent field is optional, but the framework is TypeScript only (8). 22+12+18+20+8 = 80.

Mastra 92

An MCP client in about ten lines with listTools() for static or listToolsets() for per-request tools, and ToolSearchProcessor for loading tools on demand (25). Step limits, memory windows and processors such as a token limiter control what reaches the model (20). MastraError with ids and categories, and processors can abort with a reason the caller can read (17). Workflow step retries, snapshots and durable agents for resuming (20). create-mastra scaffolds a project and the model router takes a plain string, but it's TypeScript only (10).

Score by category

CategoryWeight this runCursor Agent SDKMastraEdge
Reliability16%204587Mastra +42
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28298Mastra +16
Agent ergonomics13%16.28092Mastra +12
Security & auth14%17.56867Cursor Agent SDK +1
Payments & pricing10%12.53060Mastra +30
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.87496Mastra +22
Transparency & trust7%8.87172Mastra +1
Negative events≤150-8
TotalB 63.7/100BB 74.2/100

Facts side by side

FactCursor Agent SDKMastra
KindAgent frameworkAgent framework
VendorCursorKepler Software, Inc.
Hosted endpointno (local only)no (local only)
Transports
AuthOAuth or keyAPI key
PricingYour planFree
x402nono
LicenceProprietary. The package's LICENSE.md reads "© Anysphere Inc. All rights reserved", with use subject to Cursor's Terms of Service (updated 3 September 2026). No source repository is publishedApache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing
Read-only variant documentednono
llms.txtyesyes
Last release2026-10-252026-11-04
Terms last updated2026-09-032026-10-26
Privacy policy last updated2026-09-29no date given
Customer content may train modelsnot found in the textyes
Terms restrict automated accessyesyes
Terms restrict benchmarkingyesnot found in the text
Terms or service can change without noticeyesyes
Arbitration or class-action waiveryesyes
Popularitynone29k stars, 3.1M npm/wk

How the scores have moved

Cursor Agent SDK

Mastra

No score change since it was listed.

Verdicts

Cursor Agent SDK

An agent-as-code framework with typed tools, declared read and write effects that drive retries and dry runs, an approval gate per tool and evals that assert on tool calls. It's closed source, every model turn runs through Cursor's backend on a Cursor plan, local sandboxing is off by default, and the changelog has two entries.

Mastra

A TypeScript framework with agents, workflows with suspend and resume, memory, an MCP client and server, per-server tool approval and built-in guardrail processors including a prompt-injection detector. On 17 June 2026 malicious versions of its npm packages were published, and the CLI, server and Studio send usage analytics by default, with token counts every 15 minutes.

Before you call either

Cursor Agent SDK

  1. Install @grok/agent-sdk, not @cursor/agent-sdk from the launch post. That name answers 404 on npm
  2. Set local.sandbox before a turn reads webhook payloads, pull request diffs or chat. Without it shell commands auto-approve with the host's credentials
  3. Give every tool an effect. A tool without one counts as a write, runs once and is stubbed in dry runs
  4. Start agent-sdk serve with --bearer-token on any shared host. --allow-anonymous admits every caller as one principal
  5. Delete bot/hooks/memory.ts when sessions serve different people. The journal shares each turn's message and result with later turns

Mastra

  1. Set MASTRA_TELEMETRY_DISABLED=1 in every environment that runs the CLI, the server or Studio
  2. Pin exact versions with a lockfile, and make sure no 17 June 2026 release such as @mastra/core 1.42.1 is installed
  3. Set requireToolApproval on MCP servers that write, and allowedHosts when server URLs come from configuration
  4. Add PromptInjectionDetector as an input processor when tools return web or user content
  5. Use supervisor agents through generate() or stream(). .network() is deprecated

Questions

Which is better for AI agents, Cursor Agent SDK or Mastra?

Mastra scores 74.2 (BB) on agent readiness against Cursor Agent SDK's 63.7 (B), and leads in 6 of 7 scored categories.

Are Cursor Agent SDK and Mastra open source?

No open-source release is listed for Cursor Agent SDK. Mastra is open source (Apache-2.0 for the core. Code under ee/ directories is source-available under the Mastra Enterprise License, free for development and testing).

Other comparisons with Cursor Agent SDK or Mastra

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.