BogMem — Local-first agent memory

Durable memory for your agents.
On your machine, in your graph.

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.

A memory palace in five commands
# 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.

Why BogMem exists

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.

What’s inside

One .NET process, one database file, three ways in.

Storage

Verbatim drawers in BogDB

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.

Retrieval

Hybrid, and honest about it

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.

Surfaces

CLI, MCP, or embedded

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.

Embeddings

Local vectors, recorded provenance

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.

Project mining

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.

Deletion safety

Sync previews. It never guesses.

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:

  • Preview by default. sync shows you what it would prune. Pruning requires an explicit --apply and an explicit project directory — roots are never inferred.
  • Ownership is recorded. Manual memories and drawers migrated from an older schema are protected outright. A matching source_file string is not enough to make a drawer eligible for deletion.
  • Git is the authority on ignore status. BogMem asks Git rather than reimplementing a partial matcher, and refuses to delete when ignore status can’t be verified.
  • Exact IDs, atomically. Apply deletes precisely the drawer IDs you were shown — not every record that happens to share source metadata.

Receipts

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 suiteGreen, exit 0 · all integrated lanes passing
Golden corpus253 frozen vectors across 18 module corpora, every one pinned to a single MemPalace commit
Disposition ledger182 recorded tests across 31 modules and 19 slices — each with a status and a comparison rule
Comparison rules132 EXACT · 23 ULP · 20 BOUNDED · 4 PRODUCT
CLI replay17-module replay plus an aggregate parity all gate with exit-code contract
Spellcheck agreement1.0000 token agreement · 386 / 386, on an embedded corpus so results are identical on Windows, macOS, and Linux
Focused check countschunkers 60 · locking 30 · dynamics 22 · storage 16
Retrieval modebogdb-hnsw-bm25-hybrid — no Chroma process and no Chroma package on the product path
LicenseApache 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.

How this was built

BogMem is the flagship parity conversion built with ASE.

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.

01 · The constellation

Seven agents, three model vendors.

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.

02 · The record

31 deliveries, 24 governed merges.

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.

03 · The gate

A floor the agents had to clear.

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.

Three ways to wire it in

Pick the smallest surface that fits your application. All three drive the same persistent BogDB palace.

1. As a .NET tool, from scripts and CI

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

2. As an MCP server, for coding agents

{
  "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.

3. Embedded, in your own process

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.

Where the edges are

What BogMem doesn’t do yet

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:

  • Conversation and office-document extraction aren’t implemented. The miner handles ordinary text and code extensions today.
  • Embedding parity is structural, not byte-exact. The frozen corpus records the legacy pinned ONNX export; BogMem uses a maintained MiniLM export from the same sentence-transformer family, pins its hash, and records model identity per drawer instead of claiming identical legacy vectors.
  • The Chroma compatibility replay is bounded, not distance-exact. It compares candidate-set agreement against the legacy index, which is a weaker claim than reproducing distances — and it’s labeled that way in the ledger.
  • Alternate vector backends are deferred. Live comparisons against qdrant, milvus, and pgvector remain placeholders in the compatibility layer.

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.

Where it fits

The memory layer of the ASE stack

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.

Where we can help

  • Memory design for your domain — wing and room taxonomies that match how your teams actually reason about the system.
  • Agent integration — wiring BogMem into your existing coding-agent workflow over MCP, or embedding it in a .NET service.
  • Parity conversions — the ASE legacy-parity pack applied to your own port, with the same corpus-and-ledger discipline you can read in this repository.
  • Support and extension work — direct engineer access, custom extractors, and retrieval tuning.
Apache 2.0 — derived from MemPalace

Give your agents a memory that lives on your machine.

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.

Cookie Compliance

We use cookies to ensure you get the best experience on our website. By continuing to use our site, you accept our use of cookies, privacy policy and terms of service.