Skip to main content
Models & Technology

Cloudflare Launches New Open-Source Library, Equipping Every AI Agent with an Independent Work Computer

Cloudflare published a blog post yesterday (August 3), announcing the early preview release of the @cloudflare / computer open-source library, which independently assigns a virtual work computer to each AI agent and includes file system and command execution capabilities.

Cloudflare Launches New Open-Source Library, Equipping Every AI Agent with an Independent Work Computer

Cloudflare published a blog post yesterday (August 3), announcing the early preview release of the @cloudflare/computer open-source library, which independently assigns a virtual work computer to each AI agent and includes file system and command execution capabilities.

According to the company, unlike traditional text-based chat AI, programming AI agents need to repeatedly read source code, rewrite files, run tests, review results, and continue making corrections. They therefore need a workspace for storing the files being processed, as well as an environment in which to run programs.

The industry's mainstream approach is currently to build containers for AI agents. Containers can provide isolated Linux environments and various tools, but continuously assigning a dedicated container to every user's AI agent consumes substantial CPU and memory resources. In particular, when a system needs to run hundreds of millions to billions of AI agents simultaneously, the model of configuring a container for each agent faces scalability limitations.

Cloudflare Launches New Open-Source Library, Equipping Every AI Agent with an Independent Work Computer

Cloudflare previously introduced Isolate, a lightweight execution environment that can start quickly, into Cloudflare Workers to balance computing power and cost. Isolate handles lightweight tasks, while containers are called only for heavy workloads.

The latest @cloudflare/computer open-source library is built on Isolate and centered around workspaces. It uses SQLite to support a virtual file system and can import content from cloud storage, Git repositories, or custom files.

IT Home quoted the blog post as stating that workspaces provide AI SDK-compatible tools such as read, write, edit, ls, and exec. All operations can be subject to permission thresholds, auditing, and observability.

Cloudflare Launches New Open-Source Library, Equipping Every AI Agent with an Independent Work Computer

The package currently provides 2 types of execution backends. The isolated execution environment backend uses just-bash (a Shell-to-JavaScript tool) to convert Shell code into JavaScript and run it in a dynamic Worker, making it suitable for file processing, data processing, and Git management.

The container backend uses Cloudflare Containers to provide a complete Linux environment and mounts synchronized files through FUSE (a user-space file system), making it suitable for running npm, native binaries, and testing tools.

When an AI agent executes a command, the AI model selects an appropriate execution environment based on the tool descriptions. Lightweight tasks such as file editing, data processing, and Git repository operations are completed in the isolated environment; the system calls a container only when Linux, npm (the Node.js package manager), or compiled executables are required.

Regardless of which environment executes a task, the same set of workspace files is used, and file changes are synchronized. The system can also restrict the operations an AI agent is authorized to perform and record the tasks it has completed, making it easier to control unintended changes when autonomously rewriting files and review operation records afterward.

Cloudflare Launches New Open-Source Library, Equipping Every AI Agent with an Independent Work Computer