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 294 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. AgentsLLM 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.
Website · Docs · Quickstart · Demo · Why PMB · How it works · FAQ
Your AI agent forgets everything between sessions. So you re-explain the same decisions, lessons and constraints over and over. PMB remembers them in one local workspace and feeds them back through MCP - no cloud, no API keys, no LLM call on the read path. And it tells you when memory is actually helping, instead of claiming "+X%".
⭐ 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, 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 API keys. No subscription. No LLM call on the read path. Just local 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. Viapipyou also get the aliaspmb-ai; vianpm(npx pmb-ai setup) the command ispmb-aiand it installs the Python package first, then runs setup. Same tool - use whichever your install gave you.
Links: pmbai.dev (site) · docs.pmbai.dev (docs) · Getting started · Deleting memories.
What it feels like - same prompt, with and without memory:
▶ Click to play the 2-minute setup
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 is on line 142
where the bundle fallback tightened below the rate-floor. Per the
lesson you saved, we never drop the threshold under 25% - restoring
the guard there.
The agent didn't ask. It didn't guess. It read its memory in 6 ms and showed up already informed.
pmb connect wires Claude Code, Cursor, Codex, Windsurf, Zed, VS Code, and more.pmb export dumps everything to Markdown/JSON. Apache 2.0.pmb dashboard opens a local, liquid-glass web UI on http://127.0.0.1:8765
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.
Nine tabs: Map (entity graph, live), Timeline (git-graph by project), Overview, Entities, Arcs (narrative threads), Lessons (per-rule follow-rate, dead-lesson detection), Duplicates (inline merge), Performance (per-tool latency), Recall (debug ranker).
pmb snapshot create --note "before maintenance"
pmb snapshot list
pmb snapshot verify <snapshot-id>
# Stop PMB servers, agent connections, and dashboards before restoring.
pmb snapshot restore <snapshot-id>
Snapshots use SQLite online backup to include committed WAL data and record
file checksums. Restore checks the snapshot before changing memory and saves
a verified copy of the previous state. Use pmb snapshot list --json in scripts.
See backup and recovery for scope and limitations.
# Personal facts that change (time-travel: old values archived, never lost)
record_keyed_fact("user", "city", "Warsaw")
# Project structure - symbols, imports, .gitignore-aware
pmb index project .
# Why each file exists + the intent behind every commit (Haiku-summarised, local)
pmb track modules # one-line purpose per indexed file
pmb track changes # new commits: what changed and WHY
# PDFs (research papers, manuals, contracts)
pmb index pdf paper.pdf
pmb index pdf ~/docs --recurse
# Whatever your agent logs as it works: decisions, lessons, completed tasks, goals
PMB is content-agnostic. If it's text the agent will care about later, PMB remembers and retrieves 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 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