PMB
Memory server
First committed by oleksiijko
Published in oleksiijko/pmb. Publisher page
285 GitHub stars
What it is
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.
AutoGineer overview, from the brain’s own files
PMB provides persistent memory for MCP-aware AI coding agents like Claude Code, Cursor, and Codex. By using a local SQLite database as the source of truth, it captures decisions, lessons, and project facts, allowing agents to retain context across sessions without relying on cloud storage or external API keys. The system uses a hybrid approach combining lexical search, vector embeddings, and entity graphs to surface relevant information to the agent. It includes tools for indexing project structures, tracking commit intent, and managing memory through a dashboard, ensuring that agents can access historical context automatically.
How it works
Memory model: Hybrid
AutoGineer overview, from the brain’s own files
PMB operates as an MCP server that connects to your AI agent. It uses a hybrid memory model where durable events are stored in a local SQLite database, while search indexes are maintained in LanceDB. When an agent interacts with the system, PMB uses a combination of BM25 lexical search, vector embeddings, and entity graph analysis to retrieve relevant information. The system includes hooks that automatically observe agent activity and inject context into the agent's workflow, while also allowing for manual indexing of files, PDFs, and project data.
| Folder | Role | Files |
|---|---|---|
| .claude | agent-config | 1 |
| .github | agent-config | 10 |
| docs | docs | 41 |
| scripts | scripts | 47 |
| src | source-code | 173 |
| tests | tests | 199 |
| docker | folder | 4 |
| mintlify | folder | 34 |
| npm | folder | 5 |
Requirements
Runtimes: Python >=3.11
Databases: LanceDB, SQLite
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)
Set it up
This brain runs code automatically: 1 script. Review Makefile before opening the folder in Claude Code. No step below turns a hook on for you.
Makefile:pip install -e .
- Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/oleksiijko/pmb/blob/d0e2f2e287acb10e7c7fb794941a76533ade52d6/README.md#install
- Not scanned by AutoGineerAutoGineer could not scan everything it runs. https://pypi.org/project/pmb-ai/
First committed by oleksiijko. Published in oleksiijko/pmb. Licence: Apache License 2.0.
Usage
AutoGineer overview, from the brain’s own files
- Install the PMB package via pip or npm.
- Run the setup command to configure your agent and wire the MCP connection.
- Use the CLI to index project files, track changes, or import existing data.
- Interact with your AI agent as usual, allowing PMB to automatically inject relevant memory and record new events.
- “pmb recall "auth decision"”
- The system searches the local SQLite memory and returns stored information regarding past authentication decisions.
- “pmb index project .”
- The system scans the current directory to index the project structure and symbols into the memory store.
Documentation by oleksiijko
<!-- mcp-name: io.github.oleksiijko/pmb-ai -->
<div align="center">
<img src="https://raw.githubusercontent.com/oleksiijko/pmb/main/docs/assets/logo.png" width="100" alt="PMB logo">
PMB
Local-first memory for your AI coding agent.
SQLite is the source of truth. No cloud, no API keys, no re-explaining.
Image: Website Image: PyPI Image: CI Image: Docs Image: Python Image: License Image: MCP Image: GitHub MCP Registry
<img src="https://raw.githubusercontent.com/oleksiijko/pmb/main/docs/assets/dashboard-map.png" width="760" alt="PMB dashboard - your project's memory as a live entity graph">
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.
</div>
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.
Quickstart
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 wiredThat'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.
Demo
What it feels like - same prompt, with and without memory:
<div align="center">
<a href="https://github.com/oleksiijko/pmb/raw/main/docs/assets/pmb-setup.mp4"><img src="https://raw.githubusercontent.com/oleksiijko/pmb/main/docs/assets/pmb-setup-poster.png" width="820" alt="Watch the 2-minute PMB setup"></a>
<sub>▶ Click to play the 2-minute setup</sub>
<img src="https://raw.githubusercontent.com/oleksiijko/pmb/main/docs/assets/before-after.svg" width="880" alt="Same prompt, with and without memory: without PMB the agent asks which file and what the bug was; with PMB it recalls verdict-policy.ts:142 in 6 ms.">
</div>
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.
Why PMB
Local-first, zero-config. SQLite holds the durable memory; rebuildable search indexes stay local. No account, API keys, telemetry, or cloud to trust.
It actually gets used. On Claude Code / Codex, hooks inject the right memory before the model thinks - you never have to remember to call a tool.
Multilingual, no setup. The embedder covers 50+ languages; a Russian query finds an English fact. No per-language config.
MCP-native. One
pmb connectwires Claude Code, Cursor, Codex, Windsurf, Zed, VS Code, and more.Fast read path. Recall in ~35 ms warm; writes return in under a millisecond - no LLM call to remember.
Honest impact. The dashboard shows which lessons actually changed outcomes, instead of claiming "+X%".
Your data, in the open.
pmb exportdumps everything to Markdown/JSON. Apache 2.0.
See your memory
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.
<div align="center">
<img src="https://raw.githubusercontent.com/oleksiijko/pmb/main/docs/assets/dashboard-map.png" width="820" alt="PMB dashboard - Map (entity graph)">
Map - every entity and connection in your project, as a live graph.
<img src="https://raw.githubusercontent.com/oleksiijko/pmb/main/docs/assets/dashboard-timeline.png" width="820" alt="PMB dashboard - Timeline (journal)">
Timeline - your memory as a journal, newest first.
</div>
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).
Verified local backups
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.
What you can store
# 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, goalsPMB is content-agnostic. If it's text the agent will care about later, PMB remembers and retrieves it.
What the agent gets back
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.
How it works
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:#14532dStorage - every durable event lives in SQLite, the source of truth. Rebuildable vector indexes live in LanceDB beside it. The whole workspace stays on your disk and can be copied or exported anytime.
Recall - BM25 (lexical) + dense vector (semantic) + entity graph + optional cross-encoder rerank, fused via Reciprocal-Rank-Fusion.
Writes - async. The MCP tool returns in under a millisecond; the embed + LanceDB insert happen 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 are archived, never deleted; full history via
keyed_fact_as_of(t).Multilingual - no language packs. The default embedder (
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.
Install
The Quickstart above is all most people need. Other ways:
# From source
git clone https://github.com/oleksiijko/pmb.git && cd pmb
python -m venv .venv && source .venv/bin/activate
pip install -e .
pmb warmup # prime the ~450 MB embedder onceWire one or more agents (all stdio - the server runs as a child of your agent; no network, no port, no token):
pmb connect claude-code # also: codex · cursor · windsurf · gemini · vscode · zed · opencode · continuePoint several agents at one memory:
pmb connect claude-code --workspace personal
pmb connect cursor --workspace personal # both read/write the same workspaceSharing 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.
CLI cheat sheet
# Memory
pmb stats show counts and storage info
pmb recall "query" search with full debug
pmb dashboard web UI on port 8765 (graph, settings, errors)
# Ingest
pmb index pdf paper.pdf extract + chunk + embed
pmb index pdf ~/docs --recurse entire directory
pmb index project . scan codebase
pmb track changes summarise commit intent (why)
pmb track modules one-line purpose per module
pmb import chatgpt ~/Downloads/export.json bring existing history
# Continuity & efficiency (opt-in)
pmb resume save write .pmb/resume.md (commit it)
pmb resume install refresh resume.md at every turn end
pmb health lessons-impact which lessons actually help outcomes
pmb memory ledger Memory Delta handles this session
# Maintenance
pmb regraph rebuild entity graph
pmb consolidate run sleep pass (optional)
pmb compact archive old events
pmb dedupe resolve borderline duplicates
# Hooks (force-feed PMB at the protocol level - no model cooperation)
pmb hooks install claude-code wire all lifecycle hooks
pmb hooks list show what's installed
pmb hooks capabilities ambient mechanism each agent supports
pmb hooks uninstall claude-code remove them
pmb auto-context "fix bug in PMB" preview per-turn injection
pmb session-restore -m 180 preview post-compaction restore
pmb lesson-followcheck --dry-run preview follow-through scoring
# Ambient memory (the write side - memory journals the agent's work)
pmb autowrite --dry-run preview ambient auto-write for this turn
pmb ambient-watch . ambient auto-write for MCP-only hosts (git observer)
pmb forget-auto drop memory the ambient layer wrote itself
# Config
pmb config list default tier (25 keys you care about)
pmb config list --pro every key, including 80 advanced knobs
pmb config set recall.ppr_enabled true toggle a feature
pmb connect --rules-only refresh CLAUDE.md onlyStep-by-step per agent: docs/guide/usage.md. Full reference: docs/reference/COMMANDS.md.
Hooks - memory that doesn't wait to be asked
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:
UserPromptSubmit -> auto-recall. Every message is classified (regex, multilingual, sub-ms) and the matching memory - lessons, past decisions, recall hits, project overview - is injected before the model thinks. Trivial messages inject nothing.
PostToolUse -> ambient observe. Every tool the agent runs is appended to a lightweight action journal (a single SQLite INSERT, no model). Reads and
lsare filtered out; edits, tests and commits are kept.SessionStart -> session-restore. After a context compaction the agent rebuilds "where you left off" from what the session recorded, instead of re-asking you.
Stop -> follow-through + ambient auto-write. (a) It checks which surfaced lessons actually showed up in what the agent did and marks them followed, deterministically. (b) If the agent did NOT call a
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.
Ambient memory - the write side
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:
Coordinated. If the agent already called a
record_*tool this turn, ambient stays silent; it only fills the gap.Outcome-scored, not churn. A turn is journaled only if results clear a quality bar (tests passed, a failure fixed, a deploy ran), not by file count alone.
Honest + reversible. Every ambient entry is tagged
source=autowrite, shown as auto in the dashboard, and removable withpmb forget-auto. On by default; disable withpmb config set autowrite.enabled false.Works on every host. Claude Code (hooks), Codex (
pmb codex-notify), MCP-only hosts like Cursor/Zed/VS Code (git observer,pmb ambient-watch .). Check yours withpmb 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).
Self-improvement loop
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.
Settings - 25 you care about, 80 you 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 |
Numbers
| 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 % |
# Reproduce locally
python scripts/benchmarks/benchmark_locomo.py --n-conversations 10
python scripts/benchmarks/mega_stress_test.py<a name="privacy"></a>Privacy
100 % offline by default. No network calls from the engine, zero telemetry - there is no PMB server to call home to.
Workspace = a directory under
~/.pmb/<name>/. Copy it to Dropbox, push it to git, share it on a USB drive. Your call.Secrets are auto-redacted at write time (OpenAI / Anthropic / AWS / Stripe / GitHub keys; configurable).
Apache 2.0 licensed. Forks welcome.
FAQ
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.
Contributing
Issues and PRs welcome. There's one full-time maintainer; please open a discussion before a large change so we can align on direction.
git clone https://github.com/oleksiijko/pmb.git && cd pmb
python -m venv .venv && source .venv/bin/activate
pip install -c requirements-dev.lock -e ".[dev,crypto]"
python scripts/prewarm_models.py
pytest # full suite, ~4 minutes
pytest -k recall # fast subset, ~12 sDev commands
bash scripts/test.sh # whole suite (CI-equivalent)
bash scripts/test.sh tests/recall # a subset (any pytest args pass through)
bash scripts/codeql_local.sh # run CI's CodeQL security-extended locally
bash scripts/install-dev-hooks.sh # pre-commit hook: ruff + CodeQL before each commitscripts/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.
docs/HARDENING_NOTES.md
Hardening notes
Working document for technical-debt passes that are too risky to fold into ordinary feature work. Each section is a pre-inventory for a future targeted pass: list the candidates first, decide the policy before changing code.
Phase 1 - import hygiene (DONE)
pmb/__init__.pyandpmb/core/__init__.pyswitched to PEP 562 lazy attribute access.import pmbno longer drags in LanceDB, sentence-transformers, numpy, rank_bm25, fastmcp, yaml, torch or transformers. Measured: 2.4 ms (was ~14 s when Engine was eager).tests/conftest.pyadded with shared fixtures + sys.path fallback.tests/test_lightweight_imports.pyadded - 9 subprocess-based smoke tests that lock in the lazy-import property.All 88 core tests still pass.
Phase 2 (proposed) - exception-handler audit
Today src/pmb/ contains 144 bare except Exception: blocks across
32 files. Most of these are deliberate. Some are not. Mass conversion
would either spam logs or hide the deliberate ones; the right approach
is a categorised audit before any change.
Tier 1 - keep silent (do NOT touch)
These swallow errors on purpose. Adding logging here would either flood stderr on every TUI/test run or expose real users to scary warnings about expected conditions.
| File:line | Why it's deliberate |
|---|---|
cli/main.py:37-38 | stdout encoding reconfigure - Textual / pytest replace sys.stdout with objects that lack .encoding |
mcp/server.py:30-31 | Same stdout encoding reconfigure on MCP server boot |
mcp/perf.py:78-79 | Inline comment: # never break MCP. Telemetry must not interfere with tool calls |
mcp/server.py:1166-1169 | Inline comment: # filter best-effort; if FastMCP API changes, all tools stay |
reasoning/images.py:95-103, 136, 168 | Optional PIL / CLIP fall-throughs - they trigger when the user hasn't installed [multimodal] |
core/engine.py:3670-3671 | Engine.close() cleanup - tempfile and connection teardown |
signals/git.py:* | git invocations that legitimately fail on non-git workspaces |
signals/session.py:74-75 | session-tracker write failures (best-effort feature) |
health/consolidate.py:* | LLM-backend failures with explicit fallback to MockLLM |
Policy: leave these untouched. If a future contributor wants
visibility, they can wrap each one with a single-line debug log at
logger.debug level - this stays silent at production verbosity and
only surfaces when explicitly enabled.
Tier 2 - candidate for logger.debug (medium-risk)
These have an existing inline comment indicating intent. Adding a debug log preserves behaviour but gives you a trail when investigating recall regressions.
| File:line | Suggested wording |
|---|---|
core/engine.py:681-682 | # fall through to queue on failure -> log.debug("inline dedup failed, queueing for retry: %s", exc) |
core/engine.py:797-798 | # If we can't read vectors, sweep just returns empty -> debug |
core/engine.py:2140-2141 | # cache failure → normal recall -> debug |
core/engine.py:1402-1403 | recall stage 4 fallback - context-dependent, read it first |
Policy: OK to convert one at a time, each behind its own commit with a test that proves the fallback path still runs.
Tier 3 - inspect each individually (high cardinality)
core/engine.py alone has 71 of these. They're inside the recall and
write pipelines and most of them protect cross-cutting features (graph
extraction, fact tree, person extraction) where a failure in one layer
must not break the others. Do not bulk-edit. Pick five at a time,
trace the call site, and decide.
The grep that produced this inventory:
rg "except\s+Exception\s*:\s*$" src/pmb/ --type py -c | sort -t: -k2 -n -rTop three files by count:
core/engine.py- 71core/search.py- 8mcp/server.py- 8
Where the value is
Converting a handful of the import-time and cache-failure
blocks (Tier 2) into logger.debug calls would already give us most of
the observability win at near-zero risk. The remaining 130+ blocks can
wait until we have an actual incident pointing at one of them.
Phase 3 (proposed) - remove sys.path.insert boilerplate from tests
39 test files currently start with:
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent / "src"))With pip install -e . and the new tests/conftest.py, this is
redundant. Removing it from all 39 files is a mechanical change but
spans a lot of diff. Recommended: do it when the project has external
contributors so the diff is small per PR.
Risk: none if make test keeps passing. The conftest already adds
src/ to sys.path as a fallback for direct invocations.
Phase 4 (proposed) - type annotation tightening
Several public methods on Engine have implicit Any parameters
(metadata, config_overrides, etc.). Adding TypedDict definitions
would help IDE users without touching runtime behaviour. Not urgent.
Phase 5 (DONE in this pass) - lazy LanceDB
The single biggest user-facing cost was import lancedb itself:
22 seconds to import the module on Windows (pyarrow + transitive
deps). Engine.__init__ triggered that import via HybridSearch.__init__
even for read-only CLI commands.
Fix landed in src/pmb/core/search.py:
HybridSearchno longer connects to LanceDB in__init__. The connection and table objects are lazy properties (_tabletriggers_lancedb().connect(...)on first access).HybridSearch.reload_bm25()is no longer called fromEngine.__init__. It's called lazily on the first.search()or.add()call, guarded byself._bm25_reloaded.New
HybridSearch.is_vector_index_loaded()mirrors the existingis_ready()for callers that care about state.
Measured cost of pmb stats (read-only CLI):
| Before | After |
|---|---|
| ~14 s | ~1 s |
CLI commands that don't touch vectors (stats, list, pin, forget,
config, --help, doctor) now skip the LanceDB import entirely.
Findings from scripts/benchmarks/scenario_test.py
A scenario-style integration test (scripts/benchmarks/scenario_test.py)
exercises PMB the way a real coding-assistant agent would. 17 of 18
queries pass across 9 scenarios. The two genuine limitations the test
surfaced:
1. Concept-to-instance ranking without reranker
When the user asks about a category ("What database does Alex prefer?") and the answer is an instance ("PostgreSQL"), and other competing facts share the surface form ("Alex prefers tea over coffee", "Alex prefers vim over emacs", "Alex prefers dark mode over light mode"), PMB without reranking may put one of the surface-form-similar facts at top-1.
Workaround today: callers should use
top_k=3and let the agent pick the relevant one from a small candidate set. Most agents handle this naturally - the LLM reads three facts and picks the one about databases.Why we don't enable rerank: cross-encoder reranking improves this case but regresses LoCoMo evidence-recall by 17 points (see ablation).
Possible future fix: a gated reranker - run it only when the top-3 scores are within a small epsilon of each other. Doesn't help when reranker actively picks the wrong one (which is what happens on LoCoMo).
Track as a v0.2 improvement under "conceptual matching".
2. Agent-side lazy gating (intentional non-feature)
PMB always returns top-K for any query. It does not detect that
"What is a JWT token?" is general knowledge and skip retrieval. That
decision lives in the agent's system prompt (pmb connect injects the
canonical rule block).
This is documented in the README ("the lazy-by-default gate lives in the agent, not in PMB") - it's not a bug, it's a separation of concerns. Custom-agent integrators need to replicate that rule block, or accept that PMB will surface stored facts on unrelated questions.
Phase 6 (proposed) - record_batch fan-out
After the lazy-LanceDB fix landed, record_batch(100 items) with a hot
embedding model still takes ~11 s. Where it goes:
| Step | Cost |
|---|---|
Pure SQLite (append_many 100 events) | 66 ms |
| Batched embed of 100 texts (already batched via Improvement X) | 425 ms |
| 100× graph indexing (entity extract + edge upserts) | ~5 s |
| 100× temporal / event_time / causation edges | ~2 s |
| 100× L1 dedup hash lookup (cheap individually) | ~1 s |
| 100× per-call SQLite connection open/close | ~1.2 s |
The fix would be a record_batch_bulk(skip_dedup=True, defer_graph=True)
mode for bulk imports (pmb import-jsonl, LoCoMo ingestion, migration
from another tool). Normal agent traffic (1-20 items per turn) is
unaffected and already fast.
Note: the cost is hidden in MCP usage because record_batch is
fire-and-forget there (returns in ~2 ms, work happens off-thread).
Sync callers (CLI, tests, bench scripts) see the full cost.
Useful one-liners
Re-run the import-weight check by hand:
python -c "import time; t=time.perf_counter(); import pmb; \
print(f'{(time.perf_counter()-t)*1000:.1f}ms')"Re-run the recall ablation:
python scripts/benchmarks/ablation_full.py --n-conversations 3Check what changed in the SCHEMA defaults since last release:
git log -p src/pmb/config.py512 files · 496 not served here
- .claude/launch.json (not served here)
- .dockerignore (not served here)
- .editorconfig (not served here)
- .github/ISSUE_TEMPLATE/bug_report.md (not served here)
- .github/ISSUE_TEMPLATE/feature_request.md (not served here)
- .github/dependabot.yml (not served here)
- .github/pull_request_template.md (not served here)
- .github/release-drafter.yml (not served here)
- .github/workflows/ci.yml (not served here)
- .github/workflows/codeql.yml (not served here)
- .github/workflows/publish-npm.yml (not served here)
- .github/workflows/publish.yml (not served here)
- .github/workflows/release-drafter.yml (not served here)
- .gitignore (not served here)
- ATTRIBUTION.md
- AUTOGINEER-RUNS.md
- CHANGELOG.md
- CITATION.cff (not served here)
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE
- MANIFEST.in (not served here)
- Makefile (not served here)
- NOTICE
- README.md
- SECURITY.md
- compose.yaml (not served here)
- docker/Dockerfile (not served here)
- docker/README.md (not served here)
- docker/compose.gpu.yaml (not served here)
- docker/data/.gitkeep (not served here)
- docs/404.md
- docs/HARDENING_NOTES.md
- docs/PROJECT_REVIEW.md
- docs/README.md
- docs/ROADMAP.md
- docs/assets/PMB_LOGO_BLACK.svg (not served here)
- docs/assets/PMB_LOGO_BLAC_WHITE.svg (not served here)
- docs/assets/PMB_LOGO_WHITE.svg (not served here)
- docs/assets/before-after.svg (not served here)
- docs/assets/dashboard-map.png (not served here)
- docs/assets/dashboard-timeline.png (not served here)
- docs/assets/logo.png (not served here)
- docs/assets/pmb-setup-poster.png (not served here)
- docs/assets/pmb-setup.mp4 (not served here)
- docs/assistant-integration-notes.md
- docs/concepts/architecture.md (not served here)
- docs/concepts/core-engine.md (not served here)
- docs/concepts/design-and-tech.md (not served here)
- docs/concepts/how-it-works.md (not served here)
- docs/concepts/index.md (not served here)
- docs/concepts/measuring-impact.md (not served here)
- docs/concepts/memory-model.md (not served here)
- docs/concepts/privacy-and-security.md (not served here)
- docs/contributing/adding-a-language.md (not served here)
- docs/contributing/index.md (not served here)
- docs/guide/SETUP_OLLAMA.md (not served here)
- docs/guide/TEAM.md (not served here)
- docs/guide/backups.md (not served here)
- docs/guide/dashboard.md (not served here)
- docs/guide/deleting-memories.md (not served here)
- docs/guide/getting-started.md (not served here)
- docs/guide/index.md (not served here)
- docs/guide/troubleshooting.md (not served here)
- docs/guide/usage.md (not served here)
- docs/javascripts/mermaid-init.js (not served here)
- docs/javascripts/pmb-anim.js (not served here)
- docs/reference/COMMANDS.md (not served here)
- docs/reference/configuration.md (not served here)
- docs/reference/index.md (not served here)
- docs/reference/mcp-tools.md (not served here)
- docs/stylesheets/extra.css (not served here)
- mintlify/concepts/architecture.mdx (not served here)
- mintlify/concepts/core-engine.mdx (not served here)
- mintlify/concepts/how-it-works.mdx (not served here)
- mintlify/concepts/measuring-impact.mdx (not served here)
- mintlify/concepts/memory-model.mdx (not served here)
- mintlify/concepts/privacy-and-security.mdx (not served here)
- mintlify/contributing/adding-a-language.mdx (not served here)
- mintlify/contributing/contributing.mdx (not served here)
- mintlify/contributing/roadmap.mdx (not served here)
- mintlify/docs.json (not served here)
- mintlify/favicon.svg (not served here)
- mintlify/guides/connect.mdx (not served here)
- mintlify/guides/dashboard.mdx (not served here)
- mintlify/guides/deleting-memories.mdx (not served here)
- mintlify/guides/ingest.mdx (not served here)
- mintlify/guides/ollama.mdx (not served here)
- mintlify/guides/team.mdx (not served here)
- mintlify/guides/troubleshooting.mdx (not served here)
- mintlify/images/before-after.svg (not served here)
- mintlify/images/dashboard-map.png (not served here)
- mintlify/images/dashboard-timeline.png (not served here)
- mintlify/images/setup-poster.png (not served here)
- mintlify/introduction.mdx (not served here)
- mintlify/logo/black.svg (not served here)
- mintlify/logo/white.svg (not served here)
- mintlify/quickstart.mdx (not served here)
- mintlify/reference/cli/config.mdx (not served here)
- mintlify/reference/cli/hooks.mdx (not served here)
- mintlify/reference/cli/manage.mdx (not served here)
- mintlify/reference/cli/read.mdx (not served here)
- mintlify/reference/cli/setup-connect.mdx (not served here)
- mintlify/reference/cli/write.mdx (not served here)
- mintlify/reference/configuration.mdx (not served here)
- mintlify/reference/mcp-tools.mdx (not served here)
- npm/README.md (not served here)
- npm/bin/bootstrap.js (not served here)
- npm/bin/install.js (not served here)
- npm/bin/pmb-ai.js (not served here)
- npm/package.json (not served here)
- pyproject.toml (not served here)
- requirements-dev.lock (not served here)
- scripts/README.md (not served here)
- scripts/_bench_data.py (not served here)
- scripts/benchmarks/_ab_pattern_split.py (not served here)
- scripts/benchmarks/ab_all.py (not served here)
- scripts/benchmarks/ab_compression.py (not served here)
- scripts/benchmarks/ab_compression_live.py (not served here)
- scripts/benchmarks/ab_outcome_weight.py (not served here)
- scripts/benchmarks/ab_outcome_weight_ctx.py (not served here)
- scripts/benchmarks/ab_pamvr_locomo.py (not served here)
- scripts/benchmarks/ab_surprise_gate.py (not served here)
- scripts/benchmarks/ablation_full.py (not served here)
- scripts/benchmarks/ablation_tiers.py (not served here)
- scripts/benchmarks/bench_full_flow.py (not served here)
- scripts/benchmarks/bench_qa_scenarios.py (not served here)
- scripts/benchmarks/bench_user_flow.py (not served here)
- scripts/benchmarks/benchmark.py (not served here)
- scripts/benchmarks/benchmark_cross_event.py (not served here)
- scripts/benchmarks/benchmark_locomo.py (not served here)
- scripts/benchmarks/big_cross_chat_test.py (not served here)
- scripts/benchmarks/confirm_new_defaults.py (not served here)
- scripts/benchmarks/e2e_demo.py (not served here)
- scripts/benchmarks/e2e_ru_uk_demo.py (not served here)
- scripts/benchmarks/full_validation.py (not served here)
- scripts/benchmarks/mega_stress_test.py (not served here)
- scripts/benchmarks/perf_bench.py (not served here)
- scripts/benchmarks/quality_demo.py (not served here)
- scripts/benchmarks/replay_repeat_guard.py (not served here)
- scripts/benchmarks/research_top1.py (not served here)
- scripts/benchmarks/scenario_test.py (not served here)
- scripts/benchmarks/stress_3000.py (not served here)
- scripts/benchmarks/vs_mem0.py (not served here)
- scripts/calibrate_anchors.py (not served here)
- scripts/codeql_local.sh (not served here)
- scripts/debug/analyze_failures.py (not served here)
- scripts/debug/analyze_failures_all.py (not served here)
- scripts/debug/debug_judge.py (not served here)
- scripts/debug/debug_judge2.py (not served here)
- scripts/debug/debug_multihop.py (not served here)
- scripts/debug/profile_recall.py (not served here)
- scripts/demos/demo_graph.py (not served here)
- scripts/demos/demo_seed.py (not served here)
- scripts/demos/e2e_test.py (not served here)
- scripts/hooks/pre-commit (not served here)
- scripts/install-dev-hooks.sh (not served here)
- scripts/precommit.sh (not served here)
- scripts/prewarm_models.py (not served here)
- scripts/test.sh (not served here)
- server.json
- src/pmb/__init__.py (not served here)
- src/pmb/agent_wrapper/PLAN.md (not served here)
- src/pmb/agent_wrapper/__init__.py (not served here)
- src/pmb/agent_wrapper/__main__.py (not served here)
- src/pmb/agent_wrapper/budget.py (not served here)
- src/pmb/agent_wrapper/loop.py (not served here)
- src/pmb/agent_wrapper/policy.py (not served here)
- src/pmb/cli/__init__.py (not served here)
- src/pmb/cli/__main__.py (not served here)
- src/pmb/cli/_common.py (not served here)
- src/pmb/cli/commands/__init__.py (not served here)
- src/pmb/cli/commands/ambient.py (not served here)
- src/pmb/cli/commands/capture.py (not served here)
- src/pmb/cli/commands/config.py (not served here)
- src/pmb/cli/commands/daemon.py (not served here)
- src/pmb/cli/commands/graph.py (not served here)
- src/pmb/cli/commands/health.py (not served here)
- src/pmb/cli/commands/hooks.py (not served here)
- src/pmb/cli/commands/index.py (not served here)
- src/pmb/cli/commands/lang.py (not served here)
- src/pmb/cli/commands/maintenance.py (not served here)
- src/pmb/cli/commands/manage.py (not served here)
- src/pmb/cli/commands/memo.py (not served here)
- src/pmb/cli/commands/resume.py (not served here)
- src/pmb/cli/commands/snapshot.py (not served here)
- src/pmb/cli/commands/track.py (not served here)
- src/pmb/cli/commands/workspace.py (not served here)
- src/pmb/cli/connect.py (not served here)
- src/pmb/cli/doctor.py (not served here)
- src/pmb/cli/hooks.py (not served here)
- src/pmb/cli/intro.py (not served here)
- src/pmb/cli/main.py (not served here)
- src/pmb/cli/ollama_cmd.py (not served here)
- src/pmb/cli/palette.py (not served here)
- src/pmb/cli/status_panel.py (not served here)
- src/pmb/config.py (not served here)
- src/pmb/core/__init__.py (not served here)
- src/pmb/core/ambient_log.py (not served here)
- src/pmb/core/circuit_breaker.py (not served here)
- src/pmb/core/embed_queue.py (not served here)
- src/pmb/core/encryption.py (not served here)
- src/pmb/core/engine/__init__.py (not served here)
- src/pmb/core/engine/ambient.py (not served here)
- src/pmb/core/engine/base.py (not served here)
- src/pmb/core/engine/batch.py (not served here)
- src/pmb/core/engine/dedup.py (not served here)
- src/pmb/core/engine/embed.py (not served here)
- src/pmb/core/engine/goals.py (not served here)
- src/pmb/core/engine/graph.py (not served here)
- src/pmb/core/engine/health.py (not served here)
- src/pmb/core/engine/lessons.py (not served here)
- src/pmb/core/engine/overview.py (not served here)
- src/pmb/core/engine/reasoning.py (not served here)
- src/pmb/core/engine/recall.py (not served here)
- src/pmb/core/engine/types.py (not served here)
- src/pmb/core/engine/write.py (not served here)
- src/pmb/core/errlog.py (not served here)
- src/pmb/core/events.py (not served here)
- src/pmb/core/git_sync.py (not served here)
- src/pmb/core/llm_budget.py (not served here)
- src/pmb/core/recall_cache.py (not served here)
- src/pmb/core/search.py (not served here)
- src/pmb/core/snapshots.py (not served here)
- src/pmb/core/sqlite_helper.py (not served here)
- src/pmb/core/text_match.py (not served here)
- src/pmb/core/workspace.py (not served here)
- src/pmb/dashboard/__init__.py (not served here)
- src/pmb/dashboard/server.py (not served here)
- src/pmb/dashboard/static/index.html (not served here)
- src/pmb/dashboard/viz.py (not served here)
- src/pmb/eval/__init__.py (not served here)
- src/pmb/eval/locomo_judge.py (not served here)
- src/pmb/graph/__init__.py (not served here)
- src/pmb/graph/entities.py (not served here)
- src/pmb/graph/expansion.py (not served here)
- src/pmb/graph/extractors_llm.py (not served here)
- src/pmb/graph/extractors_spacy.py (not served here)
- src/pmb/graph/persons.py (not served here)
- src/pmb/graph/ppr.py (not served here)
- src/pmb/graph/spreading.py (not served here)
- src/pmb/graph/store.py (not served here)
- src/pmb/health/__init__.py (not served here)
- src/pmb/health/adaptive.py (not served here)
- src/pmb/health/auto_consolidate.py (not served here)
- src/pmb/health/conflicts.py (not served here)
- src/pmb/health/consolidate.py (not served here)
- src/pmb/health/distill_lessons.py (not served here)
- src/pmb/health/earned_memory.py (not served here)
- src/pmb/health/feedback.py (not served here)
- src/pmb/health/multilingual_check.py (not served here)
- src/pmb/health/rehearse.py (not served here)
- src/pmb/health/self_test.py (not served here)
- src/pmb/health/slo.py (not served here)
- src/pmb/hookclient/__init__.py (not served here)
- src/pmb/hookclient/__main__.py (not served here)
- src/pmb/hooks/__init__.py (not served here)
- src/pmb/hooks/auto_recall.py (not served here)
- src/pmb/hooks/autowrite.py (not served here)
- src/pmb/hooks/codex_rollout.py (not served here)
- src/pmb/hooks/correction_capture.py (not served here)
- src/pmb/hooks/exploration_capture.py (not served here)
- src/pmb/hooks/followcheck.py (not served here)
- src/pmb/hooks/project_observer.py (not served here)
- src/pmb/hooks/semantic_intent.py (not served here)
- src/pmb/hooks/session_restore.py (not served here)
- src/pmb/ingest/__init__.py (not served here)
- src/pmb/ingest/importers.py (not served here)
- src/pmb/ingest/pdf.py (not served here)
- src/pmb/ingest/project.py (not served here)
- src/pmb/ingest/track.py (not served here)
- src/pmb/ingest/watch.py (not served here)
- src/pmb/lang/__init__.py (not served here)
- src/pmb/lang/anchor_calibration.json (not served here)
- src/pmb/lang/anchors.py (not served here)
- src/pmb/lang/packs/de.yaml (not served here)
- src/pmb/lang/packs/es.yaml (not served here)
- src/pmb/lang/packs/fr.yaml (not served here)
- src/pmb/maintenance/__init__.py (not served here)
- src/pmb/maintenance/compact.py (not served here)
- src/pmb/maintenance/corpus_stopwords.py (not served here)
- src/pmb/maintenance/declutter.py (not served here)
- src/pmb/maintenance/distill.py (not served here)
- src/pmb/maintenance/scheduler.py (not served here)
- src/pmb/maintenance/tick.py (not served here)
- src/pmb/mcp/__init__.py (not served here)
- src/pmb/mcp/_toolspec.py (not served here)
- src/pmb/mcp/daemon.py (not served here)
- src/pmb/mcp/perf.py (not served here)
- src/pmb/mcp/registry.py (not served here)
- src/pmb/mcp/server.py (not served here)
- src/pmb/mcp/tools.py (not served here)
- src/pmb/memo/__init__.py (not served here)
- src/pmb/memo/delta_render.py (not served here)
- src/pmb/memo/exploration.py (not served here)
- src/pmb/memo/ledger.py (not served here)
- src/pmb/memory_quality.py (not served here)
- src/pmb/provenance.py (not served here)
- src/pmb/py.typed (not served here)
- src/pmb/reasoning/__init__.py (not served here)
- src/pmb/reasoning/arcs.py (not served here)
- src/pmb/reasoning/attributes.py (not served here)
- src/pmb/reasoning/causation.py (not served here)
- src/pmb/reasoning/code_ast.py (not served here)
- src/pmb/reasoning/decompose.py (not served here)
- src/pmb/reasoning/dedup.py (not served here)
- src/pmb/reasoning/extract_anchor.py (not served here)
- src/pmb/reasoning/fact_extract.py (not served here)
- src/pmb/reasoning/facts.py (not served here)
- src/pmb/reasoning/images.py (not served here)
- src/pmb/reasoning/llm_rerank.py (not served here)
- src/pmb/reasoning/pamvr.py (not served here)
- src/pmb/reasoning/predictive.py (not served here)
- src/pmb/reasoning/query_split.py (not served here)
- src/pmb/reasoning/query_worthiness.py (not served here)
- src/pmb/reasoning/reflect.py (not served here)
- src/pmb/reasoning/router.py (not served here)
- src/pmb/reasoning/scoring.py (not served here)
- src/pmb/reasoning/spans.py (not served here)
- src/pmb/reasoning/temporal.py (not served here)
- src/pmb/reasoning/typo_fix.py (not served here)
- src/pmb/reasoning/user_names.py (not served here)
- src/pmb/reasoning/vocab_miner.py (not served here)
- src/pmb/reasoning/weight_learning.py (not served here)
- src/pmb/reference_data.py (not served here)
- src/pmb/resume/__init__.py (not served here)
- src/pmb/resume/builder.py (not served here)
- src/pmb/security/__init__.py (not served here)
- src/pmb/security/redact.py (not served here)
- src/pmb/signals/__init__.py (not served here)
- src/pmb/signals/decay.py (not served here)
- src/pmb/signals/files.py (not served here)
- src/pmb/signals/git.py (not served here)
- src/pmb/signals/session.py (not served here)
- tests/_http.py (not served here)
- tests/cli/test_ambient_watch_targets.py (not served here)
- tests/cli/test_cli_english_and_status.py (not served here)
- tests/cli/test_connect.py (not served here)
- tests/cli/test_connect_active.py (not served here)
- tests/cli/test_connect_codex.py (not served here)
- tests/cli/test_connect_daemon.py (not served here)
- tests/cli/test_connect_extended.py (not served here)
- tests/cli/test_connect_lean.py (not served here)
- tests/cli/test_connect_rules.py (not served here)
- tests/cli/test_daemon_start.py (not served here)
- tests/cli/test_dashboard_port.py (not served here)
- tests/cli/test_delete_cli_and_api.py (not served here)
- tests/cli/test_doctor.py (not served here)
- tests/cli/test_hooks_cmd.py (not served here)
- tests/cli/test_intro.py (not served here)
- tests/cli/test_mcp_proxy.py (not served here)
- tests/cli/test_model_switch.py (not served here)
- tests/cli/test_palette.py (not served here)
- tests/cli/test_recall_daemon.py (not served here)
- tests/cli/test_setup_embedder_choice.py (not served here)
- tests/cli/test_setup_llm_tier_choice.py (not served here)
- tests/conftest.py (not served here)
- tests/engine/test_activity_dedup.py (not served here)
- tests/engine/test_archive_cold.py (not served here)
- tests/engine/test_async_graph.py (not served here)
- tests/engine/test_cold_write_index.py (not served here)
- tests/engine/test_config.py (not served here)
- tests/engine/test_conflict_merge.py (not served here)
- tests/engine/test_decision_tier.py (not served here)
- tests/engine/test_delete.py (not served here)
- tests/engine/test_entity_stopwords.py (not served here)
- tests/engine/test_fact_tree.py (not served here)
- tests/engine/test_facts.py (not served here)
- tests/engine/test_goals_chains.py (not served here)
- tests/engine/test_graph.py (not served here)
- tests/engine/test_hardening.py (not served here)
- tests/engine/test_import.py (not served here)
- tests/engine/test_importance_budget.py (not served here)
- tests/engine/test_index_freshness.py (not served here)
- tests/engine/test_keyed_canonical.py (not served here)
- tests/engine/test_keyed_close_negation.py (not served here)
- tests/engine/test_keyed_suggestions_llm.py (not served here)
- tests/engine/test_lesson_decay_floor.py (not served here)
- tests/engine/test_local_features.py (not served here)
- tests/engine/test_meta_kind_index.py (not served here)
- tests/engine/test_negation_tombstones.py (not served here)
- tests/engine/test_persons.py (not served here)
- tests/engine/test_phase1.py (not served here)
- tests/engine/test_phase2.py (not served here)
- tests/engine/test_phase3.py (not served here)
- tests/engine/test_plans_as_goals.py (not served here)
- tests/engine/test_project_lesson_scope.py (not served here)
- tests/engine/test_project_structure.py (not served here)
- tests/engine/test_quality_gate.py (not served here)
- tests/engine/test_record_batch_cold.py (not served here)
- tests/engine/test_swallow_observability.py (not served here)
- tests/engine/test_tiers.py (not served here)
- tests/engine/test_working_memory.py (not served here)
- tests/engine/test_workspace_use.py (not served here)
- tests/engine/test_write_outbox.py (not served here)
- tests/eval/test_anchor_latency.py (not served here)
- tests/eval/test_api_contract.py (not served here)
- tests/eval/test_locomo_judge.py (not served here)
- tests/eval/test_memory_eval.py (not served here)
- tests/eval/test_memory_eval_multilingual.py (not served here)
- tests/eval/test_packs_off_ratchet.py (not served here)
- tests/eval/test_perf_stages.py (not served here)
- tests/eval/test_property_invariants.py (not served here)
- tests/eval/test_slo.py (not served here)
- tests/fixtures/_fact_extract_baseline.json (not served here)
- tests/fixtures/_lang_parity_snapshot.json (not served here)
- tests/fixtures/_regex_parity_baseline.json (not served here)
- tests/graph/test_file_regex_redos.py (not served here)
- tests/health/test_earned_memory.py (not served here)
- tests/hooks/test_adherence_metric.py (not served here)
- tests/hooks/test_agent_wrapper.py (not served here)
- tests/hooks/test_auto_recall.py (not served here)
- tests/hooks/test_autowrite_importance.py (not served here)
- tests/hooks/test_correction_capture.py (not served here)
- tests/hooks/test_exploration_capture.py (not served here)
- tests/hooks/test_feedback.py (not served here)
- tests/hooks/test_followcheck.py (not served here)
- tests/hooks/test_hook_client.py (not served here)
- tests/hooks/test_intent_routing.py (not served here)
- tests/hooks/test_lesson_idf_gate.py (not served here)
- tests/hooks/test_lesson_scoring.py (not served here)
- tests/hooks/test_prepare_context_stdin.py (not served here)
- tests/hooks/test_pretool_command_guard.py (not served here)
- tests/hooks/test_pretool_guard.py (not served here)
- tests/hooks/test_pretool_repeat_guard.py (not served here)
- tests/hooks/test_session_restore.py (not served here)
- tests/hooks/test_session_restore_surface_ids.py (not served here)
- tests/hooks/test_specificity_gate.py (not served here)
- tests/hooks/test_surface_dedup.py (not served here)
- tests/hooks/test_write_division.py (not served here)
- tests/ingest/test_code_ast_constants.py (not served here)
- tests/ingest/test_git_sync.py (not served here)
- tests/ingest/test_git_sync_limits.py (not served here)
- tests/ingest/test_known_projects_filter.py (not served here)
- tests/ingest/test_multimodal.py (not served here)
- tests/ingest/test_pdf_headings.py (not served here)
- tests/ingest/test_project_index_hygiene.py (not served here)
- tests/ingest/test_project_observer.py (not served here)
- tests/ingest/test_reference_data.py (not served here)
- tests/ingest/test_track.py (not served here)
- tests/ingest/test_track_hook_splice.py (not served here)
- tests/ingest/test_viz.py (not served here)
- tests/integration/test_ambient_e2e.py (not served here)
- tests/integration/test_backup_restore.py (not served here)
- tests/integration/test_circuit_breaker.py (not served here)
- tests/integration/test_codex_ambient.py (not served here)
- tests/integration/test_connect_daemon_roundtrip.py (not served here)
- tests/integration/test_dashboard.py (not served here)
- tests/integration/test_fault_injection.py (not served here)
- tests/integration/test_hooks_e2e.py (not served here)
- tests/integration/test_http_bearer_auth.py (not served here)
- tests/integration/test_lessons_e2e.py (not served here)
- tests/integration/test_mcp_e2e.py (not served here)
- tests/lang/test_ald_distill.py (not served here)
- tests/lang/test_anchor_calibration.py (not served here)
- tests/lang/test_anchors.py (not served here)
- tests/lang/test_canonical_atoms.py (not served here)
- tests/lang/test_corpus_stopwords.py (not served here)
- tests/lang/test_distill.py (not served here)
- tests/lang/test_eval_intent_pamvr.py (not served here)
- tests/lang/test_extract_anchor.py (not served here)
- tests/lang/test_extract_anchor_wiring.py (not served here)
- tests/lang/test_keyed_parity.py (not served here)
- tests/lang/test_lang_pack_parity.py (not served here)
- tests/lang/test_language_packs.py (not served here)
- tests/lang/test_pamvr_explain.py (not served here)
- tests/lang/test_pamvr_first_person.py (not served here)
- tests/lang/test_pamvr_verb_gate.py (not served here)
- tests/lang/test_regex_parity.py (not served here)
- tests/lang/test_ru_uk_suite.py (not served here)
- tests/lang/test_semantic_intent.py (not served here)
- tests/lang/test_spans.py (not served here)
- tests/lang/test_statement_anchors.py (not served here)
- tests/lang/test_unicode_tokenization.py (not served here)
- tests/lang/test_work_request_intent.py (not served here)
- tests/maintenance/test_auto_consolidate.py (not served here)
- tests/maintenance/test_consolidate.py (not served here)
- tests/maintenance/test_decay_cli.py (not served here)
- tests/maintenance/test_declutter.py (not served here)
- tests/maintenance/test_maintenance_tick.py (not served here)
- tests/maintenance/test_migrate_workspaces.py (not served here)
- tests/maintenance/test_ollama_config.py (not served here)
- tests/maintenance/test_provenance_watch.py (not served here)
- tests/maintenance/test_snapshots.py (not served here)
- tests/mcp/test_daemon.py (not served here)
- tests/mcp/test_lazy_mcp_import.py (not served here)
- tests/mcp/test_mcp_compaction.py (not served here)
- tests/mcp/test_mcp_registry.py (not served here)
- tests/mcp/test_perf_shutdown_flush.py (not served here)
- tests/mcp/test_stdio_stdin_isolation.py (not served here)
- tests/mcp/test_toolspec_budget.py (not served here)
- tests/memo/test_exploration.py (not served here)
- tests/memo/test_ledger.py (not served here)
- tests/meta/test_docs_consistency.py (not served here)
- tests/meta/test_lightweight_imports.py (not served here)
- tests/meta/test_no_cyrillic_core.py (not served here)
- tests/recall/test_arcs.py (not served here)
- tests/recall/test_causation.py (not served here)
- tests/recall/test_conversational_gate.py (not served here)
- tests/recall/test_decompose.py (not served here)
- tests/recall/test_embedder_backends.py (not served here)
- tests/recall/test_evidence_channel.py (not served here)
- tests/recall/test_identity_boost_names.py (not served here)
- tests/recall/test_jscore_levers.py (not served here)
- tests/recall/test_keyed_boost_gating.py (not served here)
- tests/recall/test_memory_quality.py (not served here)
- tests/recall/test_model_cache_threadsafe.py (not served here)
- tests/recall/test_overview_cache.py (not served here)
- tests/recall/test_ppr.py (not served here)
- tests/recall/test_predictive.py (not served here)
- tests/recall/test_project_scope.py (not served here)
- tests/recall/test_query_expansion.py (not served here)
Advantages
- Operates entirely locally with no cloud accounts, API keys, or telemetry required. evidence: README.md
- Supports multiple AI coding agents through a unified MCP-native interface. evidence: README.md
Limitations
- Requires manual setup and configuration for each agent integration. evidence: README.md
- Some advanced features and maintenance tasks require manual CLI intervention. evidence: README.md
Security
Risk level: Low risk
This brain runs
Install scripts (1)
Makefile(make install):pip install -e .
- Low risk: network-instructions (Makefile:5)
- Low risk: scripts-present (scripts/_bench_data.py)
- Low risk: scripts-present (scripts/benchmarks/bench_qa_scenarios.py)
- Low risk: scripts-present (scripts/benchmarks/benchmark_locomo.py)
Attribution and licence
- First committed by
oleksiijko
- Declared authors
- PMB contributors (declared in pyproject.toml)
- PMB contributors (declared in CITATION.cff)
- Publisher
- Oleksii Bondar (Community)
- Source
- oleksiijko/pmb · commit d0e2f2e
- Licence
- Apache License 2.0 (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- oleksiijko, dmitrii-starikov, VIVAAN-DHAWAN, jbendotnet, motojojoe
AutoGineer is not affiliated with or endorsed by oleksiijko.
Install from source
496 of its files are not served here, so there is no ZIP. oleksiijko/pmb at d0e2f2e