linkgo
Cloudflare Computer

Cloudflare Computer

AI

Cloudflare's virtual filesystem for AI agents — a Durable Object-backed workspace with three pluggable execution runtimes.

-(0 Reviews)
Free Available
Starting from Free

About Cloudflare Computer

Cloudflare Computer gives AI agents a computer to run on. The public @cloudflare/computer package exposes a Workspace whose authoritative state lives in a Durable Object's SQLite store, with one pluggable execution surface — workspace.runtime.exec — that lets an agent run shell commands or ECMAScript modules against that filesystem. Three backends ship today: a Container backend that FUSE-mounts the workspace into a real Linux sandbox with full userland and network, an Isolate Shell backend that runs just-bash inside a Dynamic Worker with no second store, and an Isolate JavaScript backend that evaluates ES modules in a fresh Dynamic Worker with structured I/O, durable relative imports, and trusted ws:git / ws:artifacts modules. Multiple backends can register under stable IDs on the same Workspace, and callers can even skip the runtime entirely and just get the filesystem. The project is a preview release with an evolving spec under docs/ and worked examples for container, worker-shell, worker-javascript, egress policies, and a full 'think' agent tutorial.

Key Features

Durable Object Workspace: The authoritative filesystem state lives in a Durable Object's SQLite store, so agent state is transactional, colocated, and survives worker restarts.
Pluggable Runtime Backends: One workspace.runtime.exec entry point lets a Workspace register multiple execution backends under stable IDs and pick per call.
Container Backend: Projects the SQLite state into a sandbox container as a real FUSE mount via computerd — full Linux userland, real binaries, real network.
Isolate Shell Backend: Runs just-bash inside a Dynamic Worker that reaches the authoritative Workspace over Workers RPC — no container, no second store, no sync round trip.
Isolate JavaScript Backend: Evaluates ES modules in a fresh Dynamic Worker with structured input/results, durable relative imports, Workspace-backed node:fs/promises, and trusted ws:git and ws:artifacts modules.
Egress Policy Controls: The examples/egress worker demonstrates matching none, all, or custom egress policies across all three backends for the same request.
Filesystem-only Mode: A Workspace can be constructed without any backend at all, giving agents just the filesystem surface for tools that don't need execution.
Worked Examples: The examples/ directory ships runnable Workers — container, worker-shell, worker-javascript, egress, think, and a compare-runtimes UI — each with its own README.

Use Cases

Building Coding Agents on Workers: Give a Workers-native agent its own filesystem and shell so it can write code, run tests, and produce artifacts without leaving Cloudflare's edge.
Comparing Runtimes Side-by-side: The examples/think compare-runtimes UI runs the same task against the container and worker runtimes to profile latency, isolation, and cost.
Sandboxed User Scripts: Run untrusted user-supplied JavaScript against a per-user Workspace filesystem in an Isolate JavaScript backend with configurable egress.
Agent Working Directories: A think-style chat agent uses the Workspace as its scratch directory, so files it writes are durable across sessions and reachable by other backends.
Prototyping Multi-tenant Runtimes: Preview surface for teams designing agent-runtime products on top of Durable Objects, without committing to a single backend design.
Document Generation Pipelines: The tutorial builds one endpoint whose agent writes a markdown recipe card on the host and runs pandoc in the container to produce a PDF.

Frequently asked questions about Cloudflare Computer

What is Cloudflare Computer?

Cloudflare Computer is a virtual filesystem designed for AI agents, utilizing Durable Object technology to create a workspace that supports three pluggable execution runtimes. This environment allows developers to efficiently run AI applications with improved scalability and performance.

Key Points

  • Durable Object Technology: Ensures persistent data storage and quick access.
  • Three Execution Runtimes: Supports diverse programming environments for flexibility.
  • Optimized for AI Applications: Enhances performance and scalability for AI workloads.

Detailed Explanation

