WayToClawEarn
高影响cursor.com/changelog

Cursor SDK 3.7: Custom Stores, Custom Tools, Auto-Review, and Nested Subagents Transform It Into an Agent Platform

Cursor shipped SDK 3.7 on June 4, 2026, adding JSONL/Postgres metadata stores, custom tools, auto-review gates, and nested subagents to both TypeScript and Python SDKs. The release transforms Cursor from an AI-assisted IDE into a programmable agent runtime platform.

2026年6月13日 · 阅读约 4 分钟

核心结论

If you're searching "What's new in Cursor SDK June 2026," the short answer is: Cursor shipped SDK 3.7 on June 4 with support for both TypeScript and Python. Four new primitives arrived — Custom Stores (persist agent metadata to JSONL, Postgres, or any backend), Custom Tools (expose your own functions to the agent), Auto-Review (gate dangerous tool calls behind human/CI approval), and Nested Subagents (recursive agent trees of arbitrary depth). This release transforms Cursor from an "AI assistant inside an IDE" into a programmable agent platform. Developers can now build CI/CD self-healing bots, PR review pipelines, and codebase migration tools using @cursor/sdk — all included in the existing Cursor Pro ($20/mo) and Pro+ ($40/mo) subscriptions.

Body

Cursor launched its TypeScript SDK (@cursor/sdk) in public beta on April 29, 2026, giving developers programmatic access to the same agent runtime powering Cursor's desktop app, CLI, and web UI. Less than six weeks later, on June 4, Cursor shipped SDK 3.7 — the largest SDK update to date, now covering both TypeScript and Python, with four major new primitives.

1. Custom Stores: Agent Metadata Persistence

The initial SDK release only supported in-memory storage — agent state vanished after each run. SDK 3.7 introduces a pluggable store layer:

  • JSONL Store: The simplest option — write agent metadata to a JSONL file for debugging and analysis.
  • Custom Store: Implement the Store interface to persist metadata to any backend — Postgres, SQLite, Redis, S3, or your own database.
  • What gets stored: Agent run logs, tool call history, subagent invocation chains, and auto-review results.

This enables resumable agents: when a long-running agent is interrupted by a process restart, it can recover context from the store and continue where it left off.

typescript
import { Agent, JSONLStore } from '@cursor/sdk'

const agent = new Agent({
  store: new JSONLStore({ path: './agent-runs.jsonl' })
})

2. Custom Tools: Expose Any Function as an Agent Capability

This is the most impactful feature in 3.7. Developers can now register their own TypeScript or Python functions as agent tools:

typescript
import { Agent } from '@cursor/sdk'

const agent = new Agent({
  tools: [
    {
      name: 'deploy_to_staging',
      description: 'Deploy the current branch to the staging environment',
      schema: {
        type: 'object',
        properties: {
          branch: { type: 'string' },
        },
      },
      handler: async ({ branch }) => {
        const result = await yourDeploySystem.deploy(branch)
        return { success: true, url: 'https://staging.example.com' }
      },
    },
  ],
})

Key points:

  • Tools can call internal APIs, databases, cloud services, or anything Node/Python can do
  • Tool parameters are validated against JSON Schema definitions
  • Custom tools merge seamlessly with Cursor's built-in tools (file read/write, terminal, code search, etc.)

3. Auto-Review: Safety Gates for Agent Tool Calls

Giving an agent autonomous access to "dangerous" operations (deployments, file deletions, database mutations) is risky in CI/CD scenarios. Auto-Review solves this:

  • Mark any custom tool with require_review: true
  • When the agent tries to call that tool, it generates a Review Request and pauses
  • Approval can come from a human (via API/webhook callback) or an automated CI pipeline
  • Review results are written back to the Store, creating a full audit trail
typescript
const agent = new Agent({
  tools: [
    {
      name: 'delete_old_branches',
      description: 'Delete stale git branches',
      require_review: true, // ← gates this behind approval
      handler: async ({ pattern }) => { ... },
    },
  ],
})

4. Nested Subagents: Recursive Agent Architecture

SDK 3.7 allows agents to dynamically spawn subagents at runtime — which can themselves spawn subagents, forming arbitrarily deep tree structures.

Why this matters:

  • Parallelization: A parent agent can decompose a task and distribute sub-tasks to multiple subagents running concurrently
  • Specialization: Each subagent can have its own tool set and model configuration
  • Recursive decomposition: Complex tasks (e.g., "migrate the entire codebase") can be recursively broken down by directory or module

5. Other Improvements

  • Run Correlation ID: Every agent run gets a requestId for cross-system tracing
  • Lighter imports: Reduced package size and startup time
  • Reliability fixes: Fixed subagent context loss and tool call timeout issues

What This Means

SDK 3.7 marks Cursor's strategic shift from "AI-assisted coding IDE" to agent runtime platform. Developers can now build:

  • CI/CD self-healing agents: Monitor build failures → read logs → fix code → submit PR
  • Codebase migration agents: Scan code → identify deprecated APIs → auto-replace → human review → generate PR
  • PR review agents: Auto-review code quality, security, style → comment → flag reviewer attention items
  • Documentation generation agents: Scan code → extract API signatures → generate markdown → submit PR

Market Positioning

Cursor SDK's direct competitors are Claude Code's CLI mode (claude command) and OpenAI Codex CLI. But Cursor SDK has two distinct advantages:

  1. Full agent runtime, not just model API access — built-in file system, terminal execution, and code search toolchain
  2. Dual-language ecosystem: TypeScript and Python SDKs cover both frontend and backend developers

The SDK remains in public beta. Pricing is included in Cursor Pro ($20/month) and Pro+ ($40/month) subscriptions — no additional per-run costs.

Summary

Cursor SDK 3.7 (June 2026) is the company's decisive step from "AI IDE" to "Agent Platform." The four new primitives — Custom Stores, Custom Tools, Auto-Review, and Nested Subagents — extend Cursor's agent runtime far beyond code completion into CI/CD automation, codebase migration, and automated PR review workflows that previously required custom-built agent infrastructure.

cursorcodingagentautomationai coding
免责声明:本站案例均为知识分享内容,仅供灵感与参考,不构成收益承诺;由此进行的外部执行与结果请自行判断并承担相应责任。
What's New in Cursor SDK 3.7? Custom Tools, Auto-Review & Agent Platform Explained · WayToClawEarn