Canonical reference for Cloudflare Workers — V8-isolate serverless compute on 330+ POPs, with the deepest stack of edge-native primitives in the industry: Durable Objects (strongly-consistent stateful compute with SQLite storage), KV (eventually-consistent global key-value), R2 (S3-compatible zero-egress object storage), D1 (SQLite at edge), Queues, Vectorize (vector DB), Workers AI (open-weight LLM inference), AI Gateway, Cloudflare Agents SDK, Workflows (durable execution), and Hyperdrive (Postgres / MySQL connection pooling). Companion sub-library to _index (the other major edge platform) and the model-provider sub-libraries (_index, _index).
The architectural bet Cloudflare made — that V8 isolates are the right primitive for edge compute, not containers or microVMs — has aged extraordinarily well. A Worker cold-starts in 5-50ms (vs Lambda’s 200ms-2s), runs in 128MB of RAM at every one of 330+ POPs, and has access to a steadily-expanding catalog of edge-native data products. Durable Objects (released 2020, GA 2021) and their evolution into SQL-storage-by-default with WebSocket Hibernation (2024-2025) have quietly become one of the most interesting building blocks for stateful serverless apps — enabling multiplayer games, real-time collaboration, and “serverless databases” that earlier serverless platforms struggled with. The 2024-2025 launches of Workers AI, Vectorize, AI Gateway, Cloudflare Agents SDK, and Workflows position Cloudflare as a credible end-to-end AI / agent platform without ever leaving the edge.
This sub-library lives inside Math-and-Compute/Compute/ as a sibling of _index and the other compute references. Notes are version-pinned to 2026-05-25 — Cloudflare ships features weekly and rebrands aggressively (Workers Sites → Pages → Workers Assets has been three names for nearly-the-same product across 5 years). Verify against developers.cloudflare.com before quoting specific syntax.
See also
_index — the other major edge platform; many patterns transfer
Bindings catalog: KV, R2, D1, Durable Objects, Queues, Vectorize, AI binding, Workflows, Browser Rendering, Service Bindings. wrangler.toml syntax for each
SQLite-in-DO for free-tier databases, WebSocket Hibernation for cheap long-lived connections, smart placement near origin DBs, Service Bindings for zero-cost worker-to-worker calls, wrangler dev --remote vs --local, compatibility_flags for Node.js compat, R2 zero egress as drop-in S3, Pages Functions vs Workers convergence, Vectorize as cheaper Pinecone, Workers AI as cheaper Anthropic for Llama-tier models
How to use this library
Picking a runtime model — start at workers-runtime-and-deployment for the V8-isolate model + when to use Workers vs Pages Functions.
Building a stateful app — durable-objects-and-sqlite-storage is the canonical primitive. Use DOs over D1 when you need per-entity strong consistency.
Building an AI app — workers-ai-and-agents for the Workers AI catalog + Agents SDK + AI Gateway.
Code examples use TypeScript with the Env type pattern (Cloudflare’s recommended). wrangler.toml is the legacy format; wrangler.jsonc (JSON with comments) is supported and increasingly preferred in newer projects — examples include both.
Pricing is in USD as of 2026-05-25. Where multiple \$ symbols appear on the same line they are backslash-escaped to avoid Obsidian MathJax interpretation.
Plan names: Free (0),∗∗Paid∗∗(5/mo minimum, then usage-based), Enterprise (custom).
“Per developers.cloudflare.com 2026-05” tags a claim sourced from official documentation as of the file’s created date.
Sources read while building this library (2026-05-25 pass)
github.com/cloudflare/workerd (the runtime, MIT-licensed)
github.com/cloudflare/agents (Agents SDK source)
Where official docs are silent but behavior is observable (exact V8 isolate reuse policy, undocumented compatibility_flags, billing edge cases), entries are labelled “Undocumented as of 2026-05-25 — observed behavior” so a future reader knows to verify.