Cloudflare Computer leverages its proprietary Durable Object technology, which allows for persistent storage that retains state and data across different sessions. This is crucial for AI agents that require consistent and reliable access to data. The system's architecture is designed to manage workloads efficiently, making it ideal for applications that need to scale rapidly.

The three pluggable execution runtimes within Cloudflare Computer provide developers with the ability to choose the environment that best suits their needs. This flexibility enables the integration of various programming languages and frameworks, accommodating a range of AI applications, from natural language processing to image recognition.

For example, a developer working on a machine learning model can use one runtime to train the model while simultaneously deploying it on another runtime, ensuring that updates and modifications can be made without downtime. This versatility not only enhances productivity but also enables rapid iteration and deployment of AI solutions.

Best Practices / Tips

  • Choose the Right Runtime: Assess the specific requirements of your AI application to select the most suitable runtime. Consider factors like language support and performance benchmarks.
  • Leverage Durable Objects: Use the capabilities of Durable Objects to store essential data and minimize latency, leading to more efficient AI operations.
  • Monitor Performance: Regularly analyze the performance of your applications within Cloudflare Computer to identify bottlenecks and optimize resource allocation.

Additional Resources

How does Cloudflare Computer work?

Cloudflare Computer operates by integrating various components, including Durable Object Workspace for persistent state management, pluggable runtime backends for flexibility, and multiple execution environments like container and isolate backends. This architecture enables efficient coding, testing, and artifact generation within Cloudflare's edge network.

Key Points

  • Durable Object Workspace: Provides persistent filesystem state.
  • Pluggable Runtime Backends: Supports multiple execution environments.
  • Isolate Backends: Facilitates secure execution of user scripts.

Detailed Explanation

Cloudflare Computer is designed to enhance the development experience on its edge network. Here’s how each component contributes:

  1. Durable Object Workspace: This is at the heart of Cloudflare Computer, where the authoritative filesystem state is stored using SQLite. This ensures that the state is transactional, colocated, and resilient against worker restarts. For example, if a worker crashes, the Durable Object retains its state, allowing for seamless recovery and continuity.

  2. Pluggable Runtime Backends: The architecture allows a single workspace to register multiple execution backends under stable IDs. This means developers can select the most suitable backend for each call. For instance, a workspace can execute tasks in both a container backend, which offers a full Linux environment, and an isolate backend, which is more lightweight and focused.

  3. Container and Isolate Backends:

    • Container Backend: Projects the SQLite state into a sandbox container, providing a full Linux userland. This is ideal for running complex applications that require real binaries and networking capabilities.
    • Isolate Shell Backend: Executes bash commands within a Dynamic Worker, reaching the authoritative Workspace via Workers RPC, thus avoiding the overhead of a container and syncing delays.
    • Isolate JavaScript Backend: This backend evaluates ES modules in a fresh Dynamic Worker environment, offering features like durable relative imports and trusted modules, which are crucial for building reliable applications.

These components empower developers to create coding agents that can write, test, and deploy code directly within Cloudflare's ecosystem. For example, a think-style chat agent can utilize the Workspace as a scratch directory, ensuring that files created are durable and accessible across different sessions.

Best Practices / Tips

  • Utilize Durable Objects: Always leverage Durable Objects for stateful applications to ensure data integrity and resilience.
  • Select Appropriate Backend: Choose the right backend based on your application's needs for isolation, performance, or complexity.
  • Prototype Efficiently: Use the multi-tenant runtime preview to experiment with different backend designs without committing prematurely.

Additional Resources

What are the main features of Cloudflare Computer?

Cloudflare Computer offers several key features, including Durable Object Workspace for transactional file management, pluggable runtime backends for flexible execution, and specialized backends like Container and Isolate Shell for enhanced processing capabilities. These features enable developers to build scalable, efficient applications with minimal overhead.

Key Points

  • Durable Object Workspace: Provides a transactional filesystem state using SQLite.
  • Pluggable Runtime Backends: Facilitates multiple execution environments within a single workspace.
  • Container and Isolate Backends: Offers unique processing environments for diverse workloads.

