by oleksiijko
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.
# Add to your Claude Code skills
git clone https://github.com/oleksiijko/pmbpmb is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by oleksiijko. 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. It has 80 GitHub stars.
pmb's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/oleksiijko/pmb" and add it to your Claude Code skills directory (see the Installation section above).
pmb is primarily written in Python. It is open-source under oleksiijko on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pmb against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Local-first memory, visualized. 3,800+ entities and 41,000+ connections, captured automatically as you work.
Quickstart · Dashboard · Why pmb-ai? · Demo · How it works · FAQ
Persistent memory for AI coding agents - local, offline, no API keys. For developers on Claude Code / Cursor / Codex who are tired of re-explaining context every session. PMB remembers your decisions, lessons, and project facts in one SQLite file on your disk and feeds them back through MCP.
⭐ Star the repo if PMB saves you a re-explanation.
PMB gives Claude Code, Cursor, Codex and the other MCP-aware agents a real memory. Decisions you made last week. Lessons you taught them. Personal facts about you. Project structure. PDFs. They survive every restart, every model upgrade, every agent switch - because they live in one SQLite file on your disk.
No API keys. No subscription. No LLM call on the read path. Just files.
pip install pmb-ai # 1. install
pmb setup # 2. detect your agent + wire the MCP entry
pmb warmup # 3. preload the model (first recall is instant)
# 4. restart your agent, then just talk to it - memory is automatic
pmb stats # 5. see what's stored
pmb recall "auth decision" # 6. search memory from the terminal
pmb doctor # 7. confirm everything is wired
That's it - your agent now remembers. No account, no keys, nothing leaves your machine.
Command name: the CLI is
pmb. Installed viapipyou also get the aliaspmb-ai; installed vianpm(npx pmb-ai) the command ispmb-ai. Same tool - use whichever your install gave you. From npm,npx pmb-ai setupruns the full cycle: it installs the Python package, then runs setup.
Docs: oleksiijko.github.io/pmb · Getting started · Deleting memories · all documentation.
pmb dashboard opens a local, liquid-glass UI over everything PMB captured - written automatically, just by working. It binds to 127.0.0.1 only, so nothing leaves your machine.
Map - every entity and connection in your project, as a live graph.
Timeline - your memory as a journal, newest first.
https://github.com/user-attachments/assets/c0f454c5-84b3-42d6-b1dc-f694978cd802
Prefer text? The Quickstart above is the same flow in seven commands.
pmb connect wires Claude Code, Cursor, Codex, Windsurf, Zed, VS Code, and more.pmb export dumps everything to Markdown/JSON. Apache 2.0.You: fix that LoadGuard pricing bug we hit last Tuesday
Agent: prepare(message="fix LoadGuard pricing bug")
↓ (6 ms)
→ project_context: 12 events about LoadGuard,
4 lessons (incl. "never lower NEGOTIATE/SKIP under 25%"),
3 decisions, 2 open goals
→ active_arcs: "LoadGuard verdict-policy refactor (started Tue)"
→ lessons: 1 directly matches "pricing"
→ recent_activity: 8 commits this week
Looking at src/engine/verdict-policy.ts (you opened it Tuesday
14:32, last changed Wednesday). The pricing bug you mentioned
is on line 142 where the bundle fallback was tightening below
the rate-floor. Per the lesson you saved, we should never
drop the threshold under 25% - let me restore the guard there.
The agent didn't ask. It didn't guess. It read its memory in 6 ms and showed up to the task already informed.
# Personal facts that change (with time-travel: old
# values archived, never lost)
record_keyed_fact("user", "city", "Warsaw")
# Project structure - symbols, imports, .gitignore-aware
pmb index project .
# PDFs (research papers, manuals, contracts)
pmb index pdf paper.pdf
pmb index pdf ~/docs --recurse
# Whatever your agent decides to log as it works
# (decisions, lessons, completed tasks, goals)
PMB is content-agnostic. If it's text the agent will care about later, PMB will remember and retrieve it.
A single MCP call - prepare(message) - returns the right things at
the right level of detail, in 4-16 ms:
| Field | What it is |
|---|---|
project_context |
Full project overview if the message mentions a project: key facts, lessons (RULES to follow), decisions, open goals, related entities, the project's narrative arc |
lessons |
Procedural rules matching the query, each with a surface_id so the agent can confirm it followed the rule later |
recent_activity |
Last 24 h of decisions / edits / completions for session continuity |
open_goals |
In-progress goals so the agent knows what you're pursuing |
active_arcs |
Narrative arcs the project is currently living in |
For everything else there's recall(query) (hybrid search, 35 ms warm)
and 27 other tools listed in docs/reference/COMMANDS.md.
flowchart LR
A[Your agent] -->|MCP stdio| B[PMB MCP server]
B --> C[Engine]
C -->|read 35 ms| R[Hybrid recall<br/>BM25 + vector + graph + rerank]
C -->|write under 1 ms| W[Async embed queue<br/>SQLite first, vectors later]
R --> D[(SQLite)]
R --> E[(LanceDB)]
W --> D
W --> E
style A fill:#dbeafe,color:#1e3a8a
style B fill:#ede9fe,color:#5b21b6
style C fill:#dcfce7,color:#14532d
Storage - every event lives in SQLite. Vectors live in LanceDB next
to it. Both are files on your disk; copy them anywhere with cp.
Recall - BM25 (lexical) + dense vector (semantic) + entity graph
Writes - async. The MCP tool returns in under a millisecond. The actual embed + LanceDB insert happens on a background thread.
Dedup - four layers. Exact text match → cosine ≥ 0.92 auto-merge
→ cosine 0.80-0.92 borderline (LLM verify later) → manual review in
the dashboard. Old values get archived, never deleted; full history
is queryable via keyed_fact_as_of(t).
Multilingual - no language packs. The default embedder
(paraphrase-multilingual-MiniLM-L12-v2) covers 50+ languages, so a
Russian query like где я живу finds an English keyed-fact stored as
user.city = Warsaw with no translation. Intent detection and keyed
extraction ride English semantic anchors that transfer cross-lingually
through the embedder - one mechanism for every language the model knows,
instead of a hand-written pack per language. The cold lexical path then
self-compiles from your own traffic (anchor→lexicon distillation), so a
language you actually use gets faster over time with zero configuration.
Recall stays strong across ~11 languages (overall top-3 ≈ 0.9 on a
101-query eval; top-1 = 1.00 for en/fr/pt/ru, CJK weaker on exact top-1).
See docs/contributing/adding-a-language.md.
pip install pmb-ai
Or from source:
git clone https://github.com/oleksiijko/pmb.git && cd pmb
python -m venv .venv && source .venv/bin/activate
pip install -e .
Prime the model once so the first recall is fast (the multilingual embedding
model is ~450 MB; without this the very first query pays a one-time cold-start
load):
pmb warmup
Running the tests? Use the venv's Python, not your system Python -
.venv/bin/python -m pytest(or.venv\Scripts\python.exe -m pyteston Windows). Running barepytestoutside th