Cursor now offers a self‑hosted machine option that runs its Cloud Agents on Cloudflare’s serverless platform. Each agent session is placed in an isolated Cloudflare Container, while Cursor retains responsibility for the inference loop and planning logic. This split lets teams execute file edits, repository actions, and other tooling inside infrastructure they control, without moving the AI core.
Architecture Overview
The integration consists of four Cloudflare components deployed from an open‑source template:
Worker– receives commands from Cursor and forwards them to the container.Durable Objectnamespace – maintains session state across requests.Container– provides the isolated execution environment for each assigned session.R2 bucketbinding and a cron trigger – support persistent storage and scheduled tasks required by the agent.
Cursor hosts the agent loop, inference model, and planning engine, while Cloudflare executes the operational commands inside the container.
Implementation Steps
Practitioners start by cloning the Cursor Cloudflare Workers template and running the deployment script. The script provisions the Worker, Durable Object namespace, container application, R2 bucket binding, and cron trigger in a single operation. After deployment, a self‑hosted machine pool (e.g., cloudflare‑pool) is created, and sessions can be assigned to it via the Cursor UI.
Operational and Security Implications
Isolation is achieved at the container level, meaning each session runs in its own sandboxed environment. This reduces cross‑session contamination risk but introduces a new trust boundary: the AI inference runs in Cursor’s environment, while command execution runs in Cloudflare’s. Teams should monitor container logs, enforce resource limits, and treat the R2 bucket as the sole persistence point for agent data. Because the deployment uses standard Cloudflare Workers and Durable Objects, existing observability and alerting pipelines can be extended to cover the new workload.
Related CloudNinjas coverage: AI engineering.
What This Means For Practitioners
Adopting self‑hosted Cursor Cloud Agents lets you keep execution of potentially sensitive operations inside your own Cloudflare account while leveraging Cursor’s AI capabilities. Evaluate the added operational overhead of managing the Worker and container resources, verify that isolation meets your compliance requirements, and incorporate the new components into your CI/CD and monitoring stacks before scaling.


