<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fex Beck</title>
    <description>The latest articles on DEV Community by Fex Beck (@fex_beck_27bfd4dccd05f062).</description>
    <link>https://dev.to/fex_beck_27bfd4dccd05f062</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3868473%2F922afe48-56fe-41a5-9482-3441b3f31a8e.png</url>
      <title>DEV Community: Fex Beck</title>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fex_beck_27bfd4dccd05f062"/>
    <language>en</language>
    <item>
      <title>I accidentally built Karpathy's LLM Wiki — with 5,420 memories, 6 AI agents, and a self-healing knowledge graph</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Thu, 16 Apr 2026 19:29:44 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/i-accidentally-built-karpathys-llm-wiki-with-5420-memories-6-ai-agents-and-a-self-healing-263o</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/i-accidentally-built-karpathys-llm-wiki-with-5420-memories-6-ai-agents-and-a-self-healing-263o</guid>
      <description>&lt;p&gt;When Andrej Karpathy published his &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" rel="noopener noreferrer"&gt;LLM Wiki pattern&lt;/a&gt; on April 4, 2026, I had a strange feeling of deja vu. I'd been building exactly this — a persistent, compounding knowledge system maintained by AI agents — for months on my homelab server in Bavaria. Only mine had evolved into something he didn't describe: a multi-agent cognitive engine that fact-checks itself at 2 AM.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Karpathy Described
&lt;/h2&gt;

&lt;p&gt;Karpathy's core insight is elegant: RAG is stateless. Every query starts from scratch, searching raw documents. A wiki &lt;em&gt;compounds&lt;/em&gt; knowledge — each query refines and connects what the system knows.&lt;/p&gt;

&lt;p&gt;He proposes three layers (raw sources, wiki entries, schema) and three operations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ingest&lt;/strong&gt; — extract structured knowledge from raw sources, cross-reference with existing entries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query&lt;/strong&gt; — search the wiki, synthesize an answer, optionally write back&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lint&lt;/strong&gt; — periodically health-check for staleness, contradictions, gaps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a beautiful pattern. And I'd been living it for a month before he published it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built (Before Reading His Post)
&lt;/h2&gt;

&lt;p&gt;BrainDB started in March 2026 as a dumb JSON store so my Claude Code sessions could remember things between conversations. "Just save the SSH password somewhere," I thought.&lt;/p&gt;

&lt;p&gt;Five weeks later, it had grown into this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5,420+ memories&lt;/strong&gt; across 11 types: &lt;code&gt;credential&lt;/code&gt;, &lt;code&gt;service&lt;/code&gt;, &lt;code&gt;project&lt;/code&gt;, &lt;code&gt;feedback&lt;/code&gt;, &lt;code&gt;lesson&lt;/code&gt;, &lt;code&gt;issue&lt;/code&gt;, &lt;code&gt;reference&lt;/code&gt;, &lt;code&gt;user&lt;/code&gt;, &lt;code&gt;note&lt;/code&gt;, &lt;code&gt;research&lt;/code&gt;, &lt;code&gt;decision&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid search&lt;/strong&gt; — SQLite FTS5 + semantic embeddings (Ollama on a local GPU) + Reciprocal Rank Fusion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge graph&lt;/strong&gt; — 551 relations with automatic entity extraction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-agent coordination&lt;/strong&gt; — advisory locks, heartbeats, session handovers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;105+ API endpoints&lt;/strong&gt;, 40+ MCP tools wired directly into Claude Code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture wasn't planned. It was grown, one annoying problem at a time. "Why does Claude keep forgetting how my firewall works?" led to memory types. "Why did two agents just edit the same file?" led to coordination. "Why is this credential from last week wrong?" led to contradiction detection.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mapping — His Pattern, My Implementation
&lt;/h2&gt;

