Cloudflare has launched Dynamic Workers in open beta, providing a sandboxing environment for AI-generated code that starts in milliseconds and uses a fraction of the memory required by traditional containers. The technology enables AI agents to execute arbitrary code — generated on the fly by language models — inside secure isolates that are 100 times faster to spin up and 10 to 100 times more memory efficient than Docker containers.
The core problem Dynamic Workers solve is trust. When an AI agent generates code to complete a task — querying a database, processing a file, calling an API — that code needs to run somewhere. Running it directly on a server is a security risk. Running it in a container adds seconds of startup latency and hundreds of megabytes of memory overhead per instance. Cloudflare’s isolate-based approach provides the same security boundary as a container but with startup times measured in single-digit milliseconds and memory footprints of a few megabytes.
The architecture uses V8 isolates — the same technology that powers Cloudflare Workers and Chrome’s JavaScript engine — extended to support dynamic code execution. Each isolate runs in its own memory space with no access to the host system, other isolates, or network resources beyond what is explicitly permitted. This makes it safe to execute untrusted AI-generated code at scale without the performance penalty of virtualization or containerization.
For AI agent platforms, Dynamic Workers address a fundamental scaling constraint. An agent orchestrating ten parallel tasks — each requiring code execution — would need ten containers under traditional approaches, consuming gigabytes of memory and taking seconds to provision. With Dynamic Workers, the same ten tasks run in isolates that collectively use tens of megabytes and start nearly instantly. This changes the economics of agent architectures from memory-bound to compute-bound.
The open beta is available to all Cloudflare Workers users. Pricing follows Cloudflare’s existing Workers model — pay per request with generous free tiers. The release positions Cloudflare as infrastructure for the emerging AI agent ecosystem, competing with Modal, E2B, and Fly.io for the workload category that barely existed two years ago: running code that AI writes.
