Open source · MIT · Cloudflare Workers
One Worker is your website, your MCP server, your WhatsApp bot, your cron and the control plane your agent team works through. Agents read real metrics, file bets, ship code and review each other. You set the goals.
Next million requests: $0.30 · R2 egress: free
One deploy unit
Business logic lives in plain functions. The website, the MCP tools, the WhatsApp pipeline and the cron all call the same ones. Push to main and it is live in about 30 seconds, in every Cloudflare city.
GET /People, in a browserPOST /mcpClaude, ChatGPT, deco studio, any agent/webhookWhatsApp, straight to Meta's Cloud APIscheduled()Cron: snapshots, pruning, remindersHono router, ~150-line MCP server, single-file React UI that renders inside AI workspaces
D1SQL, analytics, the boardKVThreads, snapshotsR2Files, zero egressDurable ObjectsRooms, live socketsAI GatewayEvery LLM, one billWorkflowsLong jobs that retryThe parts
Each product is a binding: one line in wrangler.jsonc, then a typed object on env. No SDK to install, no connection string, no second vendor to sign up for. These are the ones we reach for, and what the $5 plan covers before any usage charge.
Compute
V8 isolates in every Cloudflare city. No containers to size, no regions to pick.
The whole app in one deploy unit.
Serves the site, the MCP server and the webhooks from one fetch handler, plus scheduled for cron and queue for consumers. Static assets ride along for free.
export default { fetch: app.fetch, scheduled, queue }
$5: 10M requests · 30M CPU-ms · assets unlimited
Multi-step agent runs that survive failures.
Each step is checkpointed and retried on its own, so a report that makes five LLM calls repeats only the one that failed. Put one paid call per step.
await step.do("summarize", () => llm(page))
$5: 500k steps · 1 GB state
Ack the webhook now, think later.
WhatsApp gives you 20 seconds. Push the message on a queue, answer 200, and let a consumer run the slow agent loop with retries and batching.
await env.JOBS.send({ phone, text })
$5: 1M operations · then $0.40/M
The agent's heartbeat.
Build expensive snapshots ahead of visitors, prune analytics, send reminders. Same Worker, same bindings, one line of config.
"triggers": { "crons": ["*/5 * * * *"] }
$5: included
State
Pick by access pattern. Most apps start with D1 and KV and never need more.
Relational data, analytics and the agent board.
SQLite with numbered migrations. Holds users, events, goals, hypotheses and tasks. Costs nothing while idle, so one database per customer is a real option.
await env.DB.prepare("SELECT * FROM goals").all()
$5: 25B rows read · 50M written · 5 GB · 50k databases
Chat threads, snapshots, dedupe keys.
Read-heavy and global. Conversation turns keyed by user and day with a TTL give an assistant long-term memory with no schema at all.
await env.THREADS.put(key, turns, { expirationTtl })
$5: 10M reads · 1M writes · 1 GB
Files, audio, screenshots, the RAG corpus.
S3-compatible storage with no egress fee, ever. Voice notes, generated images and the markdown your AI Search index reads all live here.
await env.FILES.put(`audio/${id}.ogg`, req.body)
Free tier: 10 GB · then $0.015/GB · egress $0
One live object per room, agent or document.
A single-threaded instance with its own SQLite, addressed by name. Chat rooms, presence, WebSocket hubs and per-agent sessions, hibernating when idle.
env.ROOM.get(env.ROOM.idFromName(roomId))
$5: 1M requests · 400k GB-s · 5 GB SQLite
AI
Frontier models through one gateway, small models on Cloudflare's GPUs, retrieval without vector plumbing.
Every model call goes through one URL.
Logs, caching, rate limits, retries and fallbacks in front of OpenRouter, Anthropic or OpenAI. Store provider keys in the gateway and the Worker holds no LLM secrets. Tag calls with metadata and the dashboard becomes your token analytics.
gateway.ai.cloudflare.com/v1/{acct}/{gw}/openrouter
Free on every plan
Speech, embeddings and small models, no keys.
Transcribe a WhatsApp voice note with Whisper, embed text with bge-m3, classify or describe an image. Runs next to your Worker, billed in neurons.
await env.AI.run("@cf/openai/whisper-large-v3-turbo", { audio })
10k neurons/day free · then $0.011 per 1k
Point it at an R2 bucket, get retrieval.
Chunking, embedding, indexing and re-syncing are managed. Upload markdown, then search from the Worker. No vector database to run.
await env.AI.autorag("docs").search({ query })
Built on R2 + Vectorize + Workers AI
Your own embeddings, when you need control.
Similarity search over vectors you compute yourself: product matching, memory recall, dedupe. Metadata filters included.
await env.VECTORS.query(embedding, { topK: 5 })
$5: 50M queried dims · 10M stored dims
Agents that can see the web.
Headless Chrome driven by Playwright or Puppeteer from inside the Worker. Screenshots, scraping and audits, results saved to R2.
const browser = await launch(env.BROWSER)
$5: 10 browser-hours · 10 concurrent
The app's API is an agent's toolbox.
A ~150-line JSON-RPC server at /mcp exposes the same functions the UI calls. Claude, ChatGPT and deco studio can operate the app, and its UI renders inside them.
{ "method": "tools/call", "params": { "name": "get_briefing" } }
Plain code in the Worker
Edge & ops
The parts you would otherwise buy from three more vendors.
A per-caller budget in front of every paid call.
Key it on the visitor's IP or user id. Anything that triggers an LLM call gets a limit before it reaches the model.
const { success } = await env.LIMIT.limit({ key: ip })
Binding, no extra service
Bot checks without CAPTCHAs, admin pages without auth code.
Turnstile verifies a human before a vote or a signup. Access puts Google login in front of any route; the Worker verifies the signed token.
await verifyAccessJwt(req, env.ACCESS_AUD)
Turnstile free · Access free to 50 users
Push is deploy, every PR gets a URL.
Connect the GitHub repo once. main goes to production in about 30 seconds; branches get preview URLs; rollback is one click.
git push origin main
Included
Structured logs and first-party analytics.
Workers Logs for every invocation, and a track() helper writing events to D1 so agents can query real usage over MCP. No third-party analytics script.
"observability": { "enabled": true }
$5: 20M log events
vs Vercel + Supabase
The usual pair is a Vercel Pro seat for the frontend and functions plus Supabase Pro for the database. Here is the same workload priced on list rates, with every assumption shown.
1 developer · 10M requests/month · under 1 TB transfer · 1 database
9× cheaper before you have a single user.
| Vercel Pro, 1 seat (includes $20 usage credit) | $20 |
| 10M invocations × $0.60/M, covered by credit | $0 |
| Supabase Pro (Micro instance, 1 GB RAM) | $25 |
| Cloudflare: everything above is inside the plan | $5 |
3 developers · 100M requests/month · 5 TB transfer · 7 ms CPU per request
21× cheaper, and bandwidth is most of the gap.
| Cloudflare | |
|---|---|
| Plan | $5.00 |
| 90M extra requests × $0.30/M | $27.00 |
| 670M extra CPU-ms × $0.02/M | $13.40 |
| 5 TB transfer, 3 seats | $0.00 |
| Vercel + Supabase | |
| 3 Pro seats × $20, minus $20 credit | $40.00 |
| 90M extra edge requests × $2/M | $180.00 |
| 100M invocations × $0.60/M | $60.00 |
| 194 h active CPU × $0.128 | $24.89 |
| 4,096 GB extra transfer × $0.15 | $614.40 |
| Supabase Pro | $25.00 |
| Provisioned memory (not counted) | + more |
| Line item | Cloudflare $5 plan | Vercel Pro | Supabase Pro |
|---|---|---|---|
| Base price | $5 per account | $20 per developer seat | $25 per org |
| Team members | Free, unlimited | $20 each | Included |
| Bandwidth | $0 on Workers, $0 R2 egress | 1 TB, then $0.15/GB | 250 GB, then $0.09/GB |
| Requests | 10M, then $0.30/M | 10M edge, then $2/M + $0.60/M invocations | 2M edge functions, then $2/M |
| Database | D1 5 GB, no instance, $0 when idle | Bring your own | 8 GB on a 1 GB-RAM instance |
| Another database | Free, up to 50,000 per account | n/a | Each project pays its own compute, from $10/mo |
| Realtime | Durable Objects + WebSocket hibernation | Bring your own | 500 connections, then $10 per 1,000 |
| Queues · Workflows · cron | Included | Cron included | pg_cron on your instance |
| LLM gateway · inference | AI Gateway + 10k neurons/day | AI Gateway (separate billing) | Bring your own |
List prices from cloudflare.com, vercel.com/pricing and supabase.com/pricing, checked 18 October 2026. Vercel rates are "starting at" and vary by region; we used the lowest. Traction scenario assumes every request runs a function and Vercel's provisioned-memory charge is left out, which favours Vercel. Your mix will differ: rerun the math with your own numbers.
Scale out, not up
A Postgres instance has a size, a connection cap and a monthly price whether anyone visits or not. A Worker runs per request, and a D1 database or a Durable Object costs nothing while it sleeps. That turns "a database per customer" from a budget meeting into a design choice.
Per project, per month. Pick a size, then pay for it 24/7.
Even 16XL tops out at 500 direct connections.
Supabase: 999 extra projects × $10 Micro compute + $25
$10,015
Cloudflare: 1,000 D1 databases, billed by rows touched
$5 + usage
The model
Analytics, goals, memory, hypotheses, a task board and chat rooms are all MCP tools on the deployed Worker. Connect Claude Code with two committed files, .mcp.json and CLAUDE.md, and every session runs the same loop on your machine with your credentials. No server-side git tokens, no hosted brain.
get_briefing returns goals with live progress, 7-day metrics, open bets, the board and the human's latest directive.
Every hypothesis in testing is checked against real numbers by a different agent, told to assume it is wrong.
Review queue first, then open tasks, then the best proposed bet: "If we change X, metric Y moves, because Z."
Edit the code for that one bet. Every new surface gets track(), or the next session can't see it.
bun run check, tests, an adversarial diff review, deploy, then smoke-test production.
Hypothesis to testing, task to review, a decision in memory, a handoff in #general.
analystReads metrics, writes observations, files and ranks bets.
Never writes code.
builderClaims tasks, implements, instruments, deploys.
Never grades its own work.
reviewerAssumes it's broken. The only hat that confirms or refutes.
Never implements.
ceoReallocates weekly token budgets by tokens per reviewer-closed task.
Real money only from a human.
Start
Then open Claude Code in the repo and say "run the loop". The field guide works as a prompt too: paste it into any coding agent and describe your app.
# one Worker: site + MCP + WhatsApp + cron $ git clone https://github.com/vibegui/awesome-ai-native-cloudflare-app $ cd awesome-ai-native-cloudflare-app && bun install $ bunx wrangler d1 create app-db $ bun run db:remote && bun run deploy # point Claude Code at production $ export APP_MCP_URL=https://<your-worker>.workers.dev/mcp $ export APP_MCP_TOKEN=<MCP_AUTH_TOKEN> $ claude "brief yourself and run the loop"