Cloud Agent 总览
基于 Cursor 官方 Cloud Agents 文档解释云端隔离环境、启动入口、GitHub/GitLab 分支流、MCP、hooks、artifacts、billing 和排障边界。
Cloud Agents(云端代理,原 Background Agents 改名而来——官方明示 "Cloud Agents were formerly called Background Agents")使用和本地 Agent 相同的基本模型,但运行在云端隔离环境里,不依赖你的本机持续在线。
阅读目标:读完本章,你应该能判断什么任务适合交给 Cloud Agent,并能解释它如何访问 repo、创建分支、运行测试、产出 artifacts 和交接结果。
1. 为什么用 Cloud Agents
| 能力 | 本地 Agent | Cloud Agent |
|---|---|---|
| 运行位置 | 你的本机或 IDE | 云端 isolated VM |
| 并行数量 | 受本机和上下文影响 | 可并行启动多个 agent |
| 本机在线 | 需要 | 不需要 |
| 构建和测试 | 依赖本机环境 | 在独立 VM 内执行 |
| UI 验证 | 本机浏览器 | 云端 desktop / browser |
| 交付 | 本地 diff | 分支、PR、artifacts、日志 |
适合 Cloud Agent 的任务通常具备三个特征:耗时较长、可以异步验收、能用分支和 PR 交付。
不适合的任务:需要你实时互动的小修、小范围只读问答、依赖本机登录态或私有 GUI 环境的操作。
2. 启动入口
官方列出的入口包括:
| 入口 | 用途 |
|---|---|
| Cursor Web | 在 cursor.com/agents 管理 agents |
| Cursor Desktop | Agent input 下拉选择 Cloud |
| Slack | 使用 @cursor 启动 agent |
| GitHub | 在 PR 或 issue 评论 @cursor |
| Linear | 使用 @cursor 启动 agent |
| API | 通过 API 启动 agent |
移动端可以把 cursor.com/agents 安装成 PWA。iOS 用 Safari 的 Add to Home Screen;Android 用 Chrome 的 Install App。
3. Repo 工作方式
Cloud Agents 通过 GitHub 或 GitLab 连接 clone repo,在单独 branch 上工作,然后把 changes push 回 repo 交接。
你需要:
- 对目标 repo 有 read-write 权限。
- 对 dependent repos 或 submodules 有必要权限。
- 连接 GitHub 或 GitLab 账号。
当前官方说明中,Bitbucket 等其他 provider 还不是主要路径。
flowchart TD
Start["Start Cloud Agent"] --> Clone["Clone GitHub / GitLab repo"]
Clone --> Branch["Work on separate branch"]
Branch --> Build["Build / test / run app in VM"]
Build --> Artifacts["Screenshots / videos / logs"]
Artifacts --> Push["Push changes to repo"]
Push --> Review["Human review and merge decision"]
4. Models 和 billing
Cloud Agents 使用 curated model selection(精选模型组合),并且总是在 Max Mode 下运行——官方说明没有 Cloud Agents 的 Max Mode off toggle,也就是用量永远按 Max Mode 速率计费,比本地 default context 烧得快。
计费按所选 model 的 API pricing。第一次使用时会要求设置 spend limit(消费上限,避免长任务无监管烧到天文数字)。
模型、价格和额度是高波动事实,采购或预算相关内容要回到当前 Cursor Models & Pricing 页面核对。
5. MCP 和 hooks
Cloud Agents 可以使用 team 配置的 MCP servers。通过 cursor.com/agents 的 MCP dropdown 添加和管理。
官方当前说明:
- 支持 HTTP 和 stdio transports。
- 支持需要 OAuth 的 MCP servers。
- HTTP MCP 更适合安全边界清晰的团队环境。
Cloud Agents 也会运行 project hooks:.cursor/hooks.json。Enterprise 计划还会运行 team hooks 和 enterprise-managed hooks。
这意味着本地 formatters、audit scripts、policy checks 可以在云端继续生效,前提是环境配置能跑起来。
6. Artifacts 和 remote desktop
Cloud Agents 会生成 artifacts 帮你验证结果:
- screenshots
- videos
- logs
- demo references
你也可以接管 agent 的 remote desktop,在云端 VM 里直接测试软件,然后把控制权交还给 agent。
商业级验收不要只看自然语言总结。至少检查:
- PR diff。
- 测试或 build 日志。
- screenshot / video artifact。
- 关键功能是否能在 remote desktop 中复现。
7. 常见排障
Agent runs not starting:
- 确认已经登录。
- 确认连接 GitHub 或 GitLab。
- 确认你有 repo 权限。
- 确认在 paid Cursor plan 上。
Secrets 不可用:
- 到 Cloud Agents dashboard 添加 secrets。
- 确认 workspace / team scope 正确。
- 新增 secret 后重启 Cloud Agent。
找不到 Secrets tab:
- 检查账号和团队权限。
Slack integration 不工作:
- 确认 workspace admin 已安装 Cursor Slack app。
- 确认你有触发权限。
深读:Cloud Agent 不是更自由的本地 Agent
Cloud Agent 的优势是隔离、异步和并行,不是可以跳过工程边界。它仍然需要 repo 权限、环境配置、secrets、网络、测试命令和审查流程。
如果没有这些,云端只会把“本地跑不起来”的问题换到另一台 VM 上。
本章自检
完成本章后,用这 3 个问题检查自己是否真正理解:
- Cloud Agent 为什么适合长任务和并行任务?
- 它如何把 changes 交回 GitHub 或 GitLab?
- 为什么 artifacts 不能替代 PR diff 和测试日志?
通过标准:你能为一个真实 repo 写出 Cloud Agent 任务 spec,包括目标、允许修改范围、测试命令、secret 边界和验收证据。
官方来源
- Cursor Cloud Agents —— 官方 Cloud Agents 总览、入口、repo 工作方式、MCP、hooks、artifacts、billing 和 troubleshooting。
- Cursor Agent Fundamentals —— 官方 Agent 基础。
- Cursor Cloud Agent Capabilities —— 官方 artifacts、computer use、MCP 和 CI autofix。
- Cursor Cloud Agent Security —— 官方安全与网络边界。