Cloudflare OS is an open-source AI workspace uniting an agent chat UI, sandboxed app development (Gadgets), and security controls (Gatekeepers) into three integrated capabilities, with architecture mirroring a traditional operating system. The codebase centers on packages/workshop-backend (kernel), packages/workshop-frontend (shell), and communication via Cap'n Web RPC over persistent WebSocket between client and server.
Cloudflare OS is an AI productivity workspace originally developed for internal use at Cloudflare and now open-sourced so organizations can copy and customize it as their own company OS.[1] Cloudflare OS provides three core capabilities: an agent chat UI preloaded with company knowledge, sandboxed AI-built app development (Gadgets), and a security framework (Gatekeepers) that enforces guardrails for both agents and apps — covered in detail on the Gadgets and blueprints, Agent and chat, and Gatekeepers pages respectively.[1]
The codebase maps onto a traditional OS: packages/workshop-backend is the kernel, packages/gatekeeper-* are device drivers, packages/workshop-frontend is the shell, gadgets are processes, and blueprints are executables.[1]
packages/workshop-frontend is a pure single-page app (React + Kumo UI + Phosphor icons + Vite) that communicates with the backend exclusively over a persistent WebSocket using Cap'n Web RPC.[2] packages/workshop-shared defines the application's RPC interface between frontend and backend using Cap'n Web — a protocol with similar semantics to Cloudflare Worker-to-Worker RPC that runs in a browser over WebSocket — with the root API defined in packages/workshop-shared/src/api.ts.[2] packages/configurator-ui provides type-only component helpers used by optional gatekeeper resource configurator UI modules, compiled by scripts/build-gatekeeper-configurator.mjs as part of package builds.[2] Bundled format blueprints live in packages/workshop-backend/format-blueprints/ as <name>.gadget archives plus <name>.json sidecars; scripts/build-format-blueprints.mjs bundles that directory (overridable with FORMAT_BLUEPRINTS_DIR) into a generated module.[3] packages/workshop-backend/src/server.ts re-exports all Durable Object entrypoint classes for wrangler binding, including OverseerDurableObject, GatekeeperLoopback, GatekeeperHookLoopback, CodeModeTailLoopback, AgentSpawnerGatekeeper, GadgetTailLoopback, AgentSelfLoopback, TransientStubLoopback, UserDurableObject, GatekeeperConnectCallbackImpl, PendingLogin, LoginConnectCallbackImpl, LanguageModelGatekeeper, AdminSettings, and ExternalMessageGateway.[4] The workshop-backend Worker's main entry point is .wrangler/validate/src/server.ts, a path generated by the capnweb-validate layer rather than pointing directly to src/server.ts.[5] packages/gatekeeper-context/src/index.ts is the Context Library worker entry point, exporting ContextCollectionDurableObject, UserLibraryDurableObject, LibraryRegistryDurableObject, GatekeeperVendor, ContextAccount, ContextVerifier, and ContextGatekeeper; its default HTTP handler returns a plain-text health-check response and is not used for product traffic.[6]
The project accepts only small, trivially-verified PRs of roughly a dozen lines or fewer that fix a concrete problem; low-value changes such as typo fixes are also declined.[7] Large ideas should be proposed as GitHub Discussions rather than PRs, as unsolicited large PRs will be closed.[7]
Sources