TopGit
GitHub Repo Review

Cloudflare Computer: Agent Environment for Workers

cloudflare/computer
CTopGit review image for cloudflare/computer
Review by Topgit.dev for cloudflare/computer, with GitHub repository stats and README context.
Quick verdict

Cloudflare Computer gives a Durable Object a real filesystem — SQLite-backed state that three different backends can execute against, from a full Linux container to a sandboxed JavaScript module. Reach for it if you're already building agents on Cloudflare Workers and want a workspace abstraction instead of wiring your own sandbox. Skip it if you need something you can ship to production today — the maintainers say plainly it isn't ready.

Stars
★ 2.7k
Forks
⑂ 123
Language
TypeScript
License
MIT
Topic
Updated
Aug 2026
Homepage
GitHub

Understanding Cloudflare Computer

A virtual filesystem, Cloudflare Computer, functions within a Cloudflare Durable Object; its authoritative state is managed by SQLite, and a single pluggable surface, workspace.runtime, is provided for code execution. Currently, three backends are delivered: specifically, a containerized FUSE mount, a just-bash shell operating in a Dynamic Worker, and a JavaScript module runtime. This design ensures that an agent interacts with the identical workspace, regardless of the backend used to execute the code.

Core Capabilities

  • Every backend is driven through the same call — workspace.runtime.exec(source, { backend }) — with the backend ID picked per call deciding whether source is treated as a shell command or a JavaScript module.
  • The container backend projects the Durable Object's SQLite state into a sandbox as a real FUSE mount, synced back through a capnweb RPC channel — it hands the agent a complete Linux userland: actual binaries, actual network egress, not a sandboxed subset.
  • The isolate shell backend runs just-bash inside a Dynamic Worker and connects to the authoritative Workspace straight over Workers RPC — it skips the extra copy of state and the round trip needed to keep it in sync.
  • The isolate JavaScript backend evaluates an ECMAScript module in a fresh Dynamic Worker, passing structured inputs and results in and out, with relative imports that stay durable across runs and a Workspace-backed node:fs/promises standing in for the real filesystem module.
  • A Workspace can register several backends under stable IDs at once, and each one only connects the first time something actually calls it.
  • A Workspace can also be built with zero backends attached, which leaves callers with nothing but the filesystem — no execution surface at all.
  • Inside the isolate JavaScript backend, a trusted ws:git module and a trusted ws:artifacts module are available for source control and artifact work without shelling out.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history

Example Agent Workflows

  • Run an agent's shell commands and file writes through the container example, which mounts computerd inside a sandbox and exposes a write/read/exec HTTP surface backed by a Durable Object.
  • Swap the container for a Dynamic Worker running just-bash (the worker-shell example) when you want the same HTTP surface without provisioning a container at all.
  • Have an agent write a markdown file and then shell out to a real binary — the tutorial example writes a recipe card and runs pandoc on it inside the container to produce a PDF.
  • Give a chat agent a persistent working directory: the think example wires @cloudflare/think to a workspace so it's reachable from a terminal.
  • To compare backends head-to-head, think-compare-runtimes offers a web UI which executes the identical agent task concurrently on both the container and worker runtimes.
  • Have an agent scaffold a Worker project inside its own workspace and publish it as a clone-ready repo through the artifacts example.

Getting Started

The root README doesn't hand you a copy-paste install command. It tells you to install the @cloudflare/computer package and then follow that package's own README for the actual setup — the installation steps, the entrypoint map, and worked examples of the fs and runtime surfaces all live there, not in the top-level file. If you're trying to contribute rather than consume the package, CONTRIBUTING.md covers the public feedback path, and approved collaborators use COLLABORATORS.md for setup, build, and test instructions.

Running Agent Code

Every backend is driven through one call: workspace.runtime.exec(source, { backend }). The backend ID picked at call time decides how source gets interpreted — a shell command against the isolate-shell or container backend, or an ECMAScript module against the isolate-JavaScript backend. Backends aren't connected until the first exec call touches them, and a Workspace can register more than one backend under different IDs so an agent can move between, say, a fast in-Worker shell and a full container mid-task. Beyond exec, the top-level README doesn't document the rest of the method signatures — for that you're back to the @cloudflare/computer package README.