&lt;p&gt;When I read Karpathy's gist, I started mapping concepts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Karpathy's Concept&lt;/th&gt;
&lt;th&gt;BrainDB's Implementation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Raw Sources -&amp;gt; Wiki -&amp;gt; Schema&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;research&lt;/code&gt; memories -&amp;gt; &lt;code&gt;recall&lt;/code&gt;/&lt;code&gt;search&lt;/code&gt; -&amp;gt; &lt;code&gt;CLAUDE.md&lt;/code&gt; bootstrap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ingest (extract + cross-reference)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/learn&lt;/code&gt; + &lt;code&gt;/wiki/ingest&lt;/code&gt; (entity extraction, relation creation)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Query (search wiki + synthesize)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/ask&lt;/code&gt; RAG pipeline + &lt;code&gt;/wiki/synthesize&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lint (health check)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/wiki/lint&lt;/code&gt; + autoDream + contradiction detection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Index file&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/recall&lt;/code&gt; + &lt;code&gt;/hybrid-search&lt;/code&gt; (FTS5 + vectors)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Log file&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/wiki/log&lt;/code&gt; (append-only activity chronicle)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"The LLM maintains everything"&lt;/td&gt;
&lt;td&gt;6 AI agents, each with a specialty&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The overlap was uncanny. But the differences were more interesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where BrainDB Goes Further
&lt;/h2&gt;

&lt;p&gt;Karpathy describes a single LLM maintaining a wiki. BrainDB does that, but it also does things his pattern doesn't cover:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Inception Knowledge — The 2 AM Fact-Checker
&lt;/h3&gt;

&lt;p&gt;Every night at 2:30 AM, a cron job kicks off a dream cycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Wake GPU PC via Wake-on-LAN
-&amp;gt; Query SearXNG for facts to verify
-&amp;gt; Pre-gate with local 14B model (free)
-&amp;gt; Fact-check survivors with Mistral API (free tier)
-&amp;gt; Store validated findings back in BrainDB
-&amp;gt; Shut down GPU PC
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Last week it caught that a Docker image I'd pinned had a CVE published two days prior. I woke up to a memory tagged &lt;code&gt;type: issue&lt;/code&gt; with the CVE number and a suggested fix. Self-healing knowledge isn't a feature — it's the whole point.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Contradiction Detection
&lt;/h3&gt;

&lt;p&gt;Five automated strategies scan for conflicts: port collisions, status mismatches, decision reversals, credential drift, and temporal impossibilities. When two memories disagree, the system flags it and optionally routes to Mistral for arbitration.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"strategy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"port_conflict"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"memory_a"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Grafana runs on port 3000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"memory_b"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Brain dashboard runs on port 3000"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"severity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"high"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"auto_resolved"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is Karpathy's "lint" on steroids. His lint checks for staleness and gaps. Mine checks whether the knowledge is &lt;em&gt;internally consistent&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Multi-Agent Coordination
&lt;/h3&gt;

&lt;p&gt;Not one LLM — six, each with a role:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code (Opus)&lt;/td&gt;
&lt;td&gt;expensive&lt;/td&gt;
&lt;td&gt;Orchestration, complex multi-step tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistral&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;Strategy, analysis, fact-checking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codestral&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;Code review, refactoring, security&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex&lt;/td&gt;
&lt;td&gt;subscription&lt;/td&gt;
&lt;td&gt;Autonomous multi-file coding&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local 14B (Ollama)&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;Batch processing, embeddings, offline fallback&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vibe&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;Quick prototyping&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;They coordinate through BrainDB: advisory locks prevent two agents from editing the same project, heartbeats track who's alive, and handover records let a morning session pick up exactly where the 2 AM dream cycle left off.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Temporal Decay
&lt;/h3&gt;

&lt;p&gt;Every memory has a freshness score with a 30-day half-life. A credential stored yesterday scores 1.0. The same credential after 60 days scores 0.25. Search results factor in freshness, so you naturally get current information first.&lt;/p&gt;

&lt;p&gt;Karpathy's wiki doesn't age. Mine does. Because facts spoil.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Context Budget API
&lt;/h3&gt;

&lt;p&gt;Ask for 4,000 tokens of context about "firewall configuration" and get exactly that — the most relevant memories packed into your budget, scored and ranked:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl braindb:3197/compact &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"query": "firewall rules", "budget": 4000}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This turns BrainDB from a search engine into a context engine. The LLM doesn't drown in irrelevant results — it gets a curated briefing, every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Wiki Integration (After Reading His Post)
&lt;/h2&gt;

