← Back to directory
P

PMB AI

Community
Local-first persistent memory for AI coding agents.
GitHub source repository ↗
★ 284 Stars Category · Dev Tools Very popular Source revision 133f3a35d424
63FMRS · C
Reliability
10/20
Security and permissions
12/20
Maintenance
14/20
Documentation
15/20
Setup experience
12/20
Read the FMRS scoring method →

PMB gives Claude Code, Cursor, Codex and other MCP-aware agents a real memory: decisions you made last week, lessons you taught them, personal facts, project structure, PDFs. They survive every restart, every model upgrade, every agent switch - because they live in a local workspace you own, with SQLite as the durable source of truth and rebuildable search indexes beside it. No cloud, no API keys, no LLM call on the read path. Just local files.

Tools

prepare
Injects matching memory context (project overview, lessons, decisions, recent activity) before the agent thinks.
recall
Hybrid search over memory using BM25, vector, entity graph, and optional reranking.
record_keyed_fact
Stores personal facts (e.g., user city) that can change; old values are archived, never lost.
record_batch
Batch records events asynchronously with sub-millisecond return.
record_decision
Records a decision made by the agent.
record_lesson
Records a lesson as a rule to follow later.
record_goal
Records a goal to track progress.
index
Indexes project code, PDFs, or directories, extracting structure and content.
track
Tracks modules or changes, generating summaries (e.g., commit intent).
import
Imports history from external sources (e.g., ChatGPT export).
forget
Archives or deletes a memory.
mark_lesson_followed
Marks whether a lesson was followed, enabling the self-improvement loop.
keyed_fact_as_of
View historical value of a keyed fact at a specific time.

Setup

  1. Install with pip install pmb-ai.
  2. Run pmb setup to detect your agent and wire the MCP entry.
  3. Run pmb warmup to preload the model (first recall is instant).
  4. Restart your agent, then just talk - memory is automatic.
  5. Use pmb stats to see what's stored, pmb recall "query" to search, and pmb doctor to confirm everything is wired.

Fit and risk

Best for

  • Developers using Claude Code, Cursor, or Codex
  • Users prioritizing privacy and local data control
  • Teams needing persistent memory without cloud dependency

Not for

  • Users requiring online collaboration or cloud sync
  • Users without local disk space or needing real-time sync across devices
  • Users wanting zero configuration and avoiding command-line operations

Required permissions

  • Read local filesystem (for indexing project, PDFs, etc.)
  • Write to local SQLite database and LanceDB indexes
  • Execute CLI commands (pmb)
  • Optional network access (e.g., when using Ollama or OpenAI for summarization)

Risks and side effects

  • Local data loss risk if not backed up
  • Indexing large projects may consume disk space
  • Data is not encrypted by default; secrets are auto-redacted
  • Requires command-line familiarity

Troubleshooting

  1. Common issues:
  2. - Cold start slow: run `pmb warmup` to preload model.
  3. - Agent not using memory: check `pmb connect` setup, or use `pmb hooks install` to force injection.
  4. - Slow writes: ensure `mcp.record_batch_async` is true.
  5. - Multi-agent conflicts: SQLite WAL handles concurrent writes, but be mindful of locks.
  6. - Indexing failures: check file permissions and paths.

Use cases

Preserve agent memory across sessions, avoiding re-explaining decisions and constraints.
Store project structure, PDFs, personal facts, and other long-term information.
Share memory across a team via optional HTTP mode with authentication.
Enhance agent behavior through lesson rules and follow-through feedback.

Supported clients

Claude DesktopFull support
CursorFull support
CodexFull support
WindsurfFull support
ZedFull support
VS CodeFull support