A .NET 10 memory store that mines your repository into verbatim, searchable drawers — persisted in BogDB, retrieved with hybrid vector and full-text search, and reachable from a CLI, an MCP server, or an embedded API. Apache 2.0, and nothing leaves your machine.
For .NET teams building agents that need to remember — and for anyone who wants their memory layer running on their own hardware instead of someone else’s.
Open sourced July 2026 under Apache 2.0. Clone it and mine your first repo in a minute.
# Create a palace. Defaults to ~/.bogmem/palace.
bogmem init
# Record a decision by hand.
bogmem add --wing myproject --room decisions \
--content "We chose BogDB for durable local memory."
# Mine a repository into verbatim, routed drawers.
bogmem mine . --wing myproject
# Ask it something. Hybrid vector + BM25 retrieval.
bogmem search "why did we choose BogDB?"
# Preview stale drawers whose source was deleted or git-ignored.
bogmem sync . --wing myproject
Every command emits JSON on stdout and a nonzero exit code on failure — so scripts never have to parse log text.
Agents forget. The usual fixes are both unpleasant for a .NET shop: ship your source, your decisions, and your architecture notes to a hosted vector service, or bolt a Python sidecar onto a .NET application and maintain two runtimes forever. Neither is acceptable when the codebase is the sensitive part.
BogMem is derived from MemPalace — a Python memory-palace project with genuinely good ideas about how to organize what an agent remembers: wings, rooms, and drawers that hold text verbatim instead of a lossy summary. We wanted those ideas in a single .NET 10 process, with a real database underneath and no Chroma dependency on the product path. So we ported it.
What ships is local-first by construction: the palace is a BogDB database on your disk, the embeddings are produced by a MiniLM model running locally through ONNX, and the only network call in the whole product path is the one-time model download. BogMem lives at github.com/BeyondOrdinary/BogMem.
One .NET process, one database file, three ways in.
Sources are chunked by the parity-proven window chunker and stored verbatim — not summarized, not paraphrased. BogDB secondary indexes serve scoped wing, room, and source lookups. A changed file is replaced atomically; an unchanged re-run writes nothing at all.
BogDB 1.3.1 maintains a cosine HNSW index and a BM25 full-text index across commits, deletes, and reopen. BogMem blends them at MemPalace-compatible 0.6 / 0.4 weighting. Queries hydrate a bounded union of candidates rather than loading the palace into memory.
Use the bogmem .NET tool from scripts and CI, run the persistent MCP server so coding agents can query the palace directly over stdio JSON-RPC, or reference the library and drive IMemoryStore in-process. Same palace, same semantics.
BogMem runs all-MiniLM-L6-v2 locally through ONNX by default. The first command that needs an embedding pulls roughly 90 MB into a model cache; every run after that is offline. Point BOGMEM_MODEL_CACHE wherever you want the bytes to live.
Every drawer records the exact embedding producer that wrote it. Open a palace with a different configured model and BogMem re-embeds before querying — it will not silently compare vectors from two incompatible spaces. For a deliberately dependency-free lexical mode, set BOGMEM_EMBEDDING_MODEL=lexical; set it back to minilm to migrate the palace to semantic vectors.
In a Git worktree, bogmem mine asks Git itself for tracked and non-ignored files. Drop a mempalace.yaml in the project root to route sources into rooms:
wing: checkout_service
rooms:
- name: architecture
keywords: [docs, design, decision]
- name: backend
keywords: [api, database, service]
- name: general
keywords: []
Folder matches win over filename matches, which win over keyword frequency in the first 2,000 characters. Unmatched sources land in general. Run with --dry-run to inspect the routing before anything is written.
A memory store that prunes itself is a memory store that can lose your work. Four rules keep bogmem sync boring, and each one is a deliberate divergence from the behavior BogMem inherited:
sync shows you what it would prune. Pruning requires an explicit --apply and an explicit project directory — roots are never inferred.source_file string is not enough to make a drawer eligible for deletion.The port was measured, not asserted. A frozen golden corpus captured from a single pinned MemPalace commit is replayed against the .NET implementation, and every converted test carries a recorded comparison rule and disposition. The receipts:
| Surface | Status |
|---|---|
| Slice test suite | Green, exit 0 · all integrated lanes passing |
| Golden corpus | 253 frozen vectors across 18 module corpora, every one pinned to a single MemPalace commit |
| Disposition ledger | 182 recorded tests across 31 modules and 19 slices — each with a status and a comparison rule |
| Comparison rules | 132 EXACT · 23 ULP · 20 BOUNDED · 4 PRODUCT |
| CLI replay | 17-module replay plus an aggregate parity all gate with exit-code contract |
| Spellcheck agreement | 1.0000 token agreement · 386 / 386, on an embedded corpus so results are identical on Windows, macOS, and Linux |
| Focused check counts | chunkers 60 · locking 30 · dynamics 22 · storage 16 |
| Retrieval mode | bogdb-hnsw-bm25-hybrid — no Chroma process and no Chroma package on the product path |
| License | Apache 2.0 |
The corpus under golden/ is read-only by policy. A fixture that cites a different MemPalace commit is a stale or mixed pin, and it blocks sign-off.
A cross-language port is the hardest thing to hand to agents, because “it compiles” and “it behaves the same” are different claims. That’s exactly why we chose it as the proving ground for ASE’s legacy-parity vertical pack — and why the repository ships the evidence rather than the anecdote.
Ten constellation runs put seven distinct agent identities on the codebase, drawn from Anthropic, OpenAI, and xAI models across several harnesses — including one running fully local. Each identity held a named role: integration, parity, build, compliance, and a dedicated adversary whose job was to find what the others missed.
Every unit of agent work landed as an attributed ASE delivery commit naming the agent and the run that produced it, then through an ASE merge-queue integration with verified ancestry. The git history is the audit trail — you can read who built what, in which run, in the public repository.
Parity wasn’t a vibe check. The conversion was validated against a defined coverage floor, replayed through the frozen corpus, and adjudicated by a full test run after every integration — with the disposition of each converted test recorded in a ledger rather than left implicit.
This is what we mean when we say governed agentic engineering. Not a demo repo — a working .NET 10 product, ported from another language, with the constellation history, the parity ledger, and the golden corpus all published alongside the code.
Pick the smallest surface that fits your application. All three drive the same persistent BogDB palace.
dotnet pack src/Bogmem.Cli -c Release -o ./artifacts/packages
dotnet tool install --global BogMem.Tool \
--version 0.1.0-preview.1 \
--add-source ./artifacts/packages
bogmem --help{
"mcpServers": {
"bogmem": {
"command": "bogmem",
"args": ["mcp", "--palace", "/absolute/path/to/palace"]
}
}
}
Newline-delimited JSON-RPC over stdio. The live server advertises only the operations that are actually implemented — status, taxonomy and listing, project mining, search, duplicate checks, and drawer CRUD. Parity-only tool definitions stay in the compatibility harness where they belong.
using Bogmem.Slices.Mining;
using Bogmem.Slices.Storage;
using var store = new BogDbMemoryStore("/path/to/palace");
new ProjectMiner(store).Mine(new ProjectMineRequest(
"/path/to/project",
Wing: "my_project"));
var hits = store.Search("authentication decision", wing: "my_project");
Keep one long-lived store per process and dispose it on shutdown; coordinate across processes through the CLI or MCP so the palace write lock can prevent overlapping mine and sync operations. The repository ships runnable samples — a full lifecycle quickstart and a molecule-capability retrieval API that shows how to answer multi-constraint questions without treating a similarity score as proof.
This is a 0.1.0-preview, and the repository is explicit about its ceilings rather than quiet about them. If you’re evaluating it, these are the things to know before you start:
One more thing worth stating plainly: parity is evidence about the port, not an endorsement of every inherited behavior. Where a legacy contract was unsafe or misleading, the product layer corrects it — and each divergence gets a regression test and a line in docs/parity-boundary.md. The frozen oracle stays unchanged underneath.
ASE governs what agents are allowed to do. CLAiR arbitrates them in real time. Bo grounds them in the code. BogDB is the graph underneath all of it — and BogMem is the piece that turns a repository into something an agent can actually recall, in the same process, on the same disk.
You don’t need the rest of the stack to use it. BogMem is a standalone Apache 2.0 tool that works fine next to whatever agent framework you already run — it just happens to be built out of the same parts.
BogMem is Apache 2.0 with the patent grant. Use it commercially, fork it, build on it. Portions derived from MemPalace retain their original MIT notice — preserved attribution, gratefully acknowledged — and the embedded web2 word corpus is credited to The FreeBSD Project with its provenance and checksums recorded in the repository.