&lt;p&gt;Credit where it's due: Karpathy's framing gave me four endpoints I was missing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/wiki/synthesize&lt;/code&gt;&lt;/strong&gt; — Takes related memories and asks Mistral to produce a synthesis. Connections I hadn't seen emerged.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/wiki/lint&lt;/code&gt;&lt;/strong&gt; — A proper health score: orphan detection, staleness audit, coverage gaps, contradiction count.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/wiki/ingest&lt;/code&gt;&lt;/strong&gt; — Cascading ingest with entity extraction and auto-linking to the knowledge graph.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/wiki/log&lt;/code&gt;&lt;/strong&gt; — An append-only chronicle of every knowledge mutation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lint run was humbling. First pass flagged 20,647 contradictions. After reviewing them, 99.7% were false positives — mostly memories that described the same thing at different points in time. After dismissing those, the health score went from 0 to 69. There's work to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Knowledge compounds, but only if maintenance cost is zero.&lt;/strong&gt; This is Karpathy's core insight and it's exactly right. BrainDB's maintenance is automated — dream cycles, contradiction detection, temporal decay. If I had to manually curate 5,420 memories, I'd have stopped at 50.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A single LLM is not enough.&lt;/strong&gt; Different models have different strengths and cost profiles. Claude orchestrates. Mistral analyzes. Codestral reviews code. The local model handles bulk work for free. The ensemble is smarter and cheaper than any single model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contradiction detection is the killer feature nobody talks about.&lt;/strong&gt; Everyone builds RAG. Nobody builds systems that notice when their own knowledge is wrong. This is where the real reliability comes from.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The wiki pattern works better as an API than as markdown files.&lt;/strong&gt; Karpathy describes a folder of markdown files. That works for a prototype. But once you need search, scoring, freshness, coordination, and budget-aware retrieval, you need a database with an API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;Karpathy's LLM Wiki pattern is a great mental model. But the real magic happens when you add agents, contradictions, and a system that learns while you sleep. BrainDB started as a hack to save SSH passwords and became the nervous system for everything I build.&lt;/p&gt;

&lt;p&gt;If you want to try the lightweight version: &lt;strong&gt;BrainDB Light+&lt;/strong&gt; is open source — single Docker container, SQLite-backed, under 500 KB, with hybrid search and the full wiki pattern built in.&lt;/p&gt;

&lt;p&gt;What does your AI remember between sessions? And more importantly — does it know when it's wrong?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is the second article in my BrainDB series. The first one, &lt;a href="https://dev.to/fex_beck_27bfd4dccd05f062/i-built-an-ai-memory-that-fact-checks-itself-while-you-sleep"&gt;"I Built an AI Memory That Fact-Checks Itself While You Sleep"&lt;/a&gt;, covers the Inception Knowledge system in detail.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>braindb</category>
      <category>karpathy</category>
    </item>
    <item>
      <title>How to give Claude Code persistent memory with 51 MCP tools</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Wed, 08 Apr 2026 20:40:47 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/how-to-give-claude-code-persistent-memory-with-51-mcp-tools-3h2f</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/how-to-give-claude-code-persistent-memory-with-51-mcp-tools-3h2f</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Claude Code uses MEMORY.md files for persistence. 200-line limit, no search, no validation, no multi-agent support. After months of fighting this, I built BrainDB.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup (2 minutes)
&lt;/h2&gt;

