Cloudflare Computer: Why Agents Need Filesystems
Most AI agent infrastructure treats every agent like it needs a full Linux box. Spin up a container, clone a repo, install dependencies, run some commands, tear it down. It works — until you have a thousand agents running at once and your container orchestration budget starts looking like a small country’s GDP.
Cloudflare’s new @cloudflare/computer runtime, previewed on August 3, 2026 by Matt Carey and Aron Carroll, takes a different bet. Instead of giving each agent a container, give it a computer — a persistent virtual filesystem backed by SQLite, with execution backends that switch between lightweight isolates and full Linux containers depending on what the agent actually needs to do.
The distinction sounds semantic until you look at the architecture. In the container-per-agent model, state (files, dependencies, git history) is coupled to execution (the running process). If the container dies, you lose the state unless you’ve explicitly mounted volumes. If you need to run a quick bash command, you still pay for a full container start. Cloudflare Computer separates the two: state lives in a Durable Object with SQLite, and execution is a pluggable backend that mounts that state as a filesystem.
For developers building autonomous agents at scale, this separation solves real problems. Let me walk through why it matters.
The Architecture: State Is the Computer, Execution Is the Backend
A @cloudflare/computer workspace has two layers:
State layer (Durable Object + SQLite): The authoritative copy of your agent’s filesystem lives inside a Cloudflare Durable Object. Every file, directory, and git repository is stored in SQLite. Because Durable Objects are strongly consistent and survive restarts, the filesystem persists across execution sessions. Your agent can write a file in one session, crash, restart, and the file is still there.
Execution layer (pluggable backends): When the agent needs to actually do something — run a command, execute code, interact with git — the runtime picks an execution backend. Three backends ship in the preview:
-
Isolate backend: Runs inside a Cloudflare Worker isolate. Fast, cheap, and good for simple file operations, text processing, and small scripts. Cold start is near-instant.
-
Container backend: Projects the SQLite state into a sandbox Linux container as a FUSE mount. A daemon called
computerdruns inside the container, syncing filesystem changes back to the Durable Object. Use this when the agent needs to install packages, compile code, or run processes that require a real Linux environment. -
Local backend: For development. Runs the filesystem on your local machine so you can test agent workflows without deploying to Cloudflare.
The routing between backends is dynamic. The agent (or the model controlling it) can decide: “This command is just reading a config file — use the isolate. This command needs to run pytest — use the container.” The runtime handles the transition, mounting the same filesystem state into whichever backend is appropriate.
Why This Matters for Agent Infrastructure
The conventional way to give an AI agent access to a computer is through a sandbox — think E2B, CodeInterpreter, or a custom Docker setup. These work but they treat execution as the primary resource. You spin up a sandbox, do your work, and either persist the state manually or lose it when the sandbox shuts down.
Cloudflare Computer inverts this: state is the primary resource, and execution is ephemeral. This inversion has several practical effects:
Cheap persistence. An agent that sits idle costs almost nothing because the Durable Object stores its state without any running compute. In a container model, you either keep the container running (paying for idle compute) or checkpoint its state to an external volume and tear it down (complex and error-prone). With Cloudflare Computer, the agent’s filesystem just sits there in SQLite until the next execution call.
Right-sized execution. Not every agent action needs a container. If your agent is just reading a README file or checking git status, running that in a full container is wasteful. The isolate backend handles these lightweight operations at a fraction of the cost and latency. Reserve containers for the heavy lifting.
Crash recovery. If a container crashes mid-operation, the state in the Durable Object is intact. The agent can resume from its last consistent state without manual intervention. For long-running autonomous agents that might be running overnight, this matters — a crash at 3am shouldn’t wipe out an hour of work.
Tool Use and Multi-Agent Workflows
The filesystem design has interesting implications for tool use in autonomous agents. In a typical agent setup, tools are API calls: the model decides to call read_file, the framework executes it, returns the result. With Cloudflare Computer, tools can be real shell commands because the agent has an actual filesystem and execution environment.
This means you can use standard Unix tooling as your agent’s toolset: grep for search, git diff for change review, find for file discovery. The model doesn’t need custom tool definitions for every operation — it can use the same commands a human developer would use.
For multi-agent systems, shared filesystem state changes the coordination model. Instead of agents passing messages through a queue, they can read and write to a shared workspace. Agent A writes a file, Agent B reads it, Agent C runs tests against it. The filesystem becomes the communication channel. This is how human teams collaborate on code, and it maps naturally to how AI agents should collaborate too.
Getting Started: The npm Package
Cloudflare Computer ships as an npm package: @cloudflare/computer. A basic workspace setup looks like this:
import { Computer } from "@cloudflare/computer";
// Create a workspace backed by a Durable Object
const computer = new Computer();
// Populate the filesystem from a git repo
await computer.fs.git.clone("https://github.com/user/repo");
// Run a command — the runtime chooses isolate vs container
const result = await computer.exec("python tests/test_auth.py");
// Read a file from the persistent state
const config = await computer.fs.readFile("config.yaml", "utf-8");
The workspace.runtime handles backend selection. By default, simple file ops go to isolates and package installs or long-running processes go to containers. You can override this per-command if you know your workload’s requirements.
For agent frameworks like LangChain or CrewAI, you’d wrap the Computer workspace as a tool. The agent calls run_command or read_file, and the Computer runtime handles execution and filesystem persistence behind the scenes.
Limitations in the Preview
This is an early preview. A few things to keep in mind:
No persistent processes. The execution model is request-response: you run a command, get the output, the backend spins down. You can’t run a long-lived server process inside a Computer workspace. For agents that need a running web server or database, you’ll need to pair Computer with other Cloudflare products (Workers for the server, D1 for the database).
Container cold starts. While isolates start in milliseconds, containers still have a cold start penalty. If your agent switches frequently between isolate and container backends, the cumulative latency adds up. Batch container operations when possible.
Pricing TBD. Cloudflare hasn’t published pricing for Computer yet. Durable Objects and Workers have known pricing models, but the container backend is new. Budget for it as a premium feature until pricing is announced.
npm-only for now. The package is JavaScript/TypeScript only. If you’re building agents in Python, you’ll need to call the Computer API via HTTP or wait for a Python SDK. The underlying API is REST, so a Python wrapper is straightforward but not yet official.
The Technical Trade-Off: Isolates vs Containers
The magic of Cloudflare Computer is that the model (or the agent framework) can decide per-command whether to use an isolate or a container. But this flexibility comes with decisions you need to make as the developer.
Isolates run inside Cloudflare’s V8 engine with near-zero cold start. They handle file reads, text processing, git status checks, and simple scripts. If your agent mostly reads files, checks git history, and writes small outputs, it might never touch a container.
Containers give you a real Linux environment. This matters when your agent needs to install packages (pip install, npm install), compile code, or run anything that depends on native binaries. The computerd daemon syncs filesystem changes back to the Durable Object, so even container-side mutations persist.
The boundary between these backends is where things get interesting. If your agent writes a file in a container session and then immediately reads it from an isolate, the read needs to reflect the latest state. Cloudflare Computer handles this through the Durable Object’s strong consistency — writes are committed to SQLite before the execution call returns. But there’s still a tiny window: if your agent fires off two container sessions that both write to the same file, the last writer wins. This is standard filesystem semantics, but it’s worth calling out because agent frameworks that assume exclusive file access can trip on it.
Broader Implications for AI Infrastructure
Cloudflare Computer points toward a pattern I think we’ll see more of: separating durable state from ephemeral compute in agent systems. The container-per-agent model made sense when agents were experiments running on a developer’s laptop. At scale, you can’t afford a warm container for every idle agent.
This separation also changes how you think about agent lifecycle. In the container model, an agent “starts” when the container boots and “dies” when it shuts down. In the Computer model, the agent’s state is always alive — it just doesn’t have a running process attached unless it’s actively doing work. This maps better to how autonomous agents should behave: always available, only consuming resources when executing.
For the broader AI infrastructure landscape, this is one of the first managed services that treats agent state as a first-class primitive rather than an afterthought bolted onto a compute platform. Whether Cloudflare executes well on the preview will determine whether this pattern spreads to other cloud providers.
-
E2B (e2b.dev): Specialized in AI agent sandboxes with file system, process management, and internet access. More mature than Cloudflare Computer, but tightly coupled to the container model. If you need a battle-tested sandbox today, E2B is the pragmatic choice. If you’re willing to bet on the state-execution separation, Cloudflare Computer’s architecture is more forward-looking.
-
Modal: Serverless GPU compute with filesystem volumes. Great for ML inference and training workloads. Less focused on agent filesystem patterns — it’s a general compute platform, not an agent-specific runtime.
-
Fly Machines: Fast-booting microVMs with persistent volumes. Closer to the container model than Cloudflare Computer’s isolate-container hybrid. Good for long-running agent processes, less optimized for the frequent short-lived operations that characterize agent tool use.
-
DIY Docker + S3: Mount an S3 bucket as the agent’s home directory inside a Docker container. Works, but you’re managing the orchestration yourself. Cloudflare Computer’s value is taking that pattern and making it a managed primitive.
Who Should Pay Attention
You should try Cloudflare Computer if:
-
You’re already in the Cloudflare ecosystem (Workers, Durable Objects, R2) and want to add agent capabilities to your stack. The integration is seamless since Computer builds on existing Cloudflare primitives.
-
You’re building agent infrastructure where cost at scale matters. The isolate-container split means you’re not paying for container-grade compute for every
cat README.mdcall. -
You’re prototyping multi-agent systems where shared filesystem state is a natural coordination model. The persistent SQLite-backed filesystem is simpler to reason about than message queues for file-oriented collaboration.
You should wait if:
-
You need production-grade agent infrastructure today. This is a preview. APIs will change, backends will evolve, and pricing isn’t finalized.
-
Your agents need persistent long-running processes. The request-response execution model doesn’t support servers or daemons.
-
You’re building in Python and don’t want to write HTTP wrappers. Wait for the Python SDK.