Detailed Explanation

Cloudflare Computer is designed to optimize application performance and scalability through its unique features:

  1. Durable Object Workspace: This feature allows developers to maintain authoritative filesystem states in a Durable Object's SQLite store. It ensures that the agent states are transactional, meaning that all changes are recorded reliably. This state management survives worker restarts, providing resilience in application performance.

  2. Pluggable Runtime Backends: One of the standout features is the ability to register multiple execution backends using a single workspace.runtime.exec entry point. This flexibility allows developers to choose the most suitable backend for each call, enhancing the efficiency of resource usage and execution speed.

  3. Container Backend: This backend projects the SQLite state into a sandbox container, simulating a full Linux userland. It allows developers to run real binaries and access real network functionalities, making it ideal for applications requiring full system capabilities.

  4. Isolate Shell Backend: This backend runs a bash shell in a Dynamic Worker, connecting to the authoritative Workspace via Workers RPC. It eliminates the need for a separate container or sync round trips, streamlining processes for lightweight tasks.

  5. Isolate JavaScript Backend: This backend evaluates ES modules in a Dynamic Worker environment, supporting structured input and results. It also includes durable relative imports and is equipped with trusted modules like ws:git and ws:artifacts, enabling secure and efficient module handling.

Best Practices / Tips

  • Choose the Right Backend: Analyze your application needs to select the appropriate backend. For instance, use the Container Backend for complex applications needing full system access, while opting for Isolate Shell for simpler command-line tasks.
  • Optimize Resource Allocation: Monitor performance and adjust resource allocation in your workspace to ensure efficient execution and scalability.
  • Leverage Durable Objects: Utilize Durable Object state management to maintain consistency across application instances, especially in distributed environments.

Additional Resources

Who is Cloudflare Computer for?

Cloudflare Computer is designed for developers and teams looking to create coding agents, compare execution runtimes, run untrusted scripts, and prototype multi-tenant applications. It provides a versatile environment for building and testing applications at the edge, catering to various use cases in real-time software development.

Key Points

  • Building Coding Agents: Create agents that utilize Cloudflare Workers.
  • Comparing Runtimes: Analyze performance metrics between different execution environments.
  • Sandboxed User Scripts: Safely execute user-generated JavaScript in isolated environments.

Detailed Explanation

Cloudflare Computer offers a robust platform for developers and teams engaged in a range of software development tasks:

  1. Building Coding Agents: With Cloudflare Computer, developers can create Workers-native agents that operate in a unique environment with their own filesystem and shell. This enables agents to write code, conduct tests, and generate artifacts without leaving the Cloudflare edge. For instance, a developer can build a coding agent that automatically implements updates or runs diagnostics on deployed applications, ensuring seamless integration with existing workflows.

  2. Comparing Runtimes Side-by-Side: The platform features an intuitive compare-runtimes UI, allowing users to run the same task on both container and worker runtimes. This side-by-side comparison helps profile key performance metrics such as latency, isolation, and cost. Teams can leverage this information to make informed decisions about optimizing their applications for better performance and reduced expenses.

  3. Sandboxed User Scripts: Cloudflare Computer provides a secure environment for executing untrusted user-supplied JavaScript. The Isolate JavaScript backend ensures that scripts run in a per-user Workspace filesystem, preventing any harmful interactions with the broader system. This is particularly useful for platforms that allow user-generated content, as it mitigates security risks.

  4. Agent Working Directories: The think-style chat agent can utilize the Workspace as a persistent scratch directory. Files written by the agent are durable across sessions and can be accessed by other backends, facilitating better state management and continuity in conversations or tasks.

  5. Prototyping Multi-tenant Runtimes: Cloudflare Computer enables teams to design agent-runtime products using Durable Objects without committing to a specific backend architecture. This flexibility is crucial for teams exploring innovative solutions in multi-tenant environments, allowing for rapid iteration and testing.

