Skip to content
FunCoding

Search

Search docs, Skills and MCP

Agent SDK

通过 TypeScript、Python 或 Bridge 在应用中创建、接续和管理 Cursor Agent。

This page has not been translated into English yet. The original Chinese version is shown below.

SDK 将本地与云端 Agent 放到同一套编程接口中。本地指 Agent 循环和文件访问在本机,模型推理仍经过 Cursor 托管服务。只需要远程 HTTP 工作流时也可使用Cloud Agents API。

选择语言与运行时

入口适用方式
@cursor/sdkTypeScript/JavaScript,Node.js 22.13 或以上
cursor-sdkPython 3.10 或以上,同步与异步接口,内置 Bridge
SDK Bridge其他语言的 SDK 适配层,通过 Connect/protobuf 调用本地服务

本地适合已有 checkout 的脚本和 CI,云端适合远程仓库和调用方断开后继续执行的任务。SDK 不是通用 chat-completions API。

学习路径

SDK 使用与 IDE/Cloud Agents 相同的计价、请求池和 Privacy Mode 规则,用量在 dashboard 标记为 SDK。服务账号 key 计入所属团队,用户 key 计入用户套餐。

In this section