StackMap
Subscribe
Explore / computer
cloudflare

computer

Virtual filesystem for agents inside a Cloudflare Durable Object — SQLite-authoritative state with pluggable execution: FUSE-mounted containers, isolate shell (just-bash) or isolate JavaScript.

5,678 286 TypeScript MITupdated yesterday
View on GitHubDispute this mapping →
Curator's take

The interesting inversion: the filesystem is the durable object and execution surfaces attach to IT — container, isolate shell and isolate JS all project the same authoritative SQLite state, so agent state survives any runtime. When NOT: PREVIEW ONLY by its own banner — APIs unstable, explicitly not for production, and the spec docs describe intent, not the code; it's also Cloudflare-shaped through and through — no Workers, no computer.

Mapped by ShipWithAI editors · links verified
README.md

Cloudflare Computer

Cloudflare Computer is a virtual filesystem that lives inside a Durable Object. The Durable Object holds the authoritative state in SQLite and exposes one pluggable execution surface through workspace.runtime. Three backends ship today:

  • Container projects the SQLite state into a sandbox container as a real FUSE mount. A sandbox-side daemon (computerd) mounts the state as a filesystem and syncs changes back over a capnweb RPC channel. Full Linux userland, real binaries, real network.
  • Isolate shell runs just-bash in a Dynamic Worker. It reaches the authoritative Workspace over Workers RPC, so there is no second store or sync round trip.
  • Isolate JavaScript runs an ECMAScript module in a fresh Dynamic Worker with structured input/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; the selected backend defines whether source is a shell command or an ECMAScript module. Backends connect lazily on first use.

Workspace can also be constructed without a backend at all, giving callers the filesystem on its own.

[!IMPORTANT] PREVIEW ONLY This package is provided as a preview for feedback only. APIs are unstable and the design is subject to change.

Suitable for experiments, exploration and prototypes. It is NOT suitable for production use at this time.

The specification under docs/ is forward-looking — read it for intent, not as description of the code today.

Using it

If you want to build on Cloudflare Computer, install @cloudflare/computer and follow that package's README — it has the installation steps, the entrypoint map, and worked examples of the fs and runtime surfaces.

To contribute feedback, see CONTRIBUTING.md. Approved collaborators should follow COLLABORATORS.md for setup, build, and test instructions.

Examples

The examples/ directory holds runnable consumers of the public surface. Each is a Worker workspace with its own README.

  • examples/container — runs computerd inside a container, mounts a workspace, and talks to a Durable Object over capnweb. A write / read / exec HTTP surface.
  • examples/worker-shell — same HTTP surface as the container example, but the shell runs just-bash in a Dynamic Worker loaded through env.LOADER. No container.
  • examples/worker-javascript — mirrors worker-shell, but exec evaluates an ECMAScript module in a Dynamic Worker instead of running a shell command.
  • examples/think — a @cloudflare/think chat agent that uses the workspace as its working directory, reachable from a terminal.
  • examples/think-compare-runtimes — a web UI that runs the same agent task against the container and worker runtimes side by side.
  • examples/tutorial — a step-by-step build: one endpoint, one agent that writes a markdown recipe card on the host and runs pandoc on it in the container to produce a PDF.
  • examples/artifacts — generates a Worker project in a workspace and publishes it to Cloudflare Artifacts as a clone-ready repo.
  • examples/assets — turns a prompt into an image with Workers AI, writes it to the workspace, and returns a shareable link through @cloudflare/computer/assets.

Repository layout

The repo is a small monorepo. Each package has its own README with package-specific status a

Continue your stack

What teams reach for next — and why each earns a place beside computer. Ranked by curator confidence.