跳到正文
文章中级

构建编程智能体运行器

构建一个 Worker:把 GitHub 仓库克隆到 Linux 沙箱中,在后台让 Claude Code 执行任务,并以 diff 形式返回修改结果。

最近更新
2026年10月22日
阅读原文

该介绍目前仅提供英文版本。

You send a prompt, a coding agent edits a GitHub repository inside an isolated Linux sandbox, and you read its changes back as a diff. The runner uses Claude Code, which calls Anthropic models through AI Gateway; the Worker injects the gateway token so the sandbox never holds it.

What you’ll learn

  • Create a Sandbox SDK project
  • Restrict the sandbox’s outbound traffic to AI Gateway and GitHub
  • Run Claude Code in the background and route requests to it
  • Deploy the runner and run a task end to end

Cloudflare products used

Sandbox SDK, Workers, AI Gateway.

Follow the full, step-by-step tutorial in Cloudflare’s documentation.

继续学习