&lt;p&gt;Clone, configure, start:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/beckfexx/BrainDB.git
cd BrainDB &amp;amp;&amp;amp; cp .env.example .env
bun install &amp;amp;&amp;amp; bun run start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add to your MCP config (Claude Code settings):&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{&lt;br&gt;
  "mcpServers": {&lt;br&gt;
    "braindb": {&lt;br&gt;
      "command": "bun",&lt;br&gt;
      "args": ["run", "src/mcp-client.ts"],&lt;br&gt;
      "env": { "BRAINDB_URL": "&lt;a href="http://localhost:3197" rel="noopener noreferrer"&gt;http://localhost:3197&lt;/a&gt;" }&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  What you get (51 tools)&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Smart Context&lt;/strong&gt; — Claude loads relevant memories based on CWD and git branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decisions that stick&lt;/strong&gt; — Authoritative memories that supersede conflicting old ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session Handovers&lt;/strong&gt; — Pass context to the next session seamlessly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contradiction Detection&lt;/strong&gt; — Flags conflicting stored facts automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nightly Self-Learning&lt;/strong&gt; — Validates memories against web sources overnight.&lt;/p&gt;

&lt;h2&gt;
  
  
  MEMORY.md vs BrainDB
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;MEMORY.md&lt;/th&gt;
&lt;th&gt;BrainDB&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Search&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;FTS5 + embeddings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Capacity&lt;/td&gt;
&lt;td&gt;200 lines&lt;/td&gt;
&lt;td&gt;Unlimited&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Nightly fact-checking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent&lt;/td&gt;
&lt;td&gt;File conflicts&lt;/td&gt;
&lt;td&gt;Claims + handovers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Contradictions&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Auto-detected&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The 51 Tools grouped
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Memory&lt;/strong&gt; (15): remember, recall, forget, decide, context, validate, learn...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search&lt;/strong&gt; (5): semantic-search, hybrid-search, embeddings...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents&lt;/strong&gt; (8): heartbeat, claim, release, handover, inbox...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph&lt;/strong&gt; (10): entities, relations, contradictions...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System&lt;/strong&gt; (8): health, stats, backup, capabilities...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inception&lt;/strong&gt; (5): dream, decay, inception findings...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every tool Claude Code needs for real persistent memory. No more MEMORY.md limitations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/beckfexx/BrainDB" rel="noopener noreferrer"&gt;GitHub: beckfexx/BrainDB&lt;/a&gt; — AGPL-3.0, TypeScript.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>mcp</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why SQLite+FTS5 beats Vector DBs for AI Agent Memory</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Wed, 08 Apr 2026 20:40:09 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/why-sqlitefts5-beats-vector-dbs-for-ai-agent-memory-4inj</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/why-sqlitefts5-beats-vector-dbs-for-ai-agent-memory-4inj</guid>
      <description>&lt;h2&gt;
  
  
  The conventional wisdom is wrong
&lt;/h2&gt;

&lt;p&gt;Everyone says you need a vector database for AI memory. Pinecone, Weaviate, Qdrant. They all need a server, an API key, and a monthly bill.&lt;/p&gt;

&lt;p&gt;I went a different way: &lt;strong&gt;SQLite + FTS5&lt;/strong&gt;. One file. Zero dependencies. Better results.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;BrainDB stores 4,300+ memories in a single SQLite file with three search modes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Full-text search (FTS5)&lt;/strong&gt; — Sub-millisecond keyword search with BM25 ranking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Embedding similarity&lt;/strong&gt; — 384-dim vectors stored as BLOBs, cosine similarity computed in TypeScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Hybrid search&lt;/strong&gt; — Reciprocal Rank Fusion combines both for best-of-both-worlds retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Custom relevance scoring
&lt;/h2&gt;

&lt;p&gt;SQLite custom functions run type-aware ranking inside the database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decisions get +0.3 boost (authoritative)&lt;/li&gt;
&lt;li&gt;Issues get -0.1 (often resolved)&lt;/li&gt;
&lt;li&gt;Superseded memories return 0&lt;/li&gt;
&lt;li&gt;Exponential time decay with type-specific half-lives&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;SQLite+FTS5&lt;/th&gt;
&lt;th&gt;Pinecone Free&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Latency&lt;/td&gt;
&lt;td&gt;&amp;lt;1ms&lt;/td&gt;
&lt;td&gt;50-200ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Setup&lt;/td&gt;
&lt;td&gt;0 minutes&lt;/td&gt;
&lt;td&gt;15 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;$0&lt;/td&gt;
&lt;td&gt;$0-70/mo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backup&lt;/td&gt;
&lt;td&gt;cp file.db backup.db&lt;/td&gt;
&lt;td&gt;API call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Offline&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;For most AI agent memory use cases, SQLite is the right choice.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/beckfexx/BrainDB" rel="noopener noreferrer"&gt;Try it: github.com/beckfexx/BrainDB&lt;/a&gt; — AGPL-3.0, TypeScript, Bun.&lt;/p&gt;

</description>
      <category>sqlite</category>
      <category>ai</category>
      <category>vectordatabase</category>
      <category>typescript</category>
    </item>
    <item>
      <title>I built an AI memory that fact-checks itself while you sleep</title>
      <dc:creator>Fex Beck</dc:creator>
      <pubDate>Wed, 08 Apr 2026 19:45:46 +0000</pubDate>
      <link>https://dev.to/fex_beck_27bfd4dccd05f062/i-built-an-ai-memory-that-fact-checks-itself-while-you-sleep-29mj</link>
      <guid>https://dev.to/fex_beck_27bfd4dccd05f062/i-built-an-ai-memory-that-fact-checks-itself-while-you-sleep-29mj</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;AI agents forget everything between sessions. Claude Code uses MEMORY.md files — a 200-line limit, no search, no validation. After months of manually maintaining memory files, I built something better.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is BrainDB?
&lt;/h2&gt;

&lt;p&gt;BrainDB is a &lt;strong&gt;local-first AI memory system&lt;/strong&gt; built on SQLite. No cloud, no vector database, no subscriptions. One SQLite file, 110 REST endpoints, 51 MCP tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why SQLite instead of Pinecone/Weaviate?
&lt;/h3&gt;

&lt;p&gt;SQLite with FTS5 gives you sub-millisecond full-text search with BM25 ranking. Combined with embedding vectors (stored as BLOBs), you get &lt;strong&gt;hybrid search&lt;/strong&gt; — keyword precision + semantic understanding. For &amp;lt;100k memories, this beats any managed vector DB in latency and simplicity.&lt;/p&gt;

&lt;h3&gt;
  
  
  The killer features nobody else has
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Inception — Nightly fact-checking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every night, BrainDB picks high-importance memories, generates search queries, searches the web via SearXNG, and fact-checks them with an LLM. Last run found 26 outdated facts automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[inception] Processing: "PostgreSQL default port is 5433"
[inception] Web search: 3 results confirm port 5432
[inception] Result: CONTRADICTION — stored fact is wrong
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. autoDream — Knowledge consolidation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While you sleep, BrainDB merges duplicate memories, archives stale ones, and adjusts importance scores. Like defragmenting your AI's brain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Multi-agent coordination&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multiple AI agents can share the same memory with pessimistic locking (claims), context handovers, heartbeat monitoring, and a signal protocol. No conflicts, no data races.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MCP Client (Claude/Cursor) → MCP Server → REST API → SQLite+FTS5
                                              ↓
                                    Ollama (local embeddings)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7 route modules: Memory, Search, Agents, Graph, Orchestrator, System, Inception.&lt;/p&gt;

&lt;h3&gt;
  
  
  Relevance Scoring
&lt;/h3&gt;

&lt;p&gt;Custom SQLite function with type-aware ranking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decisions get +0.3 boost (authoritative)&lt;/li&gt;
&lt;li&gt;Issues get -0.1 (often resolved)&lt;/li&gt;
&lt;li&gt;Superseded memories return 0 (replaced by newer version)&lt;/li&gt;
&lt;li&gt;Exponential time decay with type-specific half-lives&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/beckfexx/BrainDB.git
&lt;span class="nb"&gt;cd &lt;/span&gt;BrainDB &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
bun &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; bun run start
&lt;span class="c"&gt;# → http://localhost:3197/health&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;4,300+ memories&lt;/strong&gt; in production&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;110 REST endpoints&lt;/strong&gt; across 7 domain modules&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;51 MCP tools&lt;/strong&gt; for Claude Code / Cursor&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;0 TypeScript errors&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AGPL-3.0&lt;/strong&gt; — free for self-hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Compared to alternatives
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;BrainDB&lt;/th&gt;
&lt;th&gt;MemPalace&lt;/th&gt;
&lt;th&gt;LangChain Memory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid search (FTS5+embeddings)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Self-learning (Inception)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent coordination&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;⚠️ Basic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local-first (no cloud)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Knowledge graph&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production-tested&lt;/td&gt;
&lt;td&gt;✅ 4.3k memories&lt;/td&gt;
&lt;td&gt;Demo only&lt;/td&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/beckfexx/BrainDB" rel="noopener noreferrer"&gt;beckfexx/BrainDB&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback welcome. This is a solo project — every star, issue, or PR helps.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>sqlite</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
