Skip to content

v2.0.0 — Multi-backend

Choose a tag to compare

@cashcon57 cashcon57 released this 14 Apr 19:59

Multi-backend release

Recall now ships with three deployment paths. Same MCP tool surface, same data model, your choice of infra.

Backends

Cloudflare Workers Local stdio Docker HTTP
Infrastructure CF D1 + Vectorize + Workers AI SQLite + sqlite-vec Postgres + pgvector
Embeddings bge-m3, 1024D bge-m3 (Xenova ONNX), 1024D bge-m3 (Xenova ONNX), 1024D
Internet Required No No
Transport HTTP stdio HTTP

What's new

  • RecallAdapter interface — backend-agnostic abstraction for SQL, vector, embedding, and FTS operations
  • Local stdio server (local/) — self-contained with better-sqlite3 + sqlite-vec, eager model load, no cloud dependencies
  • Docker HTTP server (docker/) — Postgres + pgvector with HNSW index, native tsvector FTS, body/rate limits, constant-time auth, /health endpoint
  • Codex CLI supportexamples/AGENTS.md template, .mcp.json examples for all three backends
  • MCP protocol bumped to 2025-06-18
  • Graph layer — memory tiers (episodic/semantic/procedural) with biological half-lives, auto-relationship edges via embedding similarity, get_related_memories tool
  • CLS pooling for bge-m3 matches the reference recipe — embeddings are in the same semantic space across all three backends

Quickstart

Cloudflare Workers (existing, unchanged):
```bash
npm install && wrangler deploy
```

Local stdio (no cloud):
```bash
cd local && npm install && npm run build

Download sqlite-vec extension for your platform

```

Docker HTTP:
```bash
cd docker && MEMORY_API_KEY=your-secret docker compose up -d
```

Upgrading from v1.x

Cloudflare Workers:
```bash
git pull origin main

Apply graph-layer migration if not already done (adds memory_type + memory_relationships)

wrangler d1 execute --remote --file=migrations/0002_graph_layer.sql
wrangler deploy
```

The adapter refactor is transparent — no code changes needed for existing CF callers. Existing memories get memory_type = 'semantic' by default.

Breaking changes

None for Cloudflare users. Existing deployments work without changes after running the graph-layer migration (if not already applied).

Local and Docker backends use the Xenova ONNX build of bge-m3 with CLS pooling. Vectors are in the same space as Workers AI's bge-m3 in theory (same model, same pooling), but bit-for-bit portability has not been verified with an end-to-end smoke test. Semantic search works cross-backend.

Internals

  • 20+ commits, 11 code-review issues resolved before merge
  • 3 TypeScript build surfaces, all clean under strict: true
  • Critical fix: Docker FTS abstraction (Postgres-native tsvector instead of SQLite FTS5 calls)
  • Critical fix: delete ordering prevents orphan vectors on partial failure

Credits

Tier design inspired by NornicDB.