The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the PMB AI listing page.
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.
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:
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 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.
keyed_fact_as_of(t).paraphrase-multilingual-MiniLM-L12-v2) covers 50+ languages, so где я живу finds a keyed-fact stored as user.city = Warsaw. Intent detection rides English semantic anchors that transfer cross-lingually, and the cold lexical path self-compiles from your own traffic. Recall stays strong across ~11 languages (top-3 ~= 0.9 on a 101-query eval; top-1 = 1.00 for en/fr/pt/ru). See docs/contributing/adding-a-language.md.The Quickstart above is all most people need. Other ways:
Wire one or more agents (all stdio - the server runs as a child of your agent; no network, no port, no token):
Point several agents at one memory:
Sharing one memory across machines or a team? That's an optional HTTP mode with bearer-token auth - see docs/guide/TEAM.md. Not needed for local use.
Running the tests? Use the venv's Python:
.venv/bin/python -m pytest(or.venv\Scripts\python.exe -m pyteston Windows). Barepytestoutside the venv just reports missingnumpy/fastmcp/typer.
Step-by-step per agent: docs/guide/usage.md. Full reference: docs/reference/COMMANDS.md.
The hard part of agent memory isn't storing - it's getting the agent to use
what's stored. Soft instructions in a rules file get skipped. So PMB wires hooks
at the protocol level (pmb hooks install claude-code), each removing a
dependency on the model remembering to act:
ls are filtered out; edits, tests and commits are kept.record_* tool, it synthesizes one activity entry from the observed actions - so real work is captured even when the agent stays silent.Preview any without an agent: pmb auto-context "...", pmb session-restore -m 180, pmb lesson-followcheck --dry-run, pmb autowrite --dry-run.
Auto-recall fixed the read side; ambient memory does the same for the write
side - the memory journals the agent's work even when it forgets record_batch:
record_* tool this turn, ambient stays silent; it only fills the gap.source=autowrite, shown as auto in the dashboard, and removable with pmb forget-auto. On by default; disable with pmb config set autowrite.enabled false.pmb codex-notify), MCP-only hosts like Cursor/Zed/VS Code (git observer, pmb ambient-watch .). Check yours with pmb hooks capabilities.Synthesis is template-based by default (instant, no model). Opt into a local/API/CLI
model summary with pmb config set autowrite.synthesizer llm:ollama or llm:openai
(it has a timeout and falls back to the template).
Every surfaced lesson carries a surface_id. Follow-through is recorded both
ways: the agent confirms via mark_lesson_followed(surface_id, True), and the
Stop hook infers it from recorded activity. The Lessons tab then shows,
per rule: how often it was shown, how often it was followed, ★ USEFUL
(followed >= 2x), ? UNVERIFIED (surfaced but unconfirmed), and 💀 DEAD only
when a rule is repeatedly ignored (>= 2). You see which rules help and prune
the ones that don't.
PMB has 105 tunables. The 25 that affect day-to-day quality are default-tier
(pmb config list). The rest are internal weights and experimental flags,
hidden behind --pro so the surface stays scannable. Every pro key still reads
with pmb config get and writes with pmb config set - hidden from list, not
gated.
| Key | Default | What it does |
|---|---|---|
recall.top_k | 5 | How many results recall returns |
recall.bm25_weight | 0.7 | BM25 vs vector mix (1.0 = pure BM25) |
recall.ppr_enabled | true | Multi-hop graph diffusion, gated by intent |
recall.keyed_fact_boost | 0.35 | How hard personal-attr facts win on personal queries |
recall.rerank | false | Always-on cross-encoder (regresses LoCoMo, keep off) |
embedding.model | paraphrase-multilingual-MiniLM-L12-v2 | The vector model |
graph.extractor | regex | regex / spacy / llm:claude / llm:openai / llm:ollama / llm:codex |
mcp.record_batch_async | true | Fire-and-forget writes (sub-ms return) |
agent.apply_lessons | true | Agent surfaces lessons before acting |
dedup.enable | true | All four dedup layers |
decay.factor_per_day | 0.985 | Importance half-life |
chat.model | haiku | Default model for pmb-chat |
| Recall p50 / p95 warm | 35 ms / 110 ms |
prepare(message) warm | 4-16 ms |
record_batch_async | < 1 ms |
| MCP cold boot | 3.7 s |
| LoCoMo recall@10 (n=10) | 94.5 % |
| Multilingual mega-stress top-10 (900 q) | 99.2 % |
~/.pmb/<name>/. Copy it to Dropbox, push it to git, share it on a USB drive. Your call.Does PMB call an LLM? On read: never. On write: never by default. Optional:
pmb consolidate can run a local Ollama, Claude CLI, Anthropic, or OpenAI pass to write short
reflections - opt-in.
What about cost? $0. There is no PMB service.
Does the agent need to know about PMB? After pmb connect, the rules are
appended to CLAUDE.md / AGENTS.md automatically. The default profile exposes
10 core MCP tools (including the prepare() read-first pattern); wider profiles
exist for ingestion and admin.
Will it slow my agent down? Tools return in single-digit milliseconds for
everything except recall (35-110 ms warm), which is below human perception.
Can two agents share one memory? Yes - point them at the same workspace. SQLite WAL + a 10 s busy-timeout handle concurrent writes.
Wipe a fact? pmb forget <ulid> archives it (excluded from recall, restorable).
Hard-delete: pmb delete <ulid> --hard.
Windows? Yes - tested on Windows 11, macOS 14, Ubuntu 22.04. Cyrillic paths and console encoding are handled.
PDFs / code / Markdown? pmb index pdf paper.pdf, pmb index project .,
pmb import markdown ~/notes/, pmb import chatgpt path.json.
Cold start is slow. First recall loads the embedding model (~3 s). Run
pmb warmup once, or let the prewarm thread handle it in the background.
Roadmap? See docs/ROADMAP.md: litestream backup, optional cloud-sync (BYO bucket), tree-sitter project indexing, image OCR.
Issues and PRs welcome. There's one full-time maintainer; please open a discussion before a large change so we can align on direction.
scripts/codeql_local.sh auto-installs the CodeQL bundle on first run and runs
the exact suite CI uses, so security findings are caught locally instead of on a
push. The pre-commit hook bypasses with git commit --no-verify (or skip just
the scan with SKIP_CODEQL=1).
License: Apache 2.0.