MEMORY FOR AI AGENTS · OVER MCP

CaBrain

A memory organ for AI agents. Long-term recall and an entity graph that any agent reaches over MCP — so what one session learns, the next one already knows.

claude — cabrain
❯ memory_recall{ namespace: "fadymondy", query: "why is /docs scoped?" }
hybrid recall · vector + BM25 · RRF · reranked
✓ 3 memories, 41ms — hot tier
❯ memory_retain{ content: "docs are per-site", source_kind: "claude_code" }
salience gate → retained · ADD
✓ consolidation scheduled
togo install togo-framework/brain
  • MCP tools for any client
  • Postgres · pgvector · BM25
  • Redis L1 cache
  • Hot and cold tiers
  • Providers ship as plugins
  • Live at cabrain-app.fadymondy.com

Features

Hybrid recall, not just vectors

Vector similarity and BM25 fused with reciprocal rank, then reranked. A name or an exact phrase is found by the half of the search that is good at names.

Hot and cold, like a brain

A hippocampal hot tier answers fast; a cortical cold tier keeps everything. Salience-gated consolidation moves what matters between them while you are not looking.

Reconsolidation on recall

Remembering something changes it — recall strengthens a memory and lets it be corrected, rather than leaving a stale fact to be retrieved for ever.

Any client, one protocol

Claude Desktop and Code, Codex, Gemini and Cursor connect through one CLI that is both the MCP server and its installer.

Why CaBrain?

Four ways an agent can know something, from the shortest-lived to the longest.

conversation history   one session       lost when the context resets
        ↓
traditional RAG        documents         retrieved, but the agent cannot write back
        ↓
persistent memory      what it learned   retained now, recalled next session
        ↓
CaBrain                memory + graph    hybrid recall · entities · tiers · over MCP

Conversation history

Everything the agent knows lives in the context window, and goes when the session ends or the window fills.

Traditional RAG

Retrieval over documents someone indexed. Useful for reference material; the agent reads it but does not add to it.

Persistent memory

The agent retains decisions and facts as it works, and recalls them in a later session — so the second session starts where the first ended.

CaBrain

Persistent memory with an entity graph, vector + BM25 recall and hot/cold tiers, behind MCP tools. Connectors still ingest text, markdown, GitHub, SQL and crawled pages — RAG sits inside it, not against it.

What an agent can call

  • memory_recall
  • memory_retain
  • memory_get
  • memory_edit
  • memory_forget
  • graph_neighbors
  • graph_traverse
  • brain_chat

What it is built on

01

Store

  • togo-postgres
  • pgvector
  • VectorChord
  • BM25
02

Cache

  • Redis
03

Providers

  • brain-tei
  • brain-cognee

Get started

  1. 01

    Install the plugin

    togo install togo-framework/brain
  2. 02

    Connect your AI client

    cabrain connect claude-code
  3. 03

    Give it a namespace

    cabrain namespace create my-project

Status

Live. The console and the MCP API run at cabrain-app.fadymondy.com on togo-postgres with VectorChord and BM25, embedding and reranking through TEI — retain, recall and the entity graph are in daily use.

Community

GitHubmaintained

More from the ecosystem

All projects by Fady Mondy →

Give your agents a memory.

Open the console to create a brain, mint a scoped token and connect Claude Code, Cursor or any MCP client.