# cerebellum

A personal memory system that any MCP-compatible AI tool can query through a shared PostgreSQL and pgvector store, filtering raw captured thoughts through a synthesis and review stage before anything is saved.

cerebellum stores personal notes and thoughts in Postgres with pgvector and exposes them over MCP, so tools such as Claude, Cursor or ChatGPT can query the same memory store without separate integration work. A CLI alias captures raw thoughts, which first pass through an Operator stage, an LLM that decides whether a fragment is complete enough to route on its own, should wait for more related fragments, or should be merged with other buffered entries into one stronger note; a synchronized buffer with time-to-live expiry keeps concurrent captures from corrupting each other.

Captures then reach a Gatekeeper stage that checks quality and contradictions and runs an adversarial review, followed by a final human review step before anything is embedded, classified and written to Postgres. The stored notes can then be searched with a semantic search tool, listed by recency, or queried through statistics, from any MCP client. The repository also ships prompt templates for migrating an existing memory store and running a weekly review.

Website: https://james-valentine.com/projects
