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 decisions, lessons, and constraints between sessions, forcing users to re-explain the same context repeatedly. PMB provides a local-first, durable memory system that allows agents to recall past decisions, project structures, and personal facts without relying on on-cloud storage or API keys.

How it works

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

Key technical components include:

  • Storage: SQLite serves as the source of truth for durable events, while LanceDB handles rebuildable vector indexes.
  • Read Path: A prepare(message) call retrieves project context, lessons, and recent activity in 4-16ms, injecting it into the agent's prompt before the model processes the request.
  • Write Path: Memory is captured asynchronously (under 1ms) via agent tools or "ambient memory" hooks that journal the agent's work (edits, tests, commits) even if the agent forgets to explicitly record a fact.
  • Multilingual Support: Uses a multilingual embedder covering 50+ languages, allowing cross-lingual retrieval (e.g., a Russian query finding an English fact).

Who it’s for

Developers using MCP-aware AI coding agents (such as Claude Code, Cursor, Codex, Windsurf, or Zed) who want their agents to maintain long-term project memory across sessions and model upgrades while keeping their data entirely local.

Highlights

  • Local-first: No cloud, no API keys, and no telemetry; all data is stored in a local SQLite workspace.
  • Protocol-level Hooks: Injects memory automatically before the model thinks, removing the need for the agent to manually call a memory tool.
  • Ambient Memory: Automatically journals agent activity (like successful fixes or deploys) to ensure real work is captured.
  • Visual Dashboard: A local web UI providing a live entity graph (Map), a journal (Timeline), and tools to prune "dead" lessons.
  • High Performance: Extremely fast recall (35ms warm) and near-instant writes.
  • Data Portability: Supports snapshots and exports to Markdown/JSON.

Related

  • Project
  • Project
  • Project
  • Project
  • Dispatch