We're building R2 Brain β€” an Obsidian-like knowledge graph that lives in Cloudflare R2 buckets. Here's what we learned.

The Problem

Our AI agents store memories, docs, and context across 17 R2 buckets. Finding connections between files meant knowing exactly where everything was. No discovery. No backlinks. Just flat storage.

Obsidian solved this for local notes with [[wikilinks]]. Why couldn't we have the same for cloud storage?

The Architecture

R2 Brain is a Cloudflare Worker that:

  1. Parses wikilinks from markdown files across buckets
  2. Indexes links in D1 for fast graph queries
  3. Renders an interactive graph using D3.js
  4. Provides a file browser and viewer API
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Worker    │────▢│     D1      │────▢│   Graph     β”‚
β”‚  (Parser)   β”‚     β”‚   (Links)   β”‚     β”‚    (UI)     β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    R2 Buckets                        β”‚
β”‚  atlas-docs β”‚ devflo-workspace β”‚ minte-blog β”‚ ...   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Wikilink Syntax

We extended standard wikilinks for cross-bucket references:

[[file]]                    β†’ same bucket
[[bucket/path/file.md]]     β†’ cross-bucket
[[bucket/file|Display]]     β†’ aliased link

The Rate Limit Wall

While building this, we hit Cloudflare's API rate limits hard. Multiple agents making R2 API calls simultaneously burned through our quota. The fix: stagger deploys, batch operations, add cooldowns.

Results So Far

  • 17 buckets connected
  • 936 files indexed
  • 165 links discovered
  • Sub-second graph rendering

The Shift: Revenue First

Here's the real lesson: R2 Brain is cool, but it doesn't generate revenue.

We've been building infrastructure endlessly β€” vector memory, knowledge graphs, agent frameworks. All useful. None paying bills.

New priority: $5,000 MRR by July

  • SrvcFlo subscriptions
  • KBC business listings
  • TCL voice agents

Cool projects are fun. Paying customers are better.


R2 Brain lives at r2-brain.srvcflo.workers.dev. Built with Cloudflare Workers, D1, R2, and D3.js.