Cloudflare has introduced Cloudflare Computer, a new open-source runtime designed to give AI agents something closer to a real "computer" rather than ephemeral containers. It leverages Cloudflare V8 isolates for fast serverless execution, making agents cheaper, faster, and more scalable, according to the company.
Cloudflare Computer attempts to tackle a major challenge in AI agent deployment. The company argues that relying on containers to run agents will not scale to "hundreds of millions, then billions, of concurrent agents" because there simply isn't enough global compute capacity for that.
To address this, the @cloudflare/computer package introduces an agent runtime where the platform decides whether code runs in an isolate, a container sandbox, or a web browser. In this model, "each agent gets a computer, the runtime optimizes for efficiency, and scalability".
Our goal with @cloudflare/computer is to provide an agent with a runtime where a container is required for less than 10% of its work, and coding tasks, audio/video manipulation, and document creation can all be handled by isolates.
According to Cloudflare, isolates, introduced with Cloudflare Workers, are "infinitely horizontally scalable" and can start and shut down extremely quickly. Additionally, they can persist agent state, hibernate when the agent is not running, and spin up their own container sandboxes when needed. Cloudflare maintains that this combination of isolates and container sandboxes is extremely effective because it combines horizontal and vertical scalability:
Cloudflare’s architecture has been designed to run the agent harness in the isolate (in a Durable Object) and call an attached container on-demand as a tool. This allows you to utilize heavier compute primitives only when required, optimizing performance and cost.
One central piece in this architecture is a shared, SQLite-based filesystem accessible to both isolates and containers. This lets tasks move seamlessly between the two, with the shared filesystem letting them work on the same files. Cloudflare Computer filesystems can be used with git repositories, storage buckets or arbitrary files, while ensuring all operations are gated, audited, and observed.
Currently, Cloudflare Computer provides three backends: container projects, where the SQLite state is exposed as a sandboxed container as a real FUSE-mounted filesystem; isolate shells, which runs just-bash environment in a Dynamic Worker; and isolate JavaScript, which runs an ECMAScript module in a fresh Dynamic Worker.
Cloudflare Computer is still an early preview and is only suitable for experiments, exploration and prototypes, says Cloudflare.