AI/TLDR

Cloudflare Computer

A virtual filesystem inside a Durable Object that gives an agent one execution surface across Workers isolates and full Linux containers

Code Sandboxes & IsolationOpen source
Updated
3 Aug 2026
Language
TypeScript
License
MIT
Coverage
1 story
$npm install @cloudflare/computer

What's new

3 Aug 2026

Cloudflare published @cloudflare/computer as a preview: a virtual filesystem in a Durable Object with a Workers-isolate backend for most tasks and a full Linux container backend for anything needing npm or native binaries.

Latest news

Overview

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, `workspace.runtime`. A single entry point — `workspace.runtime.exec(source, { backend })` — runs work, and the selected backend decides whether `source` is a shell command or an ECMAScript module. A Workspace can register several backends under stable IDs, connects them lazily on first use, and can also be constructed with no backend at all, giving you just the filesystem.

Three backends ship in the repository. The container backend projects the SQLite state into a sandbox container as a real FUSE mount, where a sandbox-side daemon called `computerd` mounts the state and syncs changes back over a capnweb RPC channel — a full Linux userland with real binaries and real network. The isolate-shell backend runs just-bash in a Dynamic Worker, reaching 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.

The repository is a small monorepo: `@cloudflare/dofs` is the Durable Object SQLite filesystem and sync protocol, `@cloudflare/computer-rpc` carries the capnweb wire types shared between the Durable Object and the daemon, `@cloudflare/computerd` is the FUSE-mounting daemon that runs in the container, and `@cloudflare/computer` is the top-level package consumed by Durable Objects. Cloudflare labels the package preview-only: the APIs are unstable, the specification under `docs/` is forward-looking intent rather than a description of the code, and it is explicitly not suitable for production yet. The project accepts issues and design proposals but not unsolicited pull requests.

What it does

  • A SQLite-backed virtual filesystem inside a Durable Object as the authoritative state for an agent's work
  • One execution entry point, workspace.runtime.exec(source, { backend }), across every registered backend
  • Container backend: computerd mounts the workspace as a real FUSE filesystem in a sandbox with a full Linux userland and network
  • Isolate shell backend running just-bash in a Dynamic Worker, talking to the Workspace over Workers RPC with no second store
  • Isolate JavaScript backend with structured input/results, durable relative imports, Workspace-backed node:fs/promises and trusted ws:git and ws:artifacts modules
  • Runnable examples for MCP, egress policies, artifacts publishing, Workers AI assets and a side-by-side container-vs-isolate runtime comparison

Getting started

Build on the top-level @cloudflare/computer package and follow its README for the entrypoint map and worked fs/runtime examples; the examples directory holds runnable Worker workspaces you can copy.

Install the package

@cloudflare/computer is the package consumed by Durable Objects; its own README carries the installation steps and the entrypoint map.

bashbash
npm install @cloudflare/computer

Pick an execution backend

exec is the single entry point. Which backend you select decides whether source is a shell command or an ECMAScript module; backends connect lazily on first use.

tsts
await workspace.runtime.exec(source, { backend })

Start from a runnable example

Each directory under examples/ is a Worker workspace with its own README — container and worker-shell expose the same write/read/exec HTTP surface, so they are the easiest way to compare backends.

bashbash
git clone https://github.com/cloudflare/computer.git
cd computer/examples/worker-shell

Read the design spec with the right expectations

The docs/ directory is a forward-looking specification — read it for intent, not as a description of the code today. docs/19_performance.md has the fs-bench numbers, including a comparison against an npm install in cloudflare/sandbox-sdk.

texttext
docs/README.md
docs/19_performance.md

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Give an agent a durable working directory whose state survives between turns and sessions
  • Run most agent work in a cheap Workers isolate and escalate only the steps that need npm or native binaries into a Linux container
  • Expose a Code Mode MCP tool backed by a durable workspace instead of a stateless sandbox
  • Enforce egress policy per execution — none, all, or a custom allowlist — across shell, JavaScript and container backends

How Cloudflare Computer compares

Cloudflare Computer alongside other open-source code sandboxes & isolation tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
Daytona★ 71.7kDaytona is an open-source runtime that spins up isolated sandboxes in under 90ms so agents can safely run and persist AI-generated code.
NVIDIA NemoClaw★ 22.5kNVIDIA's reference stack for running OpenClaw, Hermes and LangChain Deep Agents Code inside OpenShell sandboxes, adding managed inference, network policy, snapshots and CLI lifecycle control.
OpenSandbox★ 15.4kOpenSandbox gives AI agents a safe place to run code and commands, with one unified API across Docker and Kubernetes runtimes and SDKs in five languages.
E2B★ 13.8kE2B is open-source infrastructure that runs AI-generated code inside secure, isolated cloud sandboxes, controlled from JavaScript or Python SDKs.
Astrid★ 10.3kA portable Rust runtime that executes software as sandboxed WebAssembly capsules, where every file, network, process and tool call is gated by a signed, revocable, per-principal capability instead of ambient authority.
Cloudflare Computer★ 9.2kA virtual filesystem inside a Durable Object that gives an agent one execution surface across Workers isolates and full Linux containers
smolvm★ 6.1kA cross-platform CLI that boots sub-second Linux microVMs from a declarative Smolfile, so untrusted or agent-generated code runs behind a hypervisor boundary.
micropython-wasm★ 174Runs untrusted Python inside a WASI MicroPython module via Wasmtime, with memory caps, a CPU fuel budget, a wall-clock timeout and no network access.