Strengths

  • One execution call, workspace.runtime.exec, works the same way whether the backend behind it is a full Linux container or a JavaScript isolate — you don't rewrite the calling code to change execution strategy.
  • The isolate-shell backend talks straight to the authoritative Workspace over Workers RPC, cutting out a second data store and the work of keeping two copies in sync.
  • Backends connect lazily, so a Workspace registered with three of them doesn't pay the cost of starting all three if an agent only ever touches one.
  • You can build a Workspace with no backend at all and get just the filesystem, useful if all you need is Durable-Object-backed file storage without code execution.
  • The maintainers are upfront about the preview status instead of dressing it up, which makes the limitations easier to plan around.

Current Status and Limitations

  • The maintainers label this preview only: APIs are unstable and the design can change, and the README says explicitly that its suitability for production use is absent at this time.
  • The specification under docs/ is described as forward-looking — it documents intent, not what the code actually does today, so it can't be treated as a spec of current behavior.
  • The repo does not accept unsolicited pull requests; contribution is limited to issues and discussions, plus a separate COLLABORATORS.md process for approved collaborators only.
  • The top-level README skips the real install and usage documentation entirely and points you at packages/computer/README.md instead, so evaluating the actual API surface means leaving this repo's front page.
  • The packages/computer package itself is flagged as work in progress, and packages/computer-computerd-linux-x64 ships a private Docker image rather than a public npm artifact — parts of the stack aren't fully public yet.

Alternative Approaches for Agent Workspaces

Common Questions

What is the license for Cloudflare Computer?

Cloudflare Computer is released under the MIT license, so you can use, modify, and redistribute the code with minimal restriction.

Is Cloudflare Computer suitable for production use?

Cloudflare Computer is not suitable for production use today — the maintainers mark it preview only, with unstable APIs and a design that's still subject to change.

What execution backends does Cloudflare Computer support?

Cloudflare Computer ships three backends: a container with a real FUSE mount and full Linux userland, an isolate shell running just-bash in a Dynamic Worker, and an isolate JavaScript runtime for ECMAScript modules.

How does Cloudflare Computer manage state?

Cloudflare Computer keeps its authoritative state in SQLite inside a Cloudflare Durable Object, and every backend reads and writes against that same store rather than keeping its own copy.

Where can I find examples for Cloudflare Computer?

Cloudflare Computer's examples/ directory holds runnable Worker projects — container, worker-shell, worker-javascript, think, think-compare-runtimes, tutorial, artifacts, and assets — each with its own README.

Does Cloudflare Computer offer performance benchmarks?

Cloudflare Computer documents filesystem benchmarks in docs/19_performance.md, covering fs-bench numbers and a comparison against a cloudflare/sandbox-sdk npm install.

The problem it solves

An agent that can only call APIs can't do the things a real developer does without thinking about it — write a file, run a compiler, chain a shell pipeline, mount a temp directory. Building that from scratch on Cloudflare Workers usually means standing up your own container orchestration plus a separate sync layer to keep it consistent with whatever state your Worker already has. Cloudflare Computer folds that state into the Durable Object itself — SQLite is the source of truth — and lets you point three different execution backends at it without writing that sync layer yourself.

Who should try it — and who should skip

Try Cloudflare Computer if you're already building agent products on Cloudflare Workers and Durable Objects and want a shared workspace abstraction instead of hand-rolling container orchestration plus a sync layer yourself — the three-backend model (container, isolate shell, isolate JavaScript) covers most of what an agent needs to touch files and run code. Skip it if you need to ship something to production this quarter, if you're not already on Cloudflare's stack, or if you need a contribution path beyond filing issues — the project doesn't take unsolicited pull requests.

Source & attribution

Based on the cloudflare/computer GitHub repository (github.com/cloudflare/computer).

GitHub data · last synced Aug 6, 2026Reviewed by Henry
Back to TopGit