About this project
Cloudflare Computer is a preview-stage open-source project (MIT license) that gives software agents a durable 'computer': a virtual filesystem whose authoritative state lives in SQLite inside a Cloudflare Durable Object, plus a single pluggable execution surface exposed through workspace.runtime.
Three execution backends ship today. The Container backend projects the SQLite state into a sandbox container as a real FUSE mount: a sandbox-side daemon called computerd mounts the state as a filesystem and syncs changes back over a capnweb RPC channel, providing a full Linux userland with real binaries and real network access. The Isolate shell backend runs just-bash inside a Dynamic Worker and reaches the authoritative Workspace over Workers RPC, so there is no second store or sync round trip. The Isolate JavaScript backend evaluates an ECMAScript module in a fresh Dynamic Worker with structured input and results, durable relative imports, configured libraries, Workspace-backed node:fs/promises, and trusted ws:git and ws:artifacts modules.
A Workspace may register multiple backends under stable IDs. workspace.runtime.exec(source, { backend }) is the single execution entry point, and the selected backend determines whether source is a shell command or an ES module. Backends connect lazily on first use, and a Workspace can also be constructed without any backend at all, exposing the filesystem on its own.
The project is explicitly labeled PREVIEW ONLY: APIs are unstable, the design is subject to change, and it is not suitable for production use. The specification under docs/ is forward-looking and should be read as intent rather than a description of the code today.
The repository is a small monorepo. Packages include @cloudflare/dofs (Durable Object SQLite-backed virtual filesystem, sync protocol building blocks, and a @platformatic/vfs provider for Node), @cloudflare/computer-rpc (capnweb wire types and shared server/client helpers), @cloudflare/computerd (the FUSE mount plus HTTP/WebSocket RPC daemon that runs inside the sandbox container), and @cloudflare/computer (the top-level package consumed by Durable Objects). A private Docker image context ships a prebuilt computerd linux-x64 binary, with the image rather than an npm package serving as the release artifact.
The examples directory holds runnable Workers demonstrating the public surface: a container example with write/read/exec HTTP endpoints; worker-shell and worker-javascript variants that need no container; an egress example showing none, all, and custom egress policies across backends; an MCP example exposing a Code Mode code tool backed by a durable workspace, a Worker shell, and a full Linux container; an rlm example where generated JavaScript reads long context from a Workspace, calls bounded model workers, and reduces their structured results with code; think and think-compare-runtimes examples where a @cloudflare/think chat agent uses the workspace as its working directory, including a web UI that runs the same agent task against container and worker runtimes side by side; a step-by-step tutorial that writes a markdown recipe card and runs pandoc in the container to produce a PDF; an artifacts example that generates a Worker project in a workspace and publishes it to Cloudflare Artifacts as a clone-ready repo; and an assets example that turns a prompt into an image with Workers AI and returns a shareable link.
The repo publishes filesystem benchmarks in docs/19_performance.md, where the project states that computerd's FUSE mount beats real disk on metadata-heavy work and trails it on large sequential I/O, with reproduction instructions and comparisons included.
Contribution is limited to bug reports, fix proposals, feature requests, and design proposals via issues and discussions; unsolicited pull requests are not accepted. Example Env types are generated with wrangler types rather than committed to the repo.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.