# Your AI forgets
everything. Fix that.

Local-first memory for MCP agents. Every decision, correction, and preference — indexed and searchable in <50ms. Nothing leaves your machine.

Get started
View source
`$ pip install brainlayer`
claude ~ myproject
❯ What approach did we use for auth? [BrainLayer] SessionStart hook · 3 chunks injected (12ms) I'll check our past decisions on authentication. ┌─ brain_search(query="auth approach architecture decision") │ │ chunks: 3 latency: 12ms top: 0.94 │ │ "Chose JWT with refresh tokens over session cookies. │ Reason: stateless API, mobile client support. │ Decision: 2026-02-14. Confidence: high." │ └─ rt-a4f82c19 · importance: 9 You chose JWT with refresh tokens on Feb 14th. The rationale was stateless APIs and mobile client support. Continuing with that pattern.
The problem

## Your AI has amnesia

Every session starts from zero. Your agent doesn't remember the architecture decision from last week, the debugging approach that worked, or that you prefer tabs over spaces.
You explain the same context dozens of times. It suggests patterns you've already rejected.

The fix

## Install. Index. Search.

BrainLayer indexes your AI conversations into 284K searchable chunks. Hybrid search (semantic + keyword + knowledge graph) finds the right memory in <50ms.
SessionStart hooks auto-inject relevant context before you even ask. Everything stays on your machine. One SQLite file.

MCP tools

## Eleven tools. One protocol.

Core — what you use daily
brain_search Hybrid semantic + keyword + KG search across all memory
brain_store Persist decisions, learnings, corrections with tags and importance
brain_recall Proactive context injection at session start
brain_ack Acknowledge injected chunks so they don't repeat
brain_expand Expand a chunk with its full context and relations
Advanced
brain_entity Knowledge graph entity lookup
brain_digest Ingest large content, auto-extract entities and relations
brain_subscribe Watch for new matching memories in real time
brain_tags List all tags and their chunk counts
brain_update Update content, tags, or importance of existing chunks
brain_unsubscribe Stop watching a subscription
Native macOS

## BrainBar — your memory in the menu bar

🔍

### Cmd+K search

Spotlight-style overlay. Sub-100ms typeahead across all memory. Filter by importance, project, or tags.

🕐

### Dashboard

Real-time pipeline status. Chunks indexed, enrichments queued, daemon health, memory usage — all in a popover.

🌐

### Knowledge graph

Interactive force-directed visualization of entities and relations. Tap a node to see linked chunks.

📜

### Injection viewer

Track when BrainLayer injects context into your AI sessions. See which chunks, how many tokens, when.

209KB native Swift app. Async init — menu bar item appears in `<250ms`.

See it work

## The memory pipeline in action

brainlayer — memory pipeline
Session 1 — storing sess-a7f3c
Knowledge Graph 0 entities
chunks 284,291 entities 12,847 latency 11ms pipeline idle
Works with

## Any MCP client

Claude Code
Cursor
Zed
VS Code
Codex
Kiro
Gemini CLI
Getting started

## Three steps

01

Install from PyPI

pip install brainlayer
02

Configure MCP and index conversations

brainlayer init
03

Start real-time indexing

brainlayer watch

## Stop repeating yourself.

Three commands. Persistent memory. Your data stays yours.

`$ pip install brainlayer`