Best Practices / Tips

  • Leverage Cloudflare's Edge: Take full advantage of the edge computing capabilities to enhance application performance and reduce latency.
  • Test Thoroughly: Always compare runtimes during development to ensure optimal performance and identify any potential bottlenecks early on.
  • Utilize Sandboxing: Make use of the sandboxed environment to safely test user-generated scripts and maintain a secure application ecosystem.

Additional Resources

How much does Cloudflare Computer cost?

Cloudflare Computer is free to use for developers and businesses, providing a serverless environment to run applications without incurring costs. This makes it an attractive option for startups and small projects that require scalability without the financial burden.

Key Points

  • Free to Use: Cloudflare Computer offers a no-cost entry point.
  • Serverless Architecture: Enables efficient application deployment without managing servers.
  • Scalability: Perfect for growing projects needing flexible resources.

Detailed Explanation

Cloudflare Computer operates on a serverless architecture, allowing developers to deploy applications without worrying about server management. This service is part of Cloudflare's broader suite of tools designed to enhance performance and security for web applications.

Use Cases:

  1. Web Applications: Developers can host dynamic web applications that scale automatically based on traffic without incurring server costs.
  2. API Development: Easily create and manage APIs, utilizing Cloudflare's globally distributed network for low-latency access.
  3. Microservices: Deploy microservices efficiently, allowing for modular application development and reducing deployment times.

Cloudflare Computer can be integrated with other Cloudflare services such as Workers and Pages, enabling developers to create complex applications with minimal overhead.

Best Practices / Tips

  • Monitor Usage: Although it's free, keep an eye on resource usage to avoid potential scalability issues.
  • Optimize Code: Write efficient code to enhance performance and reduce execution time, which is crucial in a serverless environment.
  • Leverage CDN: Utilize Cloudflare's Content Delivery Network (CDN) to improve load times and reduce latency for users worldwide.

Additional Resources

For more detailed insights, consider exploring Cloudflare's official resources or community forums for tips and shared experiences from other users.

How do I get started with Cloudflare Computer?

To get started with Cloudflare Computer, visit GitHub Cloudflare Computer. There, you can sign up for an account, access the documentation, and explore examples to help you understand how to leverage Cloudflare's powerful computing platform effectively.

Key Points

  • Accessing the Platform: Sign up via GitHub.
  • Documentation and Resources: Explore comprehensive guides and tutorials.
  • Use Cases: Understand practical applications of Cloudflare Computer.

Detailed Explanation

Cloudflare Computer is a serverless computing platform that allows developers to run code at the edge of the network, providing low-latency access for global users. To get started, follow these steps:

  1. Sign Up: Go to GitHub Cloudflare Computer and create an account. You will need a GitHub account to proceed.

  2. Explore Documentation: Familiarize yourself with the official documentation available on the GitHub repository. This includes setup guides, API references, and examples that demonstrate various functionalities.

  3. Set Up Your Environment: Install the required tools, such as Node.js or Python, depending on your preferred programming language. Ensure you have the Cloudflare CLI installed for easier deployment and management of your projects.

  4. Create Your First Project: Use the examples in the documentation to create a simple application. You can start with basic functions like HTTP responses or more complex tasks like interacting with databases.

  5. Deploy and Test: Once your application is ready, deploy it to the Cloudflare network using the CLI. Test your application to ensure it runs smoothly and meets performance expectations.

Best Practices / Tips

  • Start Small: Begin with simple projects to get accustomed to the platform's capabilities.
  • Utilize Community Support: Engage with the Cloudflare community and forums to ask questions and share experiences.
  • Monitor Performance: Use Cloudflare’s built-in analytics tools to monitor your application’s performance and make adjustments as needed.
  • Stay Updated: Follow updates on the GitHub repository to learn about new features and improvements.

Additional Resources

Explore more AI Ai Services tools

Browse all Ai Services tools →

Browse by use case: Code Generation

Compare Cloudflare Computer: vs Execlave · vs Trigger.dev · vs Cerenovus · vs Portfolio Lab