pmb  by oleksiijko

Local-first persistent memory for AI coding agents

Created 1 month ago
294 stars

Top 89.7% on SourcePulse

GitHubView on GitHub
Project Summary

Local-first persistent memory for AI coding agents, PMB addresses the common problem of AI context loss between sessions. It provides a local SQLite-based workspace to store decisions, lessons, and facts, feeding them back to agents via the Model Context Protocol (MCP) without cloud reliance or API keys. This empowers AI coding assistants like Claude Code, Cursor, and Codex with durable memory, eliminating repetitive explanations and enhancing productivity.

How It Works

PMB utilizes SQLite as the durable source of truth for all stored information, with rebuildable search indexes (LanceDB) co-located. Its MCP-native integration injects relevant memory context into agent prompts before model inference, ensuring agents are informed without explicit tool calls. The recall mechanism is a sophisticated fusion of BM25 lexical search, dense vector semantic search, entity graph traversal, and optional cross-encoder reranking. Writes are asynchronous, returning in under a millisecond, with embedding and indexing handled in a background thread.

Quick Start & Requirements

  • Primary install: pip install pmb-ai
  • Setup: Run pmb setup to detect and wire your agent, followed by pmb warmup to preload the embedder. Restart your agent; memory becomes automatic.
  • Prerequisites: Python environment. No specific hardware, GPU, or CUDA versions are mandated by the README.
  • Links: Website, Docs

Highlighted Details

  • Local-First & Zero-Config: All data resides on your disk in SQLite; no cloud, API keys, or telemetry.
  • MCP-Native Integration: Seamlessly injects memory into supported agents (Claude Code, Cursor, Codex, etc.) via protocol-level hooks.
  • Fast Recall & Writes: Read path recall averages ~35ms (warm), while writes complete in under 1ms.
  • Multilingual Support: The default embedder supports over 50 languages, enabling cross-lingual memory retrieval without per-language configuration.
  • Local Dashboard: A web UI (pmb dashboard) visualizes memory entities, connections, and tracks the impact of recalled lessons.
  • Ambient Memory: Automatically journals agent actions and decisions, ensuring work is captured even if the agent doesn't explicitly record it.

Maintenance & Community

The project is maintained by a single full-time developer, with contributions welcomed via issues and PRs. Discussions are encouraged before significant changes. The roadmap, detailing features like Litestream backup and optional cloud sync, is available at docs/ROADMAP.md.

Licensing & Compatibility

PMB is licensed under the Apache 2.0 license, permitting commercial use and integration into closed-source projects without copyleft restrictions. Its local-first architecture ensures broad compatibility with existing AI agent setups.

Limitations & Caveats

The initial cold start for recall can be slow (~3s) due to embedding model loading, though pmb warmup mitigates this. While tested on major OS platforms, specific edge cases on Windows or other environments may exist. The project appears actively developed, with ongoing roadmap items suggesting it may not yet be considered fully stable for all production scenarios.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
47
Issues (30d)
1
Star History
221 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.