# Cloudflare OS v2 開源平台讓 AI Agent 在安全隔離環境中修改個人應用程式

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：Kenton Varda (@KentonVarda) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 熱度：🔥🔥🔥🔥 · 日期：2026-08-05

> 原始來源：https://x.com/KentonVarda/status/2084990137180590572

## 證據與延伸閱讀

- [cloudflare.com](https://blog.cloudflare.com/cloudflare-os/)
- [Kenton Varda 宣布 Cloudflare OS](https://x.com/KentonVarda/status/2084990137180590572)
- [Cloudflare OS 是 vibe coding 平台](https://github.com/cloudflare/cloudflare-os) — 官方 Repository

## 中文摘要

Cloudflare OS v2 開源平台讓 AI Agent 在安全隔離環境中修改個人應用程式。

**分享背景** Kenton Varda 表示，Cloudflare OS 不是「又一個附帶 connectors 的聊天機器人」，而是重新打造他 10 年前創辦的 Sandstorm.io。這次平台建立在他花 9 年參與建設的 Cloudflare Workers 上，並深度整合 AI，成為其「秘密 10 年計畫」的成果。Cloudflare OS v2 是完整重寫版，原本供 Cloudflare 內部從 engineering、sales 到其他部門使用；2026 年 8 月開放後，功能已相當完整，但仍有不少 rough edges，官方定位為 **early access**。

Kenton Varda 最重視的是個人 app 與 Agent 程式開發：使用者不必等待 SaaS 供應商排定需求，只要 prompt Agent，就能修改自己正在使用的應用程式。他也強調，這不是只服務企業的產品，雖然公告文章明確偏向 enterprise 市場，他本人也在自家地下室執行 Cloudflare OS，關注 indie 使用情境。

**平台組成** Cloudflare OS 可理解為讓公司安全使用 AI、管理 AI workloads 的 operating system，而非傳統電腦作業系統。平台主要由三部分構成：

- Agent chat UI：預載公司知識、術語、流程與 best practices，讓使用者從 browser conversation 開始，把目標轉成文件、應用程式或持續執行的 workflow。
- Gadgets：在 sandbox 中執行的小型個人應用程式。每位使用者擁有自己的 private instance，應用程式可包含 client code、server code、API 與 durable state，也能支援多人即時協作。
- Gatekeepers：位於 Agent、Gadgets 與外部服務之間的 capability-based security framework，負責資源授權、credential、稽核與具副作用操作的人工核准。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/67eaafdaf7d2467e.png)
> workspace 內建 AI 助手產出的 6 張投影片簡報預覽介面，左側顯示結構大綱與對話，右側為預覽畫面

首版平台曾遇到幾項限制：private workspace 主要只支援個人與 Agent 協作，apps 多半是靜態內容，重複工作每次都要重新執行 skill 並消耗 token；此外，MCP server 雖然能限制 Agent 可呼叫的 tools，卻不一定能說明 Agent 曾看過哪些 underlying resources。Cloudflare 因此重建平台，主張安全性必須內建，而不能要求每位 app builder 或 Agent 使用者自行正確處理。

**Gadget 與 Agent 程式開發** Gadget 的設計延續 Sandstorm 的 Grain 模型：一個文件編輯器中的每份文件，都可視為獨立 app instance，放在自己的 sandbox。即使某個 app 存在 security bug，也不會直接把其他使用者的投影片或資料洩漏給 attacker。由於每個人執行自己的 code copy，使用者可以要求 Agent 新增功能、測試與除錯，而不必修改中央 SaaS 服務。

Blueprint 是 Gadget code 的副本，不會共用原始 Gadget；他人建立 Blueprint 後，會得到獨立的 app、狀態與資料。這改變了傳統 cloud software 的假設：使用者不只消費軟體，也能用 AI 修改軟體。Gadget 還可自動具備 real-time multiplayer，透過指定使用者權限或 share link 讓協作者即時看到彼此操作。

平台的 coding agent 是 fully multi-purpose agent，不只寫 code，也能執行 arbitrary tasks。它屬於 Code Mode agent，會撰寫並立即執行 code snippets，並透過 Gadget API 與 Gatekeepers 存取外部資源。Cloudflare 表示，因為平台整合度高、執行環境較簡化，即使使用相同 underlying models，coding agent 往往能比 general-purpose coding agent 更快、表現更好，並使用更少 token；它也支援 major AI model providers 與 self-hosted models。簡化後的 Gadget environment 甚至讓 local LLM 能 reasonably handle coding，雖然仍可能需要使用者回饋錯誤協助它修正。

**Gatekeepers 與權限治理** Gatekeepers 類似功能更完整的 MCP servers，但不是只暴露 tools，而是提供 Cap'n Web RPC API，讓 Agent 與 Gadget 都能使用。每個 external service 可由獨立 Worker 實作，負責理解 API、處理 OAuth、保存 credential、套用 policy、限制 resource、記錄存取內容與操作結果。既有的 MCP server 仍可透過 MCP Server Portals 使用，MCP 本身也算一種 Gatekeeper。

它也把人工核准整合到 UI：

- side-effecting action 會留下 audit log，並可要求 human-in-the-loop approval。
- Agent 不必同步停下等待；Gatekeeper 會先 simulate outcome，讓 Agent 繼續排隊其他工作。
- 使用者最後可批次或逐項 approve／reject，降低因 Agent 卡住而啟用 auto-approve 的誘因；來源也特別提醒，不應使用 `--dangerously-skip-permissions`。

Cloudflare 目前已提供 GitHub、Google、Cloudflare、Supabase、Notion、Confluence、Email Workers、Home Assistant、Slack、Spotify 與 ZoomInfo 的 Gatekeeper 文件：[GitHub API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-github/README.md)、[Google API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-google/README.md)、[Cloudflare API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-cloudflare/README.md)、[Supabase API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-supabase/README.md)、[Notion API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-notion/README.md)、[Confluence API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-confluence/README.md)、[Email Workers](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-email/README.md)、[Home Assistant](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-homeassistant/README.md)、[Slack API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-slack/README.md)、[Spotify](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-spotify/README.md) 與 [ZoomInfo API](https://github.com/cloudflare/cloudflare-os/blob/main/packages/gatekeeper-zoominfo/README.md)。官方也在打造 software factory，未來希望能從任意服務的 API 文件產生 Gatekeeper；目前則可使用提供的 Gatekeepers，或透過 `write-gatekeeper` skill 自行建立。

**安全模型與資料流向** Cloudflare OS 採取「預設零權限」。即使 workspace 已設定外部帳戶，Agent 與 Gadget 仍不能自動使用；使用者必須貼上 GitHub repository 連結、按下「add resource」，或在 Agent 提出請求後明確允許。這比預先配置 MCP servers、讓服務在每次 chat 中 ambiently 可用更受限。

Server code 在停用 global outbound networking 的 Dynamic Worker 中執行，只能透過明確指定的 Workers Bindings 存取外部資源；client code 則在 sandboxed iframe 中執行，受到 `postMessage()`、Cap'n Web RPC session、`Content-Security-Policy` 與 iframe sandbox settings 限制。授權會以 typed binding 傳入 generated code，credential 不會暴露給 Agent 或 generated code：

```typescript
const issues = await env.PROJECT.listIssues({
  teamId: "ENG",
  state: "open",
});
```

`env.PROJECT` 代表特定 policy 下、指向特定 resource 的 capability。Gatekeeper 甚至能只開放單一 GitHub repository、只准讀 issues 而不准讀 source code、遮蔽欄位、套用 rate limits，並在 merge pull request 前要求核准。

Cloudflare 也反思，僅控制最初的 read 不夠。若 Agent 讀取 data warehouse 的 sensitive table，再製作一個 live dashboard，分享 dashboard 不應成為繞過原始權限的方式。平台會記錄 Agent 觀察過的每個 resource，並在他人開啟 workspace、與 Agent 互動或查看產出時重新驗證權限；這些紀錄也可限制 Agent 寫入資料來源、邀請 collaborators、交給另一個 Agent，或發出 outbound request。直接把 API keys 交給人或 Agent，則被作者認為危險且難以擴展，因為 keys 往往權限廣泛、有效期長，也難以限制、分享與 audit。

**技術架構與部署** Cloudflare OS 建立於 [Cloudflare Workers](https://workers.cloudflare.com)，大量使用 [Durable Objects](https://developers.cloudflare.com/durable-objects/)、[Dynamic Workers](https://blog.cloudflare.com/dynamic-workers/) 與 [Facets](https://blog.cloudflare.com/durable-object-facets-dynamic-workers/)：每個 workspace 是 Durable Object，每個 Gadget 在 Dynamic Worker Facet 中執行，並擁有獨立 SQLite database。Cap'n Web 是 Cloudflare 的 open source object-capability RPC system，Gadget client 與 server 可用低 boilerplate 互通，Agent 也能呼叫相同 API：

```javascript
const issues = await app.listIssues({
 status: "done",
});
```

概念上，`packages/workshop-backend` 是 kernel，`packages/gatekeeper-*` 是 device drivers，`packages/workshop-frontend` 是 shell，Gadgets 是 processes，Blueprints 是 executables，shared permissions 則對應 ACLs；但作者強調，Agent 不應只被視為 users，也應對 human user 負責並持有受限 permissions。

專案已以 Apache 2.0 license 開源，程式庫位於 [cloudflare/cloudflare-os](https://github.com/cloudflare/cloudflare-os)。目前尚未提供可直接造訪的線上版本，Kenton Varda 說團隊尚未準備好正式 launch，因此選擇先開源，而不是預先宣布 vaporware。Cloudflare OS 可部署到自己的 Cloudflare account，也可在開源 [workerd](https://github.com/cloudflare/workerd) 上自架；不過 workerd 部署目前標示 **COMING SOON**，文件與 tooling 尚未成熟。

本機快速體驗需先安裝 [pnpm](https://pnpm.io/)，再執行以下指令；這個流程透過 `wrangler` 與 `workerd` 啟動整個 stack，資料會存放在 `.wrangler`，**僅適合快速體驗，不適合 production**：

```bash
pnpm run-local
```

啟動後前往 [http://localhost:8787](http://localhost:8787)。也可使用 [Cloudflare account deploy flow](https://os.cloudflare.app/deploy) 部署；較複雜、需要 Gatekeepers 或修改 code 的情況，則使用 [deployment starter repo](https://github.com/cloudflare/cloudflare-os-starter)。開發模式需在兩個 terminal 分別執行：

```bash
pnpm dev-server
pnpm dev-client
```

接著前往 [http://localhost:3000](http://localhost:3000)。自有 server 的 workerd 設定可參考 [workerd config documentation](https://github.com/cloudflare/workerd/blob/main/src/workerd/server/workerd.capnp)。

**開源策略與限制** Cloudflare OS 的目標不是要求所有公司直接採用 Cloudflare 的版本，而是讓各組織複製並客製化成「Your Company OS」。公司可以接上 internal systems、加入自己的 shared skills 與 institutional context、修改 UI、配置 deployment pipelines，並使用 Cloudflare Access、AI Gateway、data 與 integrations。Cloudflare 也將釋出依內部運作方式建立的 example deployment repository，該 repository 不會 patch core，而是放置 configuration、custom UI、internal integrations 與 analytics。

目前一般外部 contribution 不開放。團隊認為 AI 已讓寫 code 變得容易，真正困難的是 review、維持品質與產品一致性；因此只接受小型、可 trivially verify 的修正，超過約十來行或低價值 PR（例如 typo fixes）會被關閉，大型想法可提交至 [GitHub Discussions](https://github.com/cloudflare/cloudflare-os/discussions)。Cloudflare 的公告文章〈Cloudflare OS: an open platform for agents, apps, and work〉由 **Phillip Jones** 與 **Dan Carter** 撰寫；文章指出，首版在今年 5 月向 Cloudflare 全體開放後，已有數千人每天用來建立文件、簡報、data visualization apps 與自動化重複工作。

**實際影響** Cloudflare OS 的核心主張，是把「每個人都有自己的 AI workspace 與可修改軟體」從概念變成可部署的架構。Agent 可研究問題、以 code 搜尋與分析資料，只把必要結果放入 context window；也能產生連接 live data 的 docs、slides、spreadsheets，或把已知步驟轉成可按需、排程或由 connected system event 觸發的 mostly deterministic workflows，只在需要判斷時使用 model。

平台目前仍處於 early access，並非沒有成本或成熟度問題；但 Kenton Varda 認為，當 AI 已能協助一般使用者修改自己的 app，過去 25 年以 centralized cloud software／Software as a Service 為中心的模式就不再是唯一合理答案。Cloudflare OS 以沙盒、細粒度 capability 與可追蹤資料流向，試圖讓「讓使用者自由 vibe code」不必等同於放棄企業安全。相關公告可參考 [Cloudflare OS 部落格文章](https://blog.cloudflare.com/cloudflare-os/) 與 [Cloudflare OS landing page](https://os.cloudflare.app/)。

## 標籤

開源專案, Agent, 新產品, Cloudflare, Sandstorm.io, Cloudflare Workers
