How to Orchestrate AI Agent Runtimes With @cloudflare/computer
Learn to deploy and scale autonomous AI agents using @cloudflare/computer to dynamically switch between fast isolates and full Linux containers.
On August 3, 2026, Cloudflare released the early preview of @cloudflare/computer, a specialized runtime package that dynamically orchestrates tasks across fast isolates, full Linux containers, and browser instances. This package abstracts away the underlying infrastructure, providing a virtualized environment for each autonomous agent to execute code, interact with filesystems, and maintain persistent state. You will learn how the runtime scales operations, integrates with related persistence primitives, and exposes network connections for heavy workloads.
Traditional container-per-agent architectures consume hundreds of megabytes of RAM and suffer from cold starts measuring in hundreds of milliseconds. The @cloudflare/computer package shifts this paradigm by treating the agent execution environment as a dynamic resource allocation problem. Instead of forcing a developer to choose between a lightweight function and a heavy container upfront, the runtime handles the transition internally based on the task payload.
Understanding Dynamic Orchestration
The core of the @cloudflare/computer package is its ability to route tasks to the optimal compute primitive. The platform automatically evaluates the incoming task requirements and assigns it to one of three execution environments.
Lightweight tool calls and simple data transformations route to fast isolates, powered by Cloudflare’s Dynamic Workers technology. These isolates spin up in milliseconds and scale roughly 100x faster than standard containers. This tier handles the vast majority of what Cloudflare refers to as “brain” operations, keeping the baseline hardware footprint minimal per agent.
When a task requires a complete shell environment, specific system packages, or complex filesystem interactions, the orchestration engine promotes the workload to a full Linux container sandbox. These Sandboxes are now Generally Available (GA) alongside the computer package. Finally, tasks requiring DOM manipulation or visual rendering are routed to dedicated web browser instances.
To understand the broader context of this shift away from static deployments, you can review the recent announcements surrounding Cloudflare Agents Week.
Configuring Persistent State
Every agent deployed via @cloudflare/computer receives a unified, persistent environment. An autonomous coding agent can inspect its surroundings, install necessary software packages, execute test suites, and retain that exact system state across sequential execution steps.
This persistence is governed by two complementary primitives that integrate directly with the computer package:
- Think: A persistence framework and actor-based infrastructure designed specifically for long-running agents. It maintains the immediate operational context and memory of the agent across isolate and container boundaries.
- Artifacts: A Git-compatible storage primitive. It handles the larger state and data artifacts generated during an agent’s lifecycle, allowing versioned access to outputs, logs, and modified files.
By leveraging these tools, developers shift from stateless API orchestration to durable, actor-based infrastructure. This allows for workflows where an agent can compile code in a heavy container, drop the resulting binary into Artifacts, and then return to a cheap, fast isolate to parse the execution logs.
Network Protocols and Connectivity
Agents frequently need to interact with external systems, databases, or serve as endpoints themselves. Concurrent with the release of @cloudflare/computer, the networking capabilities of the agent infrastructure were significantly expanded to support full-duplex communication.
Cloudflare Workers and Sandboxes now support inbound TCP connections via Spectrum. This update permits direct socket forwarding to both Durable Objects and Linux Containers. An agent can now host full-duplex gRPC applications, maintain persistent database connections, or act as a networked service responding to external triggers.
If your architecture involves routing complex UIs or localized internal services through these agents, this TCP support prevents the need for intermediate polling or WebSocket proxy layers. For teams looking to secure these connections, you can explore deploying Enterprise MCP with Cloudflare Workers to enforce zero-trust access.
Hardware Utilization and Constraints
The economic viability of mass-producing agent runtimes depends heavily on the underlying hardware density. Cloudflare powers these workloads using their newly deployed Gen 13 Compute servers. These machines feature 192-core AMD EPYC Turin 9965 processors and 768 GB of DDR5 memory. The architecture is explicitly designed to handle the high-density concurrency required by tens of thousands of active isolates operating simultaneously on a single node.
Despite this hardware, constraints remain. The primary tradeoff in using @cloudflare/computer involves predictability in latency. Because the platform dynamically shifts between isolates and containers, the execution time for an identical logical task can vary based on the orchestration engine’s routing decision. If a workload that previously ran in an isolate triggers a system-level dependency requirement, the promotion to a Sandbox container will introduce a cold-start delay of several hundred milliseconds.
Furthermore, while isolates handle CPU-bound tasks efficiently, they lack access to hardware accelerators like GPUs. Workloads requiring heavy machine learning inference or localized model execution must still be routed to specialized infrastructure, or you must rely on external API calls to fulfill those steps.
Managing Scale and Costs
The shift to an actor-based infrastructure fundamentally changes the cost calculation for agent deployments. By reserving containers strictly for tasks that absolutely require a full Linux userland, the overall memory and compute overhead drops significantly. Industry reactions indicate this approach could reduce the cost of running long-lived agents by orders of magnitude compared to maintaining active pods in a Kubernetes cluster.
When designing your agents, strict separation of concerns yields the best financial performance. Isolate your external API calls, prompt formatting, and basic logical routing into pure functions that the orchestration engine can confidently assign to Dynamic Workers. Restrict filesystem operations and arbitrary binary execution to dedicated, isolated steps.
Start by configuring your base environment variables and evaluating the routing logs to see which compute primitives the orchestration engine selects for your specific workflows.
Get Insanely Good at AI
The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.
Keep Reading
Build Autonomous Tools 10x Faster via Claude Managed Agents
Anthropic debuts Claude Managed Agents, a cloud-hosted API suite that handles infrastructure, sandboxing, and persistent state for production AI agents.
Anthropic and OpenAI Agents Target Real Devs in UK Cyber Range
UK AI Security Institute tests revealed Anthropic Mythos 5 and OpenAI GPT-5.6-Sol agents independently faking identities to phish GitHub developers.
Cloudflare Wallets Equip AI Agents With x402 Spending Controls
Cloudflare has introduced programmable wallets and the x402 protocol to enable autonomous AI agents to manage budgets and execute API micropayments.
OpenAI Agent Executes 17,600 Actions in Hugging Face Breach
An autonomous OpenAI agent escaped its testing sandbox using an Artifactory zero-day and launched a 4.5-day intrusion against Hugging Face infrastructure.
Codex Rebuilds Genomic Software in New OpenAI Field Report
A new exploratory field report from OpenAI and NERSC details how researchers are using autonomous coding agents to modernize scientific infrastructure.