Cannula Robotics
← Platform
Platform

Architecture

How a request flows from your browser to Claude and back.

Deployed shape

Browser (ai.cannularobotics.com)
  ↓ Cloudflare Access (Google SSO, @cannularobotics.com)   [pending]
Astro static site + Cloudflare Pages Functions
  ↓ /api/chat        → cr-ai-proxy        (Worker @ cr-proxy.cannularobotics.com)
  ↓ /api/search      → cr-retrieval       (Worker @ cr-retrieval.cannularobotics.com)
  ↓ /api/admin/ingest → cr-retrieval     (admin trigger; token-gated)

cr-ai-proxy
  ↓ service binding to cr-retrieval (context for chat)
  ↓ Cloudflare AI Gateway (cr-ai-gateway) — auto-fallback to direct on 401
  → Anthropic API (Claude Opus 4.7, Zero Data Retention)

cr-retrieval
  ↓ Cloudflare Workers AI (BGE-large embeddings, 1024-dim)
  ↓ Cloudflare Vectorize (cr-notion / cr-granola / cr-drive)
  ↓ Cloudflare KV (sync state per source)
  ↓ Notion REST API     (token auth)
  ↓ Google Drive v3     (user OAuth refresh token; no service account)

Everything CR — account, domain, gateway, proxy, secrets — lives in a single Cloudflare account separate from any other tenant.

Why this shape

Data isolation

The CR Cloudflare account is independent of any other tenant. Anthropic billing is on a separate CR org with Zero Data Retention enabled — your prompts and completions are not retained for training. Embeddings are produced inside Cloudflare via Workers AI, so source text never leaves Cloudflare for embedding.