membukkit
Memory serverOfficial Memseek project
Created by Memseek
Published in memseekai/membukkit. Publisher page
22 GitHub stars
What it is
Long-term memory for LLM apps that shows its work: dated facts, as-of answers, supersession, and receipts on every answer. Library, CLI, local GUI, MCP.
AutoGineer overview, from the brain’s own files
MemBukkit is a memory layer for LLM applications designed to solve the problem of persistent, explainable knowledge. It transforms raw conversations and documents into dated atomic facts, maintaining a dual-lane index of atomic facts and verbatim source turns. When information changes, the system marks old facts as superseded rather than deleting them, allowing agents to perform temporal queries (e.g., 'what was true in May?'). Every answer generated by the system includes detailed receipts, providing transparency into the evidence used, source references, and cost metrics. The architecture is built for performance and explainability, utilizing bucketed retrieval to minimize token usage while maintaining high accuracy in knowledge-intensive tasks.
How it works
Memory model: Vector store
AutoGineer overview, from the brain’s own files
The system operates through a write path that distills input into dated atomic facts and verbatim turns, storing them in a flat embedding index. During the read path, a question is processed with an as-of date, triggering a budgeted search across topic buckets to retrieve relevant evidence. The system then generates an answer accompanied by receipts that detail the specific facts used, their status, and their source pointers.
| Folder | Role | Files |
|---|---|---|
| .github | agent-config | 3 |
| docs | docs | 32 |
| examples | examples | 7 |
| scripts | scripts | 5 |
| src | source-code | 194 |
| tests | tests | 41 |
| benchmarks | folder | 61 |
| notebooks | folder | 4 |
| ui | folder | 23 |
Requirements
Apps: Docker
Runtimes: Python >=3.10
API keys (by name): ANTHROPIC_API_KEY, COMPAT_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, TURBOPUFFER_API_KEY
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
- Not scanned by AutoGineerIts dependencies are installed by pip or uv when you run it and were not scanned by AutoGineer (6 declared). https://pypi.org/project/membukkit/
Created by Memseek. Published in memseekai/membukkit. Licence: Apache License 2.0.
Usage
AutoGineer overview, from the brain’s own files
- Python library integration for custom LLM applications
- CLI tool for managing local memory stores
- MCP server for connecting agents like Cursor or Claude Desktop to persistent memory
- HTTP service for multi-tenant agent memory access
- “How much is my rent?”
- The agent returns the rent amount as of the specified date, citing the specific lease agreement or update note used as evidence.
- “What did I decide about the migration?”
- The agent retrieves the relevant dated facts from the memory store and provides a summary with a receipt showing the source conversation turn.
Documentation by Memseek
<p align="center"> <img src="https://raw.githubusercontent.com/memseekai/membukkit/main/logo.png" alt="MemBukkit" width="160"/> </p>
<h1 align="center">MemBukkit</h1>
<p align="center"> <a href="https://pypi.org/project/membukkit/"><img src="https://img.shields.io/pypi/v/membukkit?style=flat-square&color=3775a9&logo=pypi&logoColor=white" alt="PyPI"/></a> <a href="https://github.com/memseekai/membukkit/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/memseekai/membukkit/ci.yml?branch=main&style=flat-square&label=CI" alt="CI"/></a> <a href="https://github.com/memseekai/membukkit/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square" alt="License"/></a> <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10%2B-3776ab?style=flat-square&logo=python&logoColor=white" alt="Python"/></a> <a href="https://github.com/memseekai/membukkit/blob/main/docs/index.md"><img src="https://img.shields.io/badge/docs-guide-0d9488?style=flat-square" alt="Docs"/></a> </p>
MemBukkit is long-term memory for LLM apps that shows its work. It turns conversations and documents into dated atomic facts. When something changes (new rent, new job), the old fact is superseded, not deleted, so you can ask "what was true in May?" and get May's answer. Every answer ships with receipts: the facts used, where they came from, what the query cost. It sets the state of the art on LongMemEval-S under the benchmark's official judge, 92.6%, while reading a small fraction of the tokens full-context reading pays. Python, CLI, local GUI, HTTP, and MCP, all over the same stores. Apache-2.0.
<p align="center"> <a href="https://github.com/memseekai/membukkit/blob/main/docs/index.md">Docs</a> · <a href="https://github.com/memseekai/membukkit/blob/main/docs/guide/install.md">Install</a> · <a href="https://github.com/memseekai/membukkit/blob/main/docs/guide/quickstart.md">Quickstart</a> · <a href="https://github.com/memseekai/membukkit/blob/main/docs/guide/agents.md">Agents</a> · <a href="https://github.com/memseekai/membukkit/blob/main/docs/guide/mcp.md">MCP</a> · <a href="https://github.com/memseekai/membukkit/blob/main/docs/guide/demos.md">Demos</a> · <a href="https://github.com/memseekai/membukkit/blob/main/docs/guide/benchmarks.md">Benchmarks</a> </p>
<p align="center"> <img src="https://raw.githubusercontent.com/memseekai/membukkit/main/docs/assets/demo-ask.gif" alt="Ask with receipts" width="720"/> </p>
Try it in one line
uvx --from "membukkit[all]" membukkit ui --demo personal-assistantThat opens the GUI on a preloaded demo store. No clone, no venv, and Node is never needed because the GUI ships prebuilt. With pip it's pip install "membukkit[all]". Docker works too:
docker run -p 127.0.0.1:8377:8377 -v membukkit-data:/data -e OPENAI_API_KEY ghcr.io/memseekai/membukkitIt runs fully local. Point it at Ollama and nothing leaves your machine:
membukkit ask "what did I decide about the migration?" --store notes --llm ollama:llama3.1Prefer a hosted model? Paste a key in the GUI, or export OPENAI_API_KEY=sk-.... Either way, the first ask downloads the retrieval weights once and caches them.
Every install path, including a dev clone: Install guide.
Python API
from membukkit import Memory
mem = Memory.from_pretrained(llm="openai:gpt-4o-mini")
mem.add("I signed a lease, rent is $2100.", subject="alex", date="2024-01-10")
mem.add("Landlord raised rent to $2300.", subject="alex", date="2024-03-01")
r = mem.ask("How much is my rent?", as_of="2024-06-01")
print(r.answer) # truth as of that date
print(r.est_reader_tokens) # ~tokens the reader saw
print(r.evidence[0].status, r.evidence[0].source_ref) # current|superseded + citationadd returns a write receipt (n_stored, superseded, status), so empty LLM extracts never look like success. The full CLI walkthrough of the same flow is in the Quickstart.
How it works
Long-term memory is an indexing problem before it is a reading problem. What the store commits to at write time decides what any reader can possibly see later. Everything in MemBukkit follows from that.
flowchart LR
subgraph W["write path"]
S["sessions & documents"] --> D["LLM distillation"]
D --> F["dated atomic facts<br/>+ source pointers"]
S --> V["verbatim turns"]
end
F --> X[("flat embedding index<br/>+ topic buckets")]
V --> X
subgraph R["read path"]
Q["question + as-of date"] --> B["budgeted bucket routing"]
B --> K["top-k dated evidence"]
K --> A["answer + receipts"]
end
X --> BWriting. An LLM distills each session or document into dated atomic facts like 2024-01-08: rent is 800€, and the verbatim source turns are stored right next to them. Every fact keeps a pointer to its source. Why both? Because an extractor decides at write time what will matter later, and it is sometimes wrong. The atomic lane gives the system dates and updates it can reason about. The verbatim lane keeps everything the extractor skipped. When a new fact contradicts an old one, the old one is marked superseded instead of deleted. That is what makes "what was true in May?" answerable.
Indexing. Both lanes go into one flat embedding index, optionally split into topic buckets with plain KMeans. No LLM-built graph, no ontology, no summary hierarchy. Structures like those bake their builder's assumptions into the index, and revising them means rebuilding everything. Here the index builds in seconds with zero LLM calls, and changing how you retrieve is a config change, not a migration.
Reading. A question opens the closest topic buckets until a scan budget is covered, then the reader answers from the top evidence: dated, source-linked lines, filtered to what was known at the as-of date. It reads a small slice of memory instead of everything, and it answers better because of it. See Benchmarks for how much better.
Receipts. Every answer reports what it used and what it cost: tokens, estimated dollars, scan fraction, opened buckets, and each evidence line's status with its source turn or clause. The receipts are not decoration. In our research, hiding exactly the buckets a receipt names destroys the answer, while hiding random ones changes nothing. The trace really is the evidence trail.
Optional: a BM25 lexical lane. Everything above is dense retrieval, which is the shipped method and the one every number here was measured with. If your corpus is full of exact strings that embeddings blur together, error codes, filenames, rare identifiers, you can turn on a BM25 lane that searches the whole bank by term overlap and adds its hits to the routed pool before ranking. It is off by default and changes nothing until you ask for it:
from membukkit import Memory
from membukkit.config import RetrievalConfig
mem = Memory.from_pretrained(retrieval=RetrievalConfig(lexical_lane=True))Needs pip install "membukkit[bm25]". How it fuses and what it costs: Library API.
Chosen by answer quality, not retrieval metrics
The research behind MemBukkit kept producing the same surprise: better retrieval did not mean better answers. Reading everything scored far below reading a routed slice. A stronger reranker did not beat plain cosine order. Extraction-heavy designs lost evidence that a flat two-lane index kept. So every retrieval policy that ships here was selected by one test: did the final answer get better?
That is also why nothing depends on our fine-tuned models. Swap in off-the-shelf weights, or an all open-weights stack, and the results hold. You are adopting an index design, not a checkpoint.
The numbers behind each of these claims are in Benchmarks below. The full mechanism is in Method, and a research paper is under review. For how MemBukkit compares to file notes, plain vector RAG, and temporal graphs as categories, see When to use.
Benchmarks
Every score here is graded by each benchmark's official judge, and every one is a frozen recipe that pins the reader, distiller, judge, encoder, and distillation cache. One command reruns it, and --check verifies your result against the expected band.
That first part is doing more work than it looks. Higher LongMemEval numbers exist, and they are graded by their own authors, in one case by the same model that wrote the answers. Under the official gpt-4o judge the field is MemBukkit 92.6, then Supermemory 85.2, then Zep 71.2. See who judges what.
| Benchmark (what it stresses) | Stack | Score | Reproduce |
|---|---|---|---|
| LongMemEval-S (knowledge updates, temporal reasoning across sessions) | gpt-5.4 reader, official gpt-4o judge | 92.6% | membukkit bench --repro longmemeval-gpt54 |
| LongMemEval-S | gpt-4o-mini reader | 82.0% (95% CI 78.6–85.4) | membukkit bench --repro longmemeval-gpt4o-mini |
| LongMemEval-S | all open weights: gemma-4-26b reader + distiller | 88.8% | membukkit bench --repro longmemeval-gemma |
| LoCoMo (Mem0's protocol and judge, zero retuning) | gpt-4o-mini | 87.5% | membukkit bench --repro locomo-mem0 |
| BEAM (100K / 1M / 10M-token haystacks, official judge) | gemma-4-26b | 0.535 / 0.498 / 0.447 | membukkit bench --repro beam-100k-gemma |
What the research found, on LongMemEval-S (500 questions, official gpt-4o judge, paired comparisons sharing reader, judge, and ingestion):
Full-context reading scores 56.4% against MemBukkit's 82.0% with the same reader and judge, a +25.6 point gap (paired 95% CI [20.8, 30.4]), while MemBukkit reads ~3.2k tokens per question instead of ~100k.
Excluding the buckets an answer's receipt names collapses accuracy from 80.0% to 1.3%. Excluding a matched random set leaves it at 82.3%.
Given identical ingestion, extraction-only Mem0 scores 21.4% on questions answered in the assistant's own replies, where the verbatim lane scores 92.9%. Lane ablation: verbatim-only 75.4%, atomic-only 58.0%, both 82.8%.
Dropping the cross-encoder entirely and ranking the same opened region by plain cosine (83.4%,
--rerank-select none) statistically ties the shipped hybrid config (82.0%, paired p=0.40). Swapping the fine-tuned encoder for an off-the-shelf one moves the score by just −0.4 (p=0.81). The reranker is tail insurance, not the headline.
Single-pass ask, no agentic re-query loops, official judges. LLM readers and judges are stochastic, so scores reproduce as bands, not bit-exact values. Judges, costs, and per-category breakdowns: Benchmarks guide.
Retrieval, measured directly
Answer quality is one thing, retrieval is another, so there is a second suite that grades retrieval alone with no LLM and no judge in the loop: HotpotQA multi-hop, 1,000 questions, scored against qmd by the same metric functions over the same candidate sets.
A multi-hop question needs two documents, and one of two is a miss, not half a success. On finding both, MemBukkit's document-retrieval path reaches 87.4% against qmd's best backend at 86.1% while answering in 47ms against 1,222ms. A heavier configuration, swapping in a 0.6B encoder and adding query decomposition driven by a local 1.7B model, reaches 90.8%. On the bridge questions that actually require two hops the gap is 88.4% against 82.3%. qmd stays a little ahead at putting one right document in first place, 93.2% against 92.1%, a difference inside sampling noise.
The same no-LLM treatment on conversational memory: session-level Recall@5 on the original LongMemEval-S split, the metric gbrain and MemPalace publish against. With gbrain's own embedding model (text-embedding-3-large) under MemBukkit's turn-level indexing and no reranker at all, 99.8% (499/500) against gbrain-hybrid's 97.6% and MemPalace's 96.6%, same dataset, same K, same n, no LLM in the loop, none of our fine-tuned weights involved. The as-shipped production cut with the same encoder scores 99.2%; with our 110M local encoder and zero API calls, 96.4%. Per-question rankings, a training-overlap disclosure for the shipped reranker, and the commands that regenerate every row are in benchmarks/longmemeval_session_recall/.
Read it with the setup, which is in the benchmark notes: those rows measure the document-retrieval configuration of the stack rather than the chunked path membukkit search runs today, the candidate sets are small enough that both systems saturate at k=10, and qmd's lexical backend scored zero on these long natural-language queries in a way that looks like a configuration artifact rather than a real result.
Known limits, so nothing surprises you later: distillation is an LLM call per session at write time (cached), so the cost moves rather than vanishing. Updates supersede rather than overwrite, so the old fact stays stored, which is what makes as-of queries possible; when you want a fact gone for real, delete it. And the distiller bounds the atomic lane: small local models extract weaker facts, and the verbatim lane limits the damage.
Bring your data
membukkit ui # create a store → Ingest (drag & drop)
membukkit ingest ~/Downloads/WhatsAppChat.txt --store me # or from the CLI| Drop this | How you get it |
|---|---|
WhatsApp .txt | Chat → Export → without media |
| ChatGPT / Claude ZIP | Settings → Export data (or conversations.json) |
| PDFs / CRM CSV / notes | HubSpot deals export, contracts, Notion MD zip, Obsidian folder, ./docs |
Ask the same question at two dates and compare the receipts. Full steps per source: Bring your own.
MCP
A thin stdio server gives Cursor / Claude Desktop three tools over the same stores: memory_add, memory_search, memory_ask.
membukkit mcp --store notesClient config and example prompts: MCP guide.
Surfaces
| Piece | Role |
|---|---|
Memory | add / search / ask / delete + write & ask receipts |
| CLI / GUI | ingest files, demos, explainability lab |
| Local v1 HTTP | /api/v1/{store}/… for agents on disk stores |
| MCP | Cursor / Claude tools over the same stores |
MemorySystem remains the full pipeline API. See Library API and Method.
Contributing & license
Contributions welcome, see CONTRIBUTING.md. Licensed under Apache-2.0.
docs/code-walkthrough.md
MEMBUKKIT Code Walkthrough
This document explains the main code paths in MEMBUKKIT: initialization,
ingestion, storage, retrieval, query routing, answer generation, service APIs,
CLI evaluation, and the supporting model/prompt layers. Public timestamp
inputs accept datetime objects or ISO8601 strings; legacy slash-date strings
remain supported for benchmarks and older callers.
The central object is
MemorySystem. Most application code either
constructs a MemorySystem, ingests conversation sessions into it, or asks it
questions.
One-Page Schematic
flowchart TD
INIT[MemorySystem.from_pretrained] --> MODELS[Load encoder, reranker, LLM backend]
MODELS --> DISTILLER[Create FactDistiller]
MODELS --> BACKEND[Create storage backend]
INGEST[mem.ingest sessions + dates] --> TRANSCRIPT[Build numbered transcript]
TRANSCRIPT --> EXTRACT[LLM distills atomic facts]
EXTRACT --> RECORDS[FactRecord text, timestamp, entities, time bucket]
RECORDS --> UPSERT[Backend upsert_facts]
UPSERT --> EMBED[Embed new facts only]
EMBED --> STORE[Store facts and vectors]
STORE --> PARTITION[Lazy topic partition or persisted centroids]
QUESTION[mem.answer question] --> ROUTER[Classify query type]
ROUTER --> RETRIEVE[_retrieve]
RETRIEVE --> CANDIDATES[Backend candidate generation]
CANDIDATES --> RERANK[Cross-encoder utility scores]
RERANK --> FUSION[Hybrid RRF with cosine, or xenc-only]
FUSION --> FACTLINES[Chronological dated fact lines]
FACTLINES --> READER[Reader prompt selected by query type]
READER --> LLMANSWER[LLM answer]
LLMANSWER --> NORMALIZE[Normalize N/I abstention]
NORMALIZE --> RESULT[AnswerResult answer, trace, facts]Public API
The package exports its main user-facing types in
src/membukkit/__init__.py:
| Name | Purpose |
|---|---|
MemorySystem | Main stateful memory pipeline. |
ModelConfig | Tells the system where encoder and reranker weights live. |
RetrievalConfig | Controls bucket count, scan budgets, top-k, fusion, and service retrieval mode. |
PromptConfig | Optional prompt overrides. |
StorageConfig | Chooses in-memory or Turbopuffer storage. |
AnswerResult | Return object from mem.answer(...). |
RetrievalTrace | Inspectable retrieval trace attached to an answer. |
Typical usage:
from membukkit import MemorySystem, ModelConfig, RetrievalConfig, PromptConfig
mem = MemorySystem.from_pretrained(
models=ModelConfig(model_dir="./models"),
retrieval=RetrievalConfig(),
llm="openai:gpt-4o-mini",
prompts=PromptConfig.default(),
)
mem.ingest(
sessions=[[{"role": "user", "content": "I switched to a vegan diet."}]],
dates=["2024-06-01"],
)
res = mem.answer("What diet am I on?", question_date="2024-07-01")
print(res.answer)
print(res.facts)
print(res.trace)Directory Map
| Path | Role |
|---|---|
pipeline.py | Main MemorySystem pipeline. |
config.py | Dataclass configuration. |
extraction/ | Session-to-atomic-fact distillation. |
prompts/ | Prompt templates for extraction, reading, and eval protocols. |
models/ | Encoder and cross-encoder reranker wrappers. |
retrieval/ | Bucket construction, routing, query classification, filters. |
storage/ | Backend abstraction, in-memory backend, Turbopuffer backend. |
reading/ | Reader factories that turn facts into answer prompts. |
llm/ | OpenAI, Anthropic, and local LLM adapters. |
service/ | FastAPI multi-tenant service. |
data/ | LongMemEval and LoCoMo dataset adapters. |
eval/ | Evaluation harness and judge prompts. |
cli.py | membukkit eval, training dispatchers, and membukkit serve. |
telemetry.py | Optional Logfire/OpenTelemetry facade. |
Initialization
Initialization usually starts at
MemorySystem.from_pretrained.
flowchart LR
CFG[ModelConfig RetrievalConfig PromptConfig StorageConfig] --> FP[from_pretrained]
FP --> ENC[Encoder]
FP --> RERANK[UtilityReranker]
FP --> LLM[parse_llm_spec]
FP --> DIST[FactDistiller]
FP --> SYS[MemorySystem]
SYS --> BACKEND[make_backend]from_pretrained does five things:
Resolves model paths through
models/registry.py.Creates an
Encoder, a lazy wrapper aroundSentenceTransformer.Loads a
UtilityReranker, aCrossEncoderthat scores(query, fact)pairs.Parses the LLM spec through
llm/backends.py, for exampleopenai:gpt-4o-mini.Creates a
FactDistillerand a storage backend.
The backend is created by
storage.make_backend:
StorageConfig.backend="memory"givesInMemoryBackend.StorageConfig.backend="turbopuffer"givesTurbopufferBackend.
Configuration
config.py defines four important dataclasses.
ModelConfig
model_dir: optional root for model weights.encoder: encoder path or name.reranker: reranker path or name.device: optional device override.
RetrievalConfig
num_buckets: number of topic buckets to build.scan_budget: fraction of memory to scan for normal topic routing.scan_budget_reason: larger scan budget for reasoning queries.scan_budget_temporal: optional override for temporal questions.bucket_mode:topic,multiaxis, or fallback non-bucket retrieval.select:hybrid,cosine, or xenc-style reranking.top_k: default final facts for the reader.reasoning_top_k: larger final fact count for reasoning questions.retrieval_mode: service mode,gatedoropen.bm25_lane: whether Turbopuffer adds a lexical BM25 lane.
StorageConfig
Chooses memory vs Turbopuffer.
Provides Turbopuffer namespace, region, API key, vector precision, and recluster threshold.
PromptConfig
Holds optional custom prompt templates.
Current pipeline code mostly uses built-in prompt constants directly.
Ingestion Flow
Ingestion is handled by
MemorySystem.ingest.
sequenceDiagram
participant User
participant MemorySystem
participant Distiller
participant Backend
participant Encoder
User->>MemorySystem: ingest(sessions, dates, subject)
MemorySystem->>MemorySystem: build_transcript(turns, numbered=True)
MemorySystem->>Distiller: distill(key, transcript, date)
Distiller->>Distiller: build extraction prompt
Distiller->>Distiller: llm_fn(prompt)
Distiller->>Distiller: parse_facts(raw)
Distiller-->>MemorySystem: turn-indexed atomic facts
MemorySystem->>MemorySystem: create FactRecord per fact
MemorySystem->>Backend: upsert_facts(records)
Backend->>Backend: deduplicate by content_id
Backend->>Encoder: encode new fact texts
Encoder-->>Backend: normalized vectors
Backend->>Backend: store facts, vectors, metadataInput Shape
ingest receives:
sessions: List[List[Dict[str, str]]]
dates: Optional[List[str]]
subject: Optional[str]Each session is a list of turns:
{"role": "user", "content": "I started learning Portuguese."}The date list is parallel to sessions. Dates are normalized through
membukkit.time_utils.parse_datetime, which accepts Python datetime/date
objects, ISO8601 strings, and legacy slash-date strings:
YYYY-MM-DDYYYY-MM-DDTHH:MM:SSYYYY-MM-DDTHH:MM:SSZYYYY-MM-DDTHH:MM:SS-05:00YYYY/MM/DD HH:MMYYYY/MM/DD
Transcript Building
build_transcript turns a session
into compact numbered lines:
[T0] user: I started learning Portuguese.
[T1] assistant: Nice, here is a study plan...Long turn text is truncated to keep distillation prompts bounded.
Fact Distillation
FactDistiller converts a transcript
into atomic facts. It uses prompt templates in
prompts/extraction.py.
There are two prompt modes:
| Prompt | Used when | Behavior |
|---|---|---|
EXTRACTION_PROMPT | No subject supplied | Writes facts about "the user". |
NAMED_EXTRACTION_PROMPT | subject supplied | Writes facts about the named person and protects identity attribution. |
The prompt requires output lines in this format:
<turn_index> | <atomic fact>parse_facts reads those lines into (turn_index, fact) pairs. Empty or
NONE output means no facts were extracted.
Distillation can be cached by content hash if FactDistiller(cache_path=...)
is used. The cache key includes a prompt version, and for named extraction it
also includes the subject.
FactRecord Creation
For each distilled fact, MemorySystem.ingest creates a
FactRecord with:
text: the atomic fact.timestamp: parsed session date.source_session: currentlyingest:<session_index>.subject: optional memory owner/person.entities: simple extracted entity strings.time_bucket:YYYY-MMorunknown.
Entity extraction and time bucketing come from
retrieval/bucket_index.py.
Storage Backends
Storage is hidden behind the
MemoryBackend protocol. The pipeline does
not directly own arrays or database rows anymore. It asks the backend to:
clear memory,
upsert facts,
count facts,
generate candidate pools,
expose topic partitions,
provide topic exemplars,
delete memory.
The key shared data structures are:
| Type | Meaning |
|---|---|
FactRecord | A fact before or during storage. |
Candidate | A fact returned from retrieval, ready for reranking. |
CandidatePool | Candidate list plus trace and cosine availability. |
MemoryBackend | Protocol implemented by storage backends. |
Internally, timestamps are represented as datetime objects. ISO8601 is the
canonical string format for structured fields, while reader prompts keep compact
date-only prefixes such as [2024-06-01].
Deduplication
content_id creates a stable SHA-1 based id
from normalized fact text and optional subject. Backends deduplicate on that id,
so ingesting the same extracted fact twice does not store it twice.
InMemoryBackend
InMemoryBackend is the default backend.
It keeps:
_texts_times_entities_time_buckets_ids_embs_partition
On upsert_facts, it:
Deduplicates incoming facts.
Embeds only new fact texts.
Appends text, timestamp, metadata, ids, and vectors.
Invalidates the topic partition so it will rebuild lazily.
This backend is used by tests, local Python usage, and evaluation.
TurbopufferBackend
TurbopufferBackend is the persistent
service backend. Each owner maps to one namespace, usually mem_<owner>.
It stores:
vector,
fact text,
timestamp,
topic bucket,
entities,
time bucket,
source metadata,
subject,
supersession fields,
partition version.
Important behavior:
New facts are embedded before write.
Vectors are stored as
f16by default.Existing ids are checked before embedding to avoid unnecessary model calls.
Topic centroids are stored as a sentinel
__partition__row.maybe_reclusterandreclusterrebuild centroids and patch scalartopic_bucketvalues without rewriting vectors.supersedecan mark older facts as stale by patching metadata.
Topic Buckets And Routing
The core retrieval method lives in
retrieval/buckets.py.
flowchart TD
FACTVECS[Fact embeddings] --> KMEANS[KMeans topic partition]
KMEANS --> CENTROIDS[Normalized centroids]
KMEANS --> MEMBERS[by_bucket fact ids]
QUERY[Question] --> QEMB[Query embedding]
QEMB --> SCORES[cosine query vs centroids]
SCORES --> ORDER[Sort buckets by score]
ORDER --> OPEN[Open buckets until scan budget reached]
OPEN --> CAND[Candidate fact ids]Building A Topic Partition
build_topic_partition(fact_embs, k=24):
Chooses an effective bucket count.
Runs KMeans or MiniBatchKMeans.
Builds
by_bucket, mapping each bucket to member fact indices.Computes normalized centroids.
Optionally builds multiple prototypes per bucket with
k_proto.
For very small banks, all facts go into one bucket.
Routing A Query
route_topic(partition, query_emb, budget=0.3):
Normalizes the query embedding.
Scores every bucket centroid.
Converts scores to softmax route probabilities.
Opens buckets in descending score order.
Stops when opened facts cover at least the scan budget.
Returns candidate indices and an inspectable trace.
The trace includes:
opened bucket ids,
route probabilities,
bucket sizes,
total facts,
scanned facts,
scan fraction,
total buckets.
Multi-Axis Routing
bucket_mode="multiaxis" adds two symbolic axes:
entity buckets from simple entity extraction,
time buckets from year-month timestamps.
route_multiaxis unions:
topic-routed candidates,
exact entity matches,
explicit time-bucket matches for temporal questions.
This is useful for catching named or dated evidence that topic routing alone may miss.
Query Classification
Query classification lives in
retrieval/router.py.
The router is deliberately rule-based. It detects:
| Query class | Examples of cues | Reader behavior |
|---|---|---|
TEMPORAL | "when", "before", "after", "latest", dates | Use reasoning reader and temporal retrieval. |
KNOWLEDGE_UPDATE | "now", "currently", "changed", "switched" | Use reasoning reader to resolve current/latest facts. |
AGGREGATION | "how many", "list all", "every", "total" | Use reasoning reader for multi-fact synthesis. |
GENERAL | No special cues | Use dated reader. |
Recommendation detection is separate:
is_recommendation_query(query_text)If a query is a recommendation/advice request, it routes to the recommendation reader first, even if it also has other cues.
The helper functions used by the pipeline are:
is_recommendation_queryis_reasoning_queryis_temporal_query
Answer Flow
Answering is handled by
MemorySystem.answer.
sequenceDiagram
participant User
participant MemorySystem
participant Router
participant Backend
participant Reranker
participant Reader
participant LLM
User->>MemorySystem: answer(question, question_date, identity)
MemorySystem->>MemorySystem: if backend.count() == 0 return N/I
MemorySystem->>Router: classify query
Router-->>MemorySystem: is_rec, is_reason, is_temp
MemorySystem->>Backend: candidates(query, top_k, flags)
Backend-->>MemorySystem: CandidatePool
MemorySystem->>Reranker: score(query, candidate texts)
Reranker-->>MemorySystem: utility scores
MemorySystem->>MemorySystem: select/fuse rankings
MemorySystem->>MemorySystem: format facts chronologically
MemorySystem->>Reader: reader(fact_lines, question, question_date)
Reader->>LLM: prompt
LLM-->>Reader: answer text
Reader-->>MemorySystem: answer
MemorySystem-->>User: AnswerResultThe answer path has four main stages:
Classify the query.
Retrieve and rerank candidate facts.
Select the right reader.
Return an
AnswerResult.
Top-K Adjustment
Normal questions use RetrievalConfig.top_k.
Reasoning questions can use the larger RetrievalConfig.reasoning_top_k:
if self._retrieval.reasoning_top_k > k_eff and is_reason:
k_eff = self._retrieval.reasoning_top_kThis gives multi-fact questions more evidence.
Candidate Generation And Reranking
Candidate generation happens inside the backend. Reranking happens in
MemorySystem._retrieve.
flowchart TD
QUERY[Question] --> BACKEND[backend.candidates]
BACKEND --> POOL[CandidatePool]
POOL --> XENC[UtilityReranker.score]
XENC --> UTIL[utility scores]
POOL --> COS[cosine scores if available]
UTIL --> SELECT[Ranking selection]
COS --> SELECT
SELECT --> TOPK[Top-k Candidates]In-Memory Candidate Generation
For bucket_mode="topic":
Encode query.
Build or reuse topic partition.
Route query to buckets by scan budget.
Return candidates from opened buckets.
If
select="hybrid", attach cosine scores for RRF fusion.
For bucket_mode="multiaxis":
Build topic/entity/time partition.
Route by topic.
Add entity and time matches.
Optionally cap topic candidates by cosine before reranking.
For other bucket modes:
Compute cosine against all facts.
Take the top
candidate_pool.
Turbopuffer Candidate Generation
The Turbopuffer backend performs a database-backed candidate search:
Count live facts.
Embed the query.
Extract query entities and optional time ranges.
Route against cached topic centroids.
Build a Turbopuffer filter.
Run vector ANN and optionally BM25.
Fuse server-side with RRF when both lanes are enabled.
Return candidates to the local cross-encoder.
There are two service retrieval modes:
| Mode | Meaning |
|---|---|
gated | Topic/entity/time filters constrain or broaden retrieval before DB search. |
open | ANN-first over the namespace; buckets become descriptive trace data. |
Local Cross-Encoder Rerank
UtilityReranker.score scores every
candidate as a (query, fact) pair. Higher means more useful/relevant.
Hybrid RRF Fusion
When RetrievalConfig.select == "hybrid" and cosine scores exist, the pipeline
uses rrf_order from
retrieval/buckets.py.
RRF combines two rankings over the same candidate pool:
cross-encoder utility rank,
cosine similarity rank.
The formula is:
score = 1 / (k_rrf + rank_cross_encoder) + 1 / (k_rrf + rank_cosine)The intuition: a fact can rank well if either the semantic vector signal or the cross-encoder relevance signal strongly likes it.
Fact Presentation
After retrieval, _present_temporal formats selected candidates as dated facts
and sorts them chronologically:
[2024-06-01] The user switched to a vegan diet.
[2024-06-10] The user said the vegan diet was going well.Readers see this ordered list, not raw Candidate objects.
Reader Layer
Readers live in
reading/readers.py, with prompts in
prompts/reading.py.
The pipeline chooses one of three main readers:
| Reader factory | Prompt | Used for |
|---|---|---|
make_dated_reader | DATED_READER_PROMPT | Direct memory lookups. |
make_reasoning_reader | REASONING_READER_PROMPT | Temporal, counting, latest/current, multi-session synthesis. |
make_recommendation_reader | RECOMMENDATION_READER_PROMPT | Personalized advice or recommendations. |
All reader factories close over an llm_fn and return an answer function:
answer(fact_lines: List[str], question: str, qdate: str) -> strEach reader:
Builds a
fact_block.Adds
today_lineif a question date exists.Adds
_identity_preamble(identity)if identity exists.Formats a prompt.
Calls the LLM.
Returns stripped answer text.
The reasoning and Mem0 readers also strip final-answer markers such as
Answer: or ANSWER:.
Abstention
The canonical internal abstention is:
N/I_normalize_abstain converts N/I or NI to:
Based on our past conversations, you never mentioned that, so I don't have any information about it.make_abstain_gate can build a groundedness verifier, but the main pipeline
currently does not call it.
LLM Backends
llm/backends.py defines a simple callable
interface:
class LLMBackend(Protocol):
def __call__(self, prompt: str) -> str: ...Implemented backends:
| Backend | Spec example | Notes |
|---|---|---|
| OpenAI | openai:gpt-4o-mini | Uses chat completions. Temperature is omitted for models that do not support it. |
| Anthropic | anthropic:claude-sonnet-4-20250514 | Uses messages API. |
| Local OpenAI-compatible | local:http://localhost:8000/v1:model-name | Useful for local model servers. |
The same llm_fn is used for extraction and reading unless you manually wire
different functions.
Models
There are two learned model roles.
Encoder
Encoder lazily loads a
SentenceTransformer and encodes fact text and query text into normalized
vectors. These vectors power:
fact storage,
KMeans topic buckets,
query-to-centroid routing,
cosine ranking.
Reranker
UtilityReranker wraps a
CrossEncoder. It scores (query, fact) pairs after candidate generation.
This model is more expensive than cosine, so bucket routing keeps its input pool small.
Service API
The service is implemented in
service/app.py and
service/manager.py.
flowchart TD
HTTP["HTTP request /v1/{owner}/..."] --> APP[FastAPI app]
APP --> SVC[MemoryService]
SVC --> CACHE[LRU cache of MemorySystem per owner]
SVC --> SHARED[Shared encoder, reranker, LLM]
SVC --> NS[Turbopuffer namespace mem_owner]
NS --> SYS[MemorySystem with TurbopufferBackend]MemoryService loads expensive models once per worker. Each owner gets a
lightweight MemorySystem bound to one Turbopuffer namespace.
Important endpoints:
| Endpoint | Purpose |
|---|---|
GET /health | Health check. |
POST /v1/{owner}/ingest | Ingest sessions into an owner's memory. |
POST /v1/{owner}/answer | Answer from an owner's memory. |
GET /v1/{owner}/partition | Show partition version and bucket sizes. |
POST /v1/{owner}/label_buckets | Ask the LLM to label buckets. |
POST /v1/{owner}/warm | Warm namespace and centroid cache. |
POST /v1/{owner}/recluster | Rebuild topic partition if needed. |
DELETE /v1/{owner} | Delete an owner's namespace. |
Owner ids are sanitized by namespace_for(owner) into mem_<owner>.
CLI
cli.py defines the membukkit command.
Main subcommands:
| Command | Purpose |
|---|---|
membukkit eval | Run LongMemEval or LoCoMo evaluation. |
membukkit train-encoder | Dispatch to scripts/train_encoder.py. |
membukkit train-reranker | Dispatch to scripts/train_reranker.py. |
membukkit serve | Start the FastAPI service with Turbopuffer storage. |
CLI Evaluation Path
The CLI eval path drives the production MemorySystem, the same ingest +
kind-scoped union retrieval the service uses, so eval can't diverge from
production (the old bespoke in-CLI retrieval has been removed):
Load dataset instances.
Build retrieval tasks with
_build_all_tasks_lib: ingest each conversation into aMemorySystem(in-memory or Turbopuffer backend) and collect the union fact lines per method viaanswer(..., generate_answer=False).Cache task rows to the persistent task cache.
Run readers and judges concurrently.
Write
e2e_summary.jsonande2e_results.jsonl.
--replay-tasks skips model loading and retrieval by reusing the cached task
rows.
Data And Evaluation
Dataset interfaces live in data/base.py:
FactInputQueryInputCoreMemDataset
LongMemEval support:
data/longmemeval.pydownloads the cleaned benchmark from Hugging Face.data/instance.pyadapts each item into facts, queries, abilities, evidence indices, and utility matrices.
LoCoMo support:
data/locomo.pyadapts LoCoMo into the LongMemEval-style instance interface.LoCoMo categories are mapped into broad task types for reader and judge use.
Judging:
eval/judges.pyhas a generic numeric LLM judge and an official LongMemEval yes/no judge.prompts/protocol.pycontains Mem0 answer and judge prompts.eval/harness.pyprovides a high-levelevaluate(mem, dataset, ...)wrapper that resets and ingests per instance.
Telemetry
telemetry.py is a dependency-optional facade
over Logfire/OpenTelemetry.
The rest of the code can call:
telemetry.span(...)telemetry.timed(...)telemetry.counter(...)telemetry.histogram(...)telemetry.set_attributes(...)
If Logfire is not installed or configured, these calls become safe no-ops.
By default, raw user text is not attached to telemetry. capture_content=True
must be explicitly enabled to attach question, answer, or memory text.
Runtime Sequence: Ingest Then Answer
sequenceDiagram
participant App
participant MemorySystem
participant Distiller
participant Backend
participant Encoder
participant Router
participant Reranker
participant Reader
App->>MemorySystem: from_pretrained(...)
MemorySystem->>Encoder: lazy model wrapper
MemorySystem->>Reranker: load cross-encoder
MemorySystem->>Backend: make_backend(...)
App->>MemorySystem: ingest(sessions, dates)
MemorySystem->>Distiller: transcript -> atomic facts
MemorySystem->>Backend: upsert_facts(FactRecord[])
Backend->>Encoder: encode new facts
Backend-->>MemorySystem: n_new
App->>MemorySystem: answer(question)
MemorySystem->>Router: classify query
MemorySystem->>Backend: candidates(...)
Backend->>Encoder: encode query
Backend-->>MemorySystem: CandidatePool
MemorySystem->>Reranker: score(query, facts)
Reranker-->>MemorySystem: utility scores
MemorySystem->>MemorySystem: RRF/select top-k
MemorySystem->>Reader: prompt selected facts
Reader-->>MemorySystem: answer text
MemorySystem-->>App: AnswerResultImportant Design Choices
Atomic Facts Instead Of Raw Turns
The distiller rewrites chat sessions into short, self-contained memory facts. This makes retrieval units cleaner and makes the answer more likely to be explicit in the facts handed to the reader.
Buckets As Both Index And Explanation
Topic buckets are not only for speed. The opened bucket list is the retrieval explanation: it says which regions of memory were activated and how much memory was scanned.
Cross-Encoder Only After Gating
The cross-encoder is powerful but expensive. MEMBUKKIT first uses embeddings and bucket routing to produce a smaller candidate pool, then applies the cross-encoder only inside that pool.
Query-Type-Routed Readers
One prompt does not fit every question. The router picks:
dated reader for direct lookup,
reasoning reader for synthesis,
recommendation reader for personalized advice.
Backend Seam
MemorySystem owns model logic and final reranking. Backends own fact storage
and candidate materialization. This keeps the in-memory research path and the
Turbopuffer service path under one API.
Common Modification Points
| Goal | Start here |
|---|---|
| Change how facts are extracted | prompts/extraction.py, extraction/distiller.py |
| Change reader behavior | prompts/reading.py, reading/readers.py |
| Change query classification | retrieval/router.py |
| Change bucket routing | retrieval/buckets.py |
| Change metadata or storage semantics | storage/base.py, backend implementation |
| Change local retrieval behavior | storage/memory.py, MemorySystem._retrieve |
| Change service retrieval behavior | storage/turbopuffer.py, retrieval/query_filters.py |
| Change eval scoring | eval/judges.py, prompts/protocol.py |
| Add API endpoint | service/app.py |
| Change CLI options | cli.py |
Compact Mental Model
Conversation sessions
-> LLM distillation
-> atomic dated facts
-> embeddings + metadata
-> storage backend
-> topic/entity/time organization
-> query routing
-> candidate pool
-> cross-encoder rerank
-> hybrid fusion
-> dated fact lines
-> query-type-specific reader prompt
-> final answer + traceIn short: MEMBUKKIT turns messy conversational history into dated atomic facts, organizes those facts into explainable buckets, scans only the relevant memory regions for a question, reranks the selected facts, and asks a reader LLM to answer only from that evidence.
384 files · 376 not served here
- .dockerignore (not served here)
- .env.example (not served here)
- .github/workflows/ci.yml (not served here)
- .github/workflows/docker-publish.yml (not served here)
- .github/workflows/docs.yml (not served here)
- .gitignore (not served here)
- ATTRIBUTION.md
- CONTRIBUTING.md
- Dockerfile (not served here)
- LICENSE
- README.md
- benchmarks/PAPER_RESULTS.md (not served here)
- benchmarks/README.md (not served here)
- benchmarks/RESULTS_TABLE.md (not served here)
- benchmarks/__init__.py (not served here)
- benchmarks/beam_ablation/README.md (not served here)
- benchmarks/beam_ablation/gemma-hybrid/beam_summary.json (not served here)
- benchmarks/beam_ablation/gemma-hybrid/e2e_summary.json (not served here)
- benchmarks/beam_ablation/gemma-none/beam_summary.json (not served here)
- benchmarks/beam_ablation/gemma-none/e2e_summary.json (not served here)
- benchmarks/beam_ablation/hybrid/beam_summary.json (not served here)
- benchmarks/beam_ablation/hybrid/e2e_summary.json (not served here)
- benchmarks/beam_ablation/mpnet-hybrid/beam_summary.json (not served here)
- benchmarks/beam_ablation/mpnet-hybrid/e2e_summary.json (not served here)
- benchmarks/beam_ablation/mpnet-none/beam_summary.json (not served here)
- benchmarks/beam_ablation/mpnet-none/e2e_summary.json (not served here)
- benchmarks/beam_ablation/none/beam_summary.json (not served here)
- benchmarks/beam_ablation/none/e2e_summary.json (not served here)
- benchmarks/beam_ablation/tel3l-hybrid/beam_summary.json (not served here)
- benchmarks/beam_ablation/tel3l-hybrid/e2e_summary.json (not served here)
- benchmarks/beam_ablation/tel3l-reranker-heldout-eval.json (not served here)
- benchmarks/common/__init__.py (not served here)
- benchmarks/common/dedup.py (not served here)
- benchmarks/common/harness.py (not served here)
- benchmarks/common/metrics.py (not served here)
- benchmarks/common/paths.py (not served here)
- benchmarks/common/qmd_compat.py (not served here)
- benchmarks/common/qmd_report.py (not served here)
- benchmarks/hotpotqa/__init__.py (not served here)
- benchmarks/hotpotqa/dataset.py (not served here)
- benchmarks/hotpotqa/export_corpus.py (not served here)
- benchmarks/hotpotqa/run.py (not served here)
- benchmarks/hotpotqa/run_qmd.py (not served here)
- benchmarks/longmemeval_session_recall/README.md (not served here)
- benchmarks/longmemeval_session_recall/results/original_local_depth50_fullscan/per_question.jsonl (not served here)
- benchmarks/longmemeval_session_recall/results/original_local_depth50_fullscan/summary.json (not served here)
- benchmarks/longmemeval_session_recall/results/original_local_production/per_question.jsonl (not served here)
- benchmarks/longmemeval_session_recall/results/original_local_production/summary.json (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_depth50_fullscan/per_question.jsonl (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_depth50_fullscan/summary.json (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_depth50_fullscan_norerank/per_question.jsonl (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_depth50_fullscan_norerank/summary.json (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_depth50_fullscan_stockce/per_question.jsonl (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_depth50_fullscan_stockce/summary.json (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_production/per_question.jsonl (not served here)
- benchmarks/longmemeval_session_recall/results/original_openai_production/summary.json (not served here)
- benchmarks/multihop/__init__.py (not served here)
- benchmarks/multihop/dataset.py (not served here)
- benchmarks/multihop/export_corpus.py (not served here)
- benchmarks/multihop/run.py (not served here)
- benchmarks/multihop/run_fixture.py (not served here)
- benchmarks/qmd/__init__.py (not served here)
- benchmarks/qmd/fetch_fixture.py (not served here)
- benchmarks/qmd/fixture/MANIFEST.json (not served here)
- benchmarks/qmd/fixture/eval-docs/api-design-principles.md (not served here)
- benchmarks/qmd/fixture/eval-docs/distributed-systems-overview.md (not served here)
- benchmarks/qmd/fixture/eval-docs/machine-learning-primer.md (not served here)
- benchmarks/qmd/fixture/eval-docs/product-launch-retrospective.md (not served here)
- benchmarks/qmd/fixture/eval-docs/remote-work-policy.md (not served here)
- benchmarks/qmd/fixture/eval-docs/startup-fundraising-memo.md (not served here)
- benchmarks/qmd/fixture/example.json (not served here)
- benchmarks/qmd/run.py (not served here)
- demos (not served here)
- docker-compose.yml (not served here)
- docs/METHOD.md
- docs/RAG.md
- docs/assets/architecture.png (not served here)
- docs/assets/demo-ask.gif (not served here)
- docs/assets/gui-ask-trace.png (not served here)
- docs/assets/gui-memory-map.png (not served here)
- docs/assets/gui-prove-it.png (not served here)
- docs/assets/gui-provenance.png (not served here)
- docs/assets/gui-truth-timeline.png (not served here)
- docs/assets/gui-write-receipt.png (not served here)
- docs/assets/logo.png (not served here)
- docs/assets/logo.svg (not served here)
- docs/code-walkthrough.md
- docs/guide/agents.md (not served here)
- docs/guide/benchmarks.md (not served here)
- docs/guide/bring-your-own.md (not served here)
- docs/guide/customization.md (not served here)
- docs/guide/deleting.md (not served here)
- docs/guide/demos.md (not served here)
- docs/guide/docker.md (not served here)
- docs/guide/documents.md (not served here)
- docs/guide/install.md (not served here)
- docs/guide/library.md (not served here)
- docs/guide/mcp.md (not served here)
- docs/guide/observability.md (not served here)
- docs/guide/quickstart.md (not served here)
- docs/guide/service.md (not served here)
- docs/guide/storage.md (not served here)
- docs/guide/troubleshooting.md (not served here)
- docs/guide/when-to-use.md (not served here)
- docs/index.md
- docs/reference/http-api.md (not served here)
- examples/00_why_membukkit.py (not served here)
- examples/01_personal_memory.py (not served here)
- examples/02_support_tickets.py (not served here)
- examples/03_contracts.py (not served here)
- examples/04_custom_instructions.py (not served here)
- examples/05_agent_loop.py (not served here)
- examples/README.md (not served here)
- logo.png (not served here)
- mkdocs.yml (not served here)
- notebooks/01_quickstart.ipynb (not served here)
- notebooks/02_how_it_works.ipynb (not served here)
- notebooks/03_rag_mode.ipynb (not served here)
- notebooks/04_benchmarks.ipynb (not served here)
- pyproject.toml (not served here)
- scripts/publish_weights.py (not served here)
- scripts/pypi_readme.py (not served here)
- scripts/session_recall.py (not served here)
- scripts/train_encoder.py (not served here)
- scripts/train_reranker.py (not served here)
- src/membukkit/__init__.py (not served here)
- src/membukkit/_version.py (not served here)
- src/membukkit/agents/__init__.py (not served here)
- src/membukkit/agents/deep_research.py (not served here)
- src/membukkit/bench/__init__.py (not served here)
- src/membukkit/bench/recipes.py (not served here)
- src/membukkit/cli/__init__.py (not served here)
- src/membukkit/cli/__main__.py (not served here)
- src/membukkit/cli/bench.py (not served here)
- src/membukkit/cli/commands.py (not served here)
- src/membukkit/cli/common.py (not served here)
- src/membukkit/cli/demo.py (not served here)
- src/membukkit/cli/eval_legacy.py (not served here)
- src/membukkit/cli/mcp_cmd.py (not served here)
- src/membukkit/cli/ui.py (not served here)
- src/membukkit/config.py (not served here)
- src/membukkit/credentials.py (not served here)
- src/membukkit/data/__init__.py (not served here)
- src/membukkit/data/base.py (not served here)
- src/membukkit/data/beam.py (not served here)
- src/membukkit/data/instance.py (not served here)
- src/membukkit/data/locomo.py (not served here)
- src/membukkit/data/longmemeval.py (not served here)
- src/membukkit/data/multihop.py (not served here)
- src/membukkit/demos/agent-ops/demo.json (not served here)
- src/membukkit/demos/agent-ops/ops_log.json (not served here)
- src/membukkit/demos/contract-qa/demo.json (not served here)
- src/membukkit/demos/contract-qa/dpa_addendum.md (not served here)
- src/membukkit/demos/contract-qa/msa_cloudvault.md (not served here)
- src/membukkit/demos/engineering-kb/adr_011_pgbouncer.md (not served here)
- src/membukkit/demos/engineering-kb/adr_014_event_bus.md (not served here)
- src/membukkit/demos/engineering-kb/demo.json (not served here)
- src/membukkit/demos/engineering-kb/postmortem_2024-02-14_checkout.md (not served here)
- src/membukkit/demos/engineering-kb/postmortem_2024-04-03_search.md (not served here)
- src/membukkit/demos/personal-assistant/chat_history.json (not served here)
- src/membukkit/demos/personal-assistant/demo.json (not served here)
- src/membukkit/demos/support-brain/demo.json (not served here)
- src/membukkit/demos/support-brain/tickets.csv (not served here)
- src/membukkit/eval/__init__.py (not served here)
- src/membukkit/eval/beam_official.py (not served here)
- src/membukkit/eval/harness.py (not served here)
- src/membukkit/eval/judges.py (not served here)
- src/membukkit/eval/metrics.py (not served here)
- src/membukkit/eval/qa_scorer.py (not served here)
- src/membukkit/extraction/__init__.py (not served here)
- src/membukkit/extraction/distiller.py (not served here)
- src/membukkit/ingest/__init__.py (not served here)
- src/membukkit/ingest/parsers.py (not served here)
- src/membukkit/llm/__init__.py (not served here)
- src/membukkit/llm/backends.py (not served here)
- src/membukkit/mcp_server.py (not served here)
- src/membukkit/memory_api.py (not served here)
- src/membukkit/models/__init__.py (not served here)
- src/membukkit/models/encoder.py (not served here)
- src/membukkit/models/openai_encoder.py (not served here)
- src/membukkit/models/registry.py (not served here)
- src/membukkit/models/reranker.py (not served here)
- src/membukkit/pipeline.py (not served here)
- src/membukkit/progress.py (not served here)
- src/membukkit/prompts/__init__.py (not served here)
- src/membukkit/prompts/extraction.py (not served here)
- src/membukkit/prompts/packs.py (not served here)
- src/membukkit/prompts/packs/agent_ops.yaml (not served here)
- src/membukkit/prompts/packs/contracts.yaml (not served here)
- src/membukkit/prompts/packs/customer_support.yaml (not served here)
- src/membukkit/prompts/packs/engineering_kb.yaml (not served here)
- src/membukkit/prompts/packs/personal_assistant.yaml (not served here)
- src/membukkit/prompts/protocol.py (not served here)
- src/membukkit/prompts/reading.py (not served here)
- src/membukkit/prompts/resolve.py (not served here)
- src/membukkit/py.typed (not served here)
- src/membukkit/rag.py (not served here)
- src/membukkit/reading/__init__.py (not served here)
- src/membukkit/reading/qa_reader.py (not served here)
- src/membukkit/reading/readers.py (not served here)
- src/membukkit/reports.py (not served here)
- src/membukkit/retrieval/__init__.py (not served here)
- src/membukkit/retrieval/bucket_index.py (not served here)
- src/membukkit/retrieval/buckets.py (not served here)
- src/membukkit/retrieval/lexical.py (not served here)
- src/membukkit/retrieval/multihop.py (not served here)
- src/membukkit/retrieval/query_filters.py (not served here)
- src/membukkit/retrieval/rag.py (not served here)
- src/membukkit/retrieval/router.py (not served here)
- src/membukkit/service/__init__.py (not served here)
- src/membukkit/service/app.py (not served here)
- src/membukkit/service/local_app.py (not served here)
- src/membukkit/service/manager.py (not served here)
- src/membukkit/storage/__init__.py (not served here)
- src/membukkit/storage/base.py (not served here)
- src/membukkit/storage/localstore.py (not served here)
- src/membukkit/storage/memory.py (not served here)
- src/membukkit/storage/turbopuffer.py (not served here)
- src/membukkit/suggestions.py (not served here)
- src/membukkit/supersession.py (not served here)
- src/membukkit/telemetry.py (not served here)
- src/membukkit/time_utils.py (not served here)
- src/membukkit/ui_dist/assets/index-C8JWLydS.css (not served here)
- src/membukkit/ui_dist/assets/index-DBJiMXMX.js (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-400-normal-HOLc17fK.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-400-normal-obahsSVq.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-500-normal-BasfLYem.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-500-normal-CxZf_p3X.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-600-normal-4D_pXhcN.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-600-normal-CWCymEST.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-700-normal-CjBOestx.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-700-normal-DrXBdSj3.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-400-normal-B4URO6DV.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-400-normal-q2sYcFCs.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-500-normal-BIZE56-Y.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-500-normal-Xzm54t5V.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-600-normal-BZpKdvQh.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-600-normal-plRanbMR.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-700-normal-BUv2fZ6O.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-700-normal-C3JjAnD8.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-400-normal-KugGGMne.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-500-normal-2j5mBUwD.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-600-normal-B8X0CLgF.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff (not served here)
- src/membukkit/ui_dist/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-400-normal-C38fXH4l.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-400-normal-CyCys3Eg.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-500-normal-BL9OpVg8.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-500-normal-Cerq10X2.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-600-normal-CiBQ2DWP.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-600-normal-LgqL8muc.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-700-normal-BLAVimhd.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-700-normal-Yt3aPRUw.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-400-normal-77YHD8bZ.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-500-normal-BxGbmqWO.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-600-normal-CIVaiw4L.woff (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-latin-ext-700-normal-TidjK2hL.woff (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-400-normal-DMkecbls.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-500-normal-DOriooB6.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-500-normal-mJboJaSs.woff (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-600-normal-BuLX-rYi.woff (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-700-normal-BZaoP0fm.woff (not served here)
- src/membukkit/ui_dist/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-700-normal-BWTpRfYl.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-cyrillic-700-normal-CEoEElIJ.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-700-normal-C6CZE3T8.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-greek-700-normal-DEigVDxa.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-700-normal-BYuf6tUa.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-700-normal-D3wTyLJW.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-700-normal-CZipNAKV.woff2 (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-latin-ext-700-normal-CxPITLHs.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff (not served here)
- src/membukkit/ui_dist/assets/jetbrains-mono-vietnamese-700-normal-BDLVIk2r.woff (not served here)
- src/membukkit/ui_dist/index.html (not served here)
- src/membukkit/ui_dist/logo.png (not served here)
- src/membukkit/usage.py (not served here)
- tests/fixtures/exports/chatgpt_conversations.json (not served here)
- tests/fixtures/exports/claude_conversations.json (not served here)
- tests/test_asof_reader.py (not served here)
- tests/test_basic.py (not served here)
- tests/test_bench_api.py (not served here)
- tests/test_bench_recipes.py (not served here)
- tests/test_benchmark_metrics.py (not served here)
- tests/test_bucket_control.py (not served here)
- tests/test_changelog_reader.py (not served here)
- tests/test_cli_add_asof.py (not served here)
- tests/test_credentials.py (not served here)
- tests/test_deep_research.py (not served here)
- tests/test_deletion.py (not served here)
- tests/test_demo.py (not served here)
- tests/test_distiller.py (not served here)
- tests/test_estimate_tokens.py (not served here)
- tests/test_export_parsers.py (not served here)
- tests/test_lexical_lane.py (not served here)
- tests/test_llm_backends.py (not served here)
- tests/test_local_app.py (not served here)
- tests/test_localstore.py (not served here)
- tests/test_locomo_download.py (not served here)
- tests/test_mcp_server.py (not served here)
- tests/test_memory_api.py (not served here)
- tests/test_multihop_dataset.py (not served here)
- tests/test_progress.py (not served here)
- tests/test_prompt_config.py (not served here)
- tests/test_prompt_selection.py (not served here)
- tests/test_prompts_api.py (not served here)
- tests/test_qmd_protocol.py (not served here)
- tests/test_rag.py (not served here)
- tests/test_rag_retriever.py (not served here)
- tests/test_service.py (not served here)
- tests/test_storage.py (not served here)
- tests/test_suggestions.py (not served here)
- tests/test_telemetry.py (not served here)
- tests/test_time_utils.py (not served here)
- tests/test_turbopuffer.py (not served here)
- tests/test_union_parity.py (not served here)
- tests/test_usage.py (not served here)
- tests/test_whatsapp_parser.py (not served here)
- ui/index.html (not served here)
- ui/package-lock.json (not served here)
- ui/package.json (not served here)
- ui/public/logo.png (not served here)
- ui/src/App.tsx (not served here)
- ui/src/api.ts (not served here)
- ui/src/components/AskPanel.tsx (not served here)
- ui/src/components/BenchPanel.tsx (not served here)
- ui/src/components/DropZone.tsx (not served here)
- ui/src/components/HelpTip.tsx (not served here)
- ui/src/components/KeysPanel.tsx (not served here)
- ui/src/components/LiveAdd.tsx (not served here)
- ui/src/components/MemoryMap.tsx (not served here)
- ui/src/components/Onboarding.tsx (not served here)
- ui/src/components/ProgressBar.tsx (not served here)
- ui/src/components/PromptsPanel.tsx (not served here)
- ui/src/components/SourceModal.tsx (not served here)
- ui/src/main.tsx (not served here)
- ui/src/styles.css (not served here)
- ui/src/types.ts (not served here)
- ui/tsconfig.json (not served here)
- ui/tsconfig.tsbuildinfo (not served here)
- ui/vite.config.ts (not served here)
- uv.lock (not served here)
Advantages
- Supports temporal reasoning by superseding old facts instead of deleting them, enabling accurate as-of queries. evidence: README.md
- Provides full transparency with receipts that include evidence status, source references, and cost metrics for every answer. evidence: docs/index.md
- Optimizes performance by using bucketed retrieval, reading only a small slice of memory rather than the full context. evidence: README.md
Limitations
- Distillation is an LLM-dependent process that occurs at write time, incurring costs for each session or document ingested. evidence: README.md
- The atomic lane is bounded by the quality of the distillation model; smaller local models may extract weaker facts. evidence: README.md
Security
Risk level: No risk found
This brain runs
This brain runs nothing: AutoGineer found no hooks, scripts, plugin code or MCP servers in its files.
Attribution and licence
- Created by
- Memseek
- Declared authors
- MemBukkit contributors (declared in pyproject.toml)
- Publisher
- Memseek (Official Memseek project)
- Source
- memseekai/membukkit · commit 66a3c82
- Licence
- Apache License 2.0 (files served here)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Memseek.
Install from source
376 of its files are not served here, so there is no ZIP. memseekai/membukkit at 66a3c82