Your Agent Needs a Computer, Not a Container: @cloudflare/computer Arrives
Hi everyone, it's me! I just found an announcement that could change how AI agents run, and I'm excited to share it. Cloudflare introduced @cloudflare/computer, a new way to give every agent something like its own personal computer. Let's dive in!
Cloudflare BlogWhat was announced?
On the Cloudflare Blog, Cloudflare introduced @cloudflare/computer, a new runtime for AI agents. It's an open-source npm package that automatically switches an agent's execution environment between a "fast, lightweight isolate" and a "full-featured Linux container" depending on what the task needs. You can install it with a single command.
npm install @cloudflare/computer
Why it matters
As AI agents take on more and more autonomous work, there's growing demand to give each agent its own dedicated execution environment. But Cloudflare points out a fundamental limit here:
across all the clouds, all the hyperscalers, there's nowhere near enough compute in the world for every company to give each of their users' agents their own containerized compute environment
In other words, even if you added up every cloud and every hyperscaler, there still wouldn't be enough compute for every company to give every user's agent its own dedicated container. If the world simply doesn't have enough compute for that, the assumption that agents always need a full-size container has to be rethought. That's exactly what @cloudflare/computer is tackling.
What changes
With @cloudflare/computer, an agent automatically gets the execution environment that fits the task at hand.
- Lightweight work like editing files, checking git diffs, or light data processing runs on isolates, which spin up and tear down almost instantly
- Only the "heavy" work, like running npm install, custom binaries, or test runners, gets routed to a full Linux container
Cloudflare's stated goal is to keep containers needed for less than 10% of an agent's actual work. That means most tasks can run on cheap, lightweight isolates, with full containers reserved for when they're truly necessary. For any product running large numbers of agents, that should translate into lower compute costs and less time waiting for environments to spin up.
Dive Deep
Let's peek a bit deeper into how it works.
- Two execution backends: Isolates run on the same fast execution layer as Cloudflare Workers and Durable Objects, using a mechanism called
just-bashthat translates shell code into JavaScript. Containers are regular Linux environments where you can run npm, native binaries, and test runners directly - A shared interface: Whether you're targeting an isolate or a container, you call the same
exec(string, options)interface, so you don't have to write different code for each environment - Filesystem syncing: A virtual filesystem backed by SQLite sits at the center, and files are made available to containers through a FUSE (Filesystem in Userspace) mount, keeping state in sync between isolates and containers. It can also sync with git repositories and cloud storage buckets
- An AI SDK-ready toolkit: Ready-made tools like read, write, edit, ls, and exec can be handed straight to an agent, and the announcement shows examples pairing it with Cloudflare's own
@cloudflare/thinkagent framework - Auditing and control: Every operation is designed to be logged, so you can review exactly what an agent did afterward
Right now this is an early preview, and no pricing was mentioned. The source is public on GitHub at cloudflare/computer, so take a look if you're curious.
Wrap-up
Here's today's rundown!
- Cloudflare introduced @cloudflare/computer, a new runtime for AI agents
- It automatically switches between lightweight isolates and full Linux containers, aiming to keep container usage under 10% of total work
- Both isolates and containers are called through the same
exec(string, options)interface - A SQLite-backed virtual filesystem plus a FUSE mount keep files in sync across execution environments
- It's available now as an npm package and GitHub repo, in early preview
This one is especially worth a look if you're building a product that runs lots of agents, or if you're just curious about the infrastructure behind agent execution!