Cloudflare Launches 'Worker Previews', an Isolated Preview Environment for Agents
Key point
Cloudflare has launched Worker Previews, an isolated, production-like environment per branch for code changes by AI agents.
Details
Cloudflare has launched Worker Previews, which provides an isolated preview environment similar to production for code changes generated by AI agents. The purpose is to overcome the limitations of existing staging environments and support a safe testing lifecycle without slowing down the rapid development speed of agents.
Isolated Environments per Branch
Each Git branch creates an independent environment with its own unique code, configuration, URL, observability, and state. Running the npx wrangler preview command results in a deployment that is completely separated from production traffic. Durable Objects and Containers are also isolated per branch, so errors from migrations or schema changes are limited to that specific branch. This allows hundreds of Previews to run simultaneously without interfering with each other.
Observability and Agent Control
Each Preview provides its own logs, errors, metrics, and traces, allowing failures to be detected and fixes verified before being reflected in production. Workers Observability tools are scoped to each Preview to support debugging. Additionally, through Browser Run, AI agents can connect to Preview URLs using headless browsers to simulate real user experiences, such as clicking through login flows or capturing screenshots. Agents can use Playwright MCP and Workers Observability MCP to identify the causes of failures and build autonomous loops that repeat patching, redeploying, and verifying.
Configuration and Domain Management
It starts by copying the Base configuration, including user-defined variables, secrets, and bindings, which can be overridden with test API keys, etc., if needed. Preview URLs are provided with custom domains, ensuring that authentication, cookies, CORS, and OAuth redirect behaviors remain identical to production. Cloudflare is dogfooding this feature for its own CloudflareOS development and Gatekeepers testing, and customers such as IKEA and Ramp are also using it.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.