Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TideRAG

CF-native RAG Pipeline — $0/mo
Vectorize + Workers AI + D1 at the edge. Zero infrastructure to manage.

Quick Start · How It Works · Why TideRAG? · Ecosystem

npm License TypeScript CF Workers $0/mo PRs


What Is TideRAG?

Most RAG pipelines force you to spin up a vector database (Pinecone, Weaviate, pgvector), manage embedding infrastructure, and pay per-query costs before you have users. TideRAG runs entirely on Cloudflare's free tier — your vector store, embedding inference, and metadata storage all live at the edge.

import { TideRAG } from '@carloscortezcloud/tiderag';

const rag = new TideRAG({
  vectorize: env.VECTORIZE_INDEX,
  d1: env.DB,
  ai: env.AI,
});

// Index a document
await rag.ingest({
  id: 'doc-1',
  content: 'Cloudflare Workers run on V8 isolates...',
  metadata: { source: 'docs', category: 'compute' },
});

// Query
const results = await rag.query('How do Workers work?', { topK: 3 });

Install

npm install @carloscortezcloud/tiderag

Quick Start

1. Install

npm install @carloscortezcloud/tiderag

2. Configure wrangler

# wrangler.jsonc
{
  "vectorize": [{ "binding": "VECTORIZE_INDEX", "index_name": "tiderag" }],
  "d1_databases": [{ "binding": "DB", "database_name": "tiderag", "database_id": "..." }],
  "ai": { "binding": "AI" }
}

3. Ingest & query

import { TideRAG } from '@carloscortezcloud/tiderag';

const rag = new TideRAG({ vectorize: env.VECTORIZE_INDEX, d1: env.DB, ai: env.AI });

await rag.ingest({ id: 'doc-1', content: 'Your document text here...', metadata: { source: 'docs' } });
const results = await rag.query('Your question', { topK: 3 });

How It Works

User Query
    │
    ▼
┌──────────────────┐
│  Workers AI      │  ← Embed query via @cf/baai/bge-small-en-v1.5 (free)
│  (embedding)     │
└──────┬───────────┘
       │ vector
       ▼
┌──────────────────┐
│  Vectorize        │  ← 10M vector index (free tier)
│  (similarity)     │
└──────┬───────────┘
       │ top-K IDs
       ▼
┌──────────────────┐
│  D1               │  ← Metadata + chunk storage (5GB free)
│  (metadata)       │
└──────┬───────────┘
       │ enriched chunks
       ▼
┌──────────────────┐
│  LLM Response    │  ← Augment prompt, return answer
└──────────────────┘

Why TideRAG?

Feature TideRAG Managed RAG (Pinecone, etc.)
Cost $0/mo (free tier) $70–$700+/mo
Latency <50ms (edge) 100–500ms (regional)
Infra Zero Vector DB + embedding API
Scaling Auto (Cloudflare) Manual
Data locality Edge (175+ cities) Regional

Deployment

npx wrangler deploy

Ecosystem

Package Role npm
TideRAG Edge RAG (this) @carloscortezcloud/tiderag
Tinkuy Agent framework @carloscortezcloud/tinkuy-agent
Styrr LLM router styrr
Sayay Cost guardrails GitHub
Qhaway Agent observability @carloscortezcloud/qhaway

License

Apache 2.0 — see LICENSE.


Built by engineers who got tired of $700 vector DB bills.
Tinkuy Labs · finoptix.dev

Your RAG pipeline costs $0/mo. Your AI agent should too.

About

CF-native RAG pipeline ($0/mo). Vectorize + Workers AI + D1. Edge-first retrieval, zero infrastructure.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages