Cloudflare introduced Turnstile in 2023 as a privacy-preserving alternative to traditional CAPTCHAs. The system operates as a client-side challenge mechanism, costs nothing to deploy, functions on any website regardless of whether traffic routes through Cloudflare's network, and never forces visitors to complete puzzle-solving tasks. The company has now unveiled Turnstile Spin, which automates the end-to-end deployment process through AI agent mediation.
Historically, Turnstile required developers to perform two distinct implementation steps. The first involved modifying frontend code to display the Turnstile widget, enabling Cloudflare to execute client-side challenges and generate a verification token. The second step required posting that token to Cloudflare's Siteverify API, which would validate the token and return information about whether the visitor passed the challenge. Developers could then make decisions based on this outcome, such as enabling a login button only after successful validation.
Turnstile now handles approximately three billion verifications during a typical weekday. In a single recent week, more than 23,000 accounts created fresh widgets through the Cloudflare dashboard. This surge in adoption prompted the company to explore ways of streamlining Turnstile deployment. While originally designed for developers comfortable with backend code, demand for straightforward bot protection extends well beyond that audience. The emergence of AI-powered development tools has expanded both the pool of application builders and the attack surface available to malicious actors, creating urgency around making Turnstile simpler to install correctly.
Adapting Turnstile for the Era of AI Coding Agents
When Turnstile was first developed, web development adhered to conventional engineering practices: developers manually constructed client-side interfaces and backend logic. The two-step Turnstile workflow naturally mirrored this approach.
Web application development has undergone substantial transformation. AI coding agents now allow anyone—from seasoned engineers to novices—to create functional websites in minutes. However, security implementations designed around manual development workflows do not always integrate smoothly with prompt-driven construction methods.
To make Turnstile equally accessible for AI-assisted builders as it is for conventional developers, Cloudflare has added native support for agent-based workflows through Spin. The system operates automatically. Users can inspect their Turnstile configuration by navigating to the Turnstile section of their account. Any widget that has processed traffic without corresponding backend validation displays a "Fix with Spin" option.
How Turnstile Spin Works
Turnstile Spin transforms the two-part setup into an interactive workflow guided by a coding agent. Users specify where they want protection applied, and the agent locates relevant frontend and backend code sections, outlines a proposed approach, and waits for approval before proceeding. Once approved, the agent completes both integration components simultaneously. This approach allows individuals without backend expertise to execute the setup correctly, while experienced developers can eliminate repetitive tasks and catch overlooked elements.
Spin does not transmit application code to Cloudflare servers or request remote code modifications. The agent in use—whether Claude Code, Cursor, Codex, or another platform—applies approved changes directly within the developer's codebase. The only new element added to the Cloudflare account is the Turnstile widget itself. Validation logic remains in the backend, adjacent to the application code that determines post-challenge actions.
Spin accommodates three distinct scenarios depending on what it discovers in the codebase:
1. Fresh install
When no bot protection exists, the agent embeds the widget on the frontend and integrates Siteverify into the backend without requiring existing code.
2. Widget recovery
Cloudflare tracks Siteverify activity for each widget. Widgets lacking server-side validation receive a "Fix with Spin" notification in the dashboard. The agent uses the existing widget secret and adds the missing backend validation step while the widget continues processing traffic. This approach prevents the support requests that previously arose from incomplete Turnstile configurations.
3. Migration from CAPTCHA
The agent identifies existing bot protection markers, recommends a replacement strategy, and executes it following user approval. Existing documentation continues to address tool-specific migration considerations.
Users can launch Spin from the Cloudflare dashboard, through Cloudflare Wrangler, or directly from their agent using Cloudflare's skill. A typical workflow involves starting from the dashboard and pasting the skill into the agent, which then uses Wrangler to coordinate the necessary steps.

Adoption and Early Metrics
Developers began using Spin immediately upon its dashboard availability. Since launching in July, the dashboard has recorded more than 65,000 successful Spin widget creations, with developers copying the generated prompt more than 30,000 times. This swift uptake demonstrates that integrating Turnstile directly into AI workflows addresses a genuine and pressing requirement for application builders.
The adoption figures also underscore a key insight from Spin's development as an internship project: even straightforward concepts require time, user input, and continuous refinement. Early in the internship, Bryan Becker recommended sharing incomplete work for feedback, while Marina Elmore consistently redirected focus toward addressing customer needs rather than overengineering solutions. This guidance led to sharing rough prototypes early, gathering team feedback, and eliminating as many steps as feasible to deliver simpler security deployment for users.
Getting Started with Turnstile Spin
Turnstile remains free for all users. Spin enables deployment or repair of Turnstile widgets in minutes. Users without an existing Cloudflare account can establish one without additional configuration requirements. Documentation provides further guidance, and Cloudflare welcomes user feedback.