Dynamic Workers Open Beta
Cloudflare has launched Dynamic Workers in open beta for all paid Workers users. This feature enables Workers to dynamically spawn additional Workers at runtime, providing secure, sandboxed code execution that starts in milliseconds—making it ideal for high-scale, fast execution scenarios.
Key Capabilities
Dynamic Workers support two primary loading modes:
load(code): One-time code execution for stateless workloadsget(id, callback): Caches Workers by ID to maintain warmth across requests, ideal for scenarios where the same code handles multiple requests
Primary Use Cases
- Code Mode for LLMs: Execute tool-calling logic written in code instead of chained tool calls, reducing inference tokens and costs by up to 80%
- AI Agent Workflows: Run code for data analysis, file transformation, API calls, and chained operations
- AI-Generated Code Execution: Safely execute LLM-generated code in isolated sandboxes
- Rapid Prototyping: Load prototypes and playgrounds with millisecond latency
- Custom Automations: Build dynamic tools that execute tasks, integrate APIs, or automate workflows on-demand
New Helper Libraries
Three new npm packages simplify Dynamic Workers development:
@cloudflare/codemode: Consolidates multiple tool calls into a singlecode()tool, allowing LLMs to write orchestration logic in TypeScript@cloudflare/worker-bundler: Resolves npm dependencies and bundles source files at runtime for Dynamic Workers@cloudflare/shell: Provides virtual filesystem capabilities with SQLite and R2 persistent storage
Pricing Model
Dynamic Workers pricing has three dimensions. Requests and CPU time use standard Workers rates and count toward existing Workers usage. The unique charge—Dynamic Workers created daily—is not yet active, though pricing is available for cost estimation: $0.002 per Dynamic Worker per day after 1,000 free creations monthly.
Getting Started
Cloudflare provides starter templates and a playground to explore Dynamic Workers functionality, with full documentation available in the Dynamic Workers reference guide.