Quilt on Cloudflare

A reactive, typed, cellular runtime running on the edge. Workers for compute. D1 for state. Vectorize for search. Workers AI for LLMs. Deploy in 5 minutes.

⚑ Workers πŸ—„οΈ D1 πŸ” Vectorize πŸ’Ύ KV πŸ“¦ R2 πŸ€– Workers AI 🌐 Pages

Deploy in 5 minutes

1Install Wrangler & login
The Cloudflare CLI for deploying Workers.
npm install -g wrangler
wrangler login
2Clone the repo
The full Quilt-on-Cloudflare package: Worker, D1 schema, UI, examples.
git clone https://github.com/SuperInstance/quilt-cloudflare
cd quilt-cloudflare
npm install
3Provision resources
D1 database, Vectorize index, KV namespace. Free tier covers it.
wrangler d1 create quilt-db
wrangler vectorize create quilt-embeddings --dimensions=768
wrangler kv:namespace create CACHE
4Update wrangler.toml
Copy the IDs from step 3 into the bindings.
[[d1_databases]]
binding = "DB"
database_name = "quilt-db"
database_id = "..."  # from step 3

[[vectorize]]
binding = "VECTORIZE"
index_name = "quilt-embeddings"

[[kv_namespaces]]
binding = "CACHE"
id = "..."  # from step 3

[ai]
binding = "AI"
5Initialize and deploy
Create the tables. Deploy. You're live on the edge.
wrangler d1 execute quilt-db --file=./schema.sql
wrangler deploy

# β†’ https://quilt-cloudflare.YOUR_SUBDOMAIN.workers.dev
# πŸŽ‰ Your Quilt is live on the edge.

What you get

A full Quilt runtime on Cloudflare's edge, with all the bells and whistles.

⚑

The reactive engine

Every cell is a real Quilt cell. Reactive propagation. Per-context memoization. Topological evaluation.

πŸ—„οΈ

D1 persistent state

SQLite at the edge. Every cell value is persisted. Full history. Multi-region read replicas.

πŸ”

Vectorize semantic search

Embed every cell value. Search semantically. Find the right cell by meaning, not just name.

πŸ’Ύ

KV cache

Fast ephemeral state in 300+ cities. Formulas, listeners, intermediate computations.

πŸ“¦

R2 backups

Versioned backups in object storage. Full sheet snapshots. Time travel via R2.

πŸ€–

Workers AI

LLM cells. Embedding cells. Image cells. Translation. Sentiment. Summarization. Code generation.

πŸ”Œ

MCP server

Every cell is an MCP tool. Plug into Claude Code, Cursor, or any MCP client.

🌐

Pages UI

A full visual editor deployed as a Page. Studio, snippets, semantic search. Free SSL.

7 AI cells, built in

Every Workers AI capability is a Quilt cell. Same addressable model. Same reactive propagation.

ai.llm llama-3, mistral, qwen

Call any text-generation model.

- id: explain
  kind: ai.llm
  model: "@cf/meta/llama-3-8b-instruct"
  prompt: '"Explain: " + topic'
ai.embed bge-base-en-v1.5

Generate 768-dim embeddings. Index in Vectorize.

- id: vec
  kind: ai.embed
  input: "text"
ai.image resnet-50

Image classification with a pre-trained model.

- id: classify
  kind: ai.image
  input: image.url
ai.translate m2m100-1.2b

Translate between 100+ languages.

- id: es
  kind: ai.translate
  from: "en"
  to: "es"
  input: "text"
ai.sentiment distilbert-sst-2

Sentiment score 0-1 for any text.

- id: score
  kind: ai.sentiment
  input: "text"
ai.summarize distilbart-cnn

Summarize long text into a few sentences.

- id: summary
  kind: ai.summarize
  input: "long_text"
ai.code llama-3, code-llama

Generate code from a prompt.

- id: gen
  kind: ai.code
  language: "python"
  prompt: "Compute fib"
ai.speech whisper

Transcribe audio to text.

- id: transcript
  kind: ai.speech
  input: audio.url

Architecture

Three layers, all on the edge. The Quilt engine runs in a Worker. State lives in D1. The UI is a Page.

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚          Cloudflare Edge (300+ cities)      β”‚
                    β”‚                                             β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
   β”‚ Browser │◀────▢│   β”‚     Worker (the Quilt engine)        β”‚  β”‚
   β”‚   UI    β”‚      β”‚   β”‚                                      β”‚  β”‚
   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜      β”‚   β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
        β”‚           β”‚   β”‚   β”‚  Reactive  β”‚   β”‚  AI cells   β”‚   β”‚  β”‚
        β”‚           β”‚   β”‚   β”‚   engine   │──▢│  (LLM, etc) β”‚   β”‚  β”‚
        β”‚           β”‚   β”‚   β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
        β”‚           β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
        β”‚           β”‚             β”‚                β”‚              β”‚
        β”‚           β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”       β”‚
        β”‚           β”‚   β”‚       D1       β”‚  β”‚  Vectorize  β”‚       β”‚
        β”‚           β”‚   β”‚  (cell state)  β”‚  β”‚ (semantic)  β”‚       β”‚
        β”‚           β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
        β”‚           β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
        β”‚           β”‚   β”‚       KV       β”‚  β”‚     R2      β”‚       β”‚
        β”‚           β”‚   β”‚   (cache)      β”‚  β”‚  (backups)  β”‚       β”‚
        β”‚           β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
        β”‚           β”‚                                             β”‚
        β”‚           β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
        β”‚           β”‚   β”‚       Pages (the web UI)            β”‚  β”‚
        β”‚           β”‚   β”‚   Studio / Live / Playground        β”‚  β”‚
        β”‚           β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
        β”‚           β”‚                                             β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

What to build on it

Personal AI assistant

Memory as cells. Tools as cells. Reasoning as cells. The whole agent in a sheet, running on the edge, accessible via MCP from any AI client.

Real-time dashboards

Sensor cells, formula cells, listener cells. WebSockets push updates to the UI. D1 persists the history. Vectorize makes the data searchable.

Multi-tenant SaaS

One Quilt deployment, many sheets. Each sheet is a tenant. Router cells enforce per-tenant policies. Vault cells encrypt the sensitive data.

IoT mesh

ESP32 sensors push to a Cloudflare Worker. The worker routes through Quilt cells. D1 persists. Vectorize indexes. Workers AI summarizes. The whole pipeline, on the edge.

Knowledge base with RAG

Add notes, they auto-embed. Ask a question, the most relevant cells are retrieved and sent to the LLM. RAG over your personal data, with no third-party.

The HTTP API

Every cell addressable over HTTP. The sheet is the API surface.

# Load a sheet
POST /sheet?id=my-app
Content-Type: text/plain

<YAML sheet here>

# List all sheets
GET /sheets
β†’ { "sheets": ["default", "my-app"] }

# Get a cell
GET /cell/heat_index
β†’ { "data": 24.5, "status": "ready", "t": 5, "author": "cloudflare" }

# Set a cell
POST /set/heat_index
Content-Type: application/json
{ "value": 30 }
β†’ { "ok": true }

# Get all cells in the current sheet
GET /cells
β†’ { "id1": { "data": ..., "status": "ready" }, ... }

# MCP over HTTP
POST /mcp
{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }

# MCP over SSE
GET /mcp/sse

What it costs

Cloudflare's free tier is generous. Paid plans scale smoothly.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Resource          β”‚ Free tier      β”‚ Paid plan       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Worker requests   β”‚ 100K/day       β”‚ 10M+ included   β”‚
β”‚ Worker CPU time   β”‚ 10ms/req       β”‚ 30s/req         β”‚
β”‚ D1 reads          β”‚ 5M/day         β”‚ Unlimited       β”‚
β”‚ D1 writes         β”‚ 100K/day       β”‚ 50M+ included   β”‚
β”‚ D1 storage        β”‚ 5GB            β”‚ 10GB+           β”‚
β”‚ Vectorize queries β”‚ 30M/month      β”‚ Unlimited       β”‚
β”‚ KV reads          β”‚ 100K/day       β”‚ Unlimited       β”‚
β”‚ Workers AI        β”‚ 30M neurons/dayβ”‚ Pay as you go   β”‚
β”‚ Pages bandwidth   β”‚ Unlimited      β”‚ Unlimited       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

For most personal use, free tier is more than enough.
For production, ~$5/mo covers a small team's Quilt.