oleksiijko/pmb

Local-first persistent memory for AI coding agents (Claude Code, Cursor, Codex) over MCP. Decisions, lessons and facts live in one SQLite file on your disk. Offline, multilingual.

What it solves

AI coding agents often forget critical project context, decisions, and lessons between sessions, forcing users to re-explain the same constraints and project structure repeatedly. PMB provides a local-first, durable memory system that allows agents to recall past decisions, personal facts, and project-specific rules across restarts and model upgrades.

How it works

PMB acts as an MCP (Model Context Protocol) server that connects to agents like Claude Code, Cursor, and Codex. It uses a hybrid retrieval system combining BM25 (lexical search), dense vectors (semantic search), and an entity graph to fetch relevant context in milliseconds.

Data is stored locally using SQLite as the primary source of truth and LanceDB for vector indexes. To ensure memory is actually used, PMB employs "hooks" at the protocol level to inject relevant context into the agent's prompt before the model even begins to process a request, and "ambient memory" to automatically journal the agent's work without requiring explicit tool calls.

Who it’s for

Developers using MCP-aware AI coding agents who want their tools to remember project-specific decisions, lessons, and structure without relying on cloud-based memory or API keys.

Highlights

  • Local-first Privacy: All data stays on the user's machine in a local workspace; no cloud accounts or API keys are required.
  • Protocol-level Hooks: Automatically injects memory into the agent's prompt, removing the need for the agent to remember to call a memory tool.
  • Ambient Memory: Automatically journals agent activity (edits, tests, commits) to capture work even when the agent doesn't explicitly record a memory.
  • Hybrid Recall: Combines lexical, semantic, and graph-based search for fast, multilingual retrieval (supporting 50+ languages).
  • Visual Dashboard: Includes a local web UI to visualize the project's memory as a live entity graph and timeline.
  • Self-Improvement Loop: Tracks whether surfaced lessons are actually followed by the agent, allowing users to prune "dead" rules.