Open source · MIT · Cloudflare Workers

A whole AI-native app that improves itself, for $5 a month.

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.

GET /POST /mcp/webhookPOST /escheduled()queue()
WORKERS PAID monthly · per account · unlimited members
Compute
Requests10,000,000
CPU time30,000,000 ms
Static asset requestsunlimited
Bandwidth$0.00
State
D1 rows read25,000,000,000
D1 rows written50,000,000
KV reads / writes10M / 1M
Durable Objects reqs1,000,000
Queues operations1,000,000
Workflow steps500,000
AI & ops
Workers AI neurons10,000 / day
AI Gatewayincluded
Vectorize queried dims50,000,000
Browser Rendering10 h
Logs · cron · previewsincluded
Total$5.00

Next million requests: $0.30 · R2 egress: free

One deploy unit

Every surface is the same Worker.

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.

Who calls it
GET /People, in a browser
POST /mcpClaude, ChatGPT, deco studio, any agent
/webhookWhatsApp, straight to Meta's Cloud API
scheduled()Cron: snapshots, pruning, reminders
One Worker

Hono router, ~150-line MCP server, single-file React UI that renders inside AI workspaces

What it holds
D1SQL, analytics, the board
KVThreads, snapshots
R2Files, zero egress
Durable ObjectsRooms, live sockets
AI GatewayEvery LLM, one bill
WorkflowsLong jobs that retry

The parts

Everything an AI app needs, already wired to the same Worker.

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

Where the code runs

V8 isolates in every Cloudflare city. No containers to size, no regions to pick.

Workersruntime

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

Workflowsdurable jobs

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

Queuesasync

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

Cron Triggersschedule

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

Where memory lives

Pick by access pattern. Most apps start with D1 and KV and never need more.

D1SQL

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

KVkey-value

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

R2objects

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

Durable Objectscoordination

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

Where the thinking happens

Frontier models through one gateway, small models on Cloudflare's GPUs, retrieval without vector plumbing.

AI GatewayLLM proxy

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

Workers AIinference

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

AI SearchRAG

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

Vectorizevectors

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

Browser Renderingheadless

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

MCPprotocol

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

What keeps it safe and shipped

The parts you would otherwise buy from three more vendors.

Rate Limitingabuse

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

Turnstile & Accessidentity

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

Workers Buildsdeploy

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

Observabilitylogs

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

Same app. One bill is nine times the other, then twenty.

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.

Launch

1 developer · 10M requests/month · under 1 TB transfer · 1 database

Cloudflare Workers Paid$5
Vercel Pro + Supabase Pro$45

9× cheaper before you have a single user.

Show the math
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

Traction

3 developers · 100M requests/month · 5 TB transfer · 7 ms CPU per request

Cloudflare Workers Paid≈ $45
Vercel Pro + Supabase Pro≈ $944

21× cheaper, and bandwidth is most of the gap.

Show the math
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 itemCloudflare $5 planVercel ProSupabase Pro
Base price$5 per account$20 per developer seat$25 per org
Team membersFree, unlimited$20 eachIncluded
Bandwidth$0 on Workers, $0 R2 egress1 TB, then $0.15/GB250 GB, then $0.09/GB
Requests10M, then $0.30/M10M edge, then $2/M + $0.60/M invocations2M edge functions, then $2/M
DatabaseD1 5 GB, no instance, $0 when idleBring your own8 GB on a 1 GB-RAM instance
Another databaseFree, up to 50,000 per accountn/aEach project pays its own compute, from $10/mo
RealtimeDurable Objects + WebSocket hibernationBring your own500 connections, then $10 per 1,000
Queues · Workflows · cronIncludedCron includedpg_cron on your instance
LLM gateway · inferenceAI Gateway + 10k neurons/dayAI 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

There is no instance to outgrow.

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.

Supabase compute ladder

Per project, per month. Pick a size, then pay for it 24/7.

Micro$10
Small$15
Medium$60
Large$110
XL$210
2XL$410
4XL$960
8XL$1,870
12XL$2,800
16XL$3,730

Even 16XL tops out at 500 direct connections.

1,000 customers, one database each

Supabase: 999 extra projects × $10 Micro compute + $25

$10,015

Cloudflare: 1,000 D1 databases, billed by rows touched

$5 + usage

Where Postgres still wins: one relational database bigger than 10 GB (D1's per-database ceiling) or heavy cross-tenant joins. Keep it, and reach it through Hyperdrive. Everything else in the app can still live on the Worker.

The model

The app exposes its own metrics, and agents close the gap.

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.

Brief

get_briefing returns goals with live progress, 7-day metrics, open bets, the board and the human's latest directive.

Close old bets

Every hypothesis in testing is checked against real numbers by a different agent, told to assume it is wrong.

Pick one

Review queue first, then open tasks, then the best proposed bet: "If we change X, metric Y moves, because Z."

Build

Edit the code for that one bet. Every new surface gets track(), or the next session can't see it.

Ship

bun run check, tests, an adversarial diff review, deploy, then smoke-test production.

Record

Hypothesis to testing, task to review, a decision in memory, a handoff in #general.

analyst

Reads metrics, writes observations, files and ranks bets.

Never writes code.

builder

Claims tasks, implements, instruments, deploys.

Never grades its own work.

reviewer

Assumes it's broken. The only hat that confirms or refutes.

Never implements.

ceo

Reallocates weekly token budgets by tokens per reviewer-closed task.

Real money only from a human.

Start

Clone, deploy, set three goals.

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.

zsh
# 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"