INSTITUTE FOR APPLIED AI & SOVEREIGN SYSTEMS SKÅNE, SWEDEN (EST. 2022) Latest Paper: The Reader Was Missing (Oct 2026) →
Lab Estate: Nominal (58ms · 11 peers)
16:35:29 CET

Bitware Labs/Monograph TR-02 · @bitwarelabs/bwmem

TypeScript Agent Memory SDK · v0.13.0 · 93.2% LongMemEval

bwmem, memory that survives the session

The former memory layer from our long-running agent, published as a standalone SDK. No longer actively maintained following Luna's transition to HippoRAG-based OS-style virtual memory paging. Preserved here as an open AGPL-3.0 reference implementation and benchmark baseline.

PLATE III // ASSOCIATIVE MEMORY GRAPH & JEV ROUTING v0.13.0 · AGPL-3.0
Archival study plate of interconnected memory nodes on textured paper.
SCORE: 93.2% (233/250) RECALL: 91.7% NODE.JS >= 18
SYS_NOTICE // LIFECYCLE STATUS ARCHIVED REFERENCE
Status · Archived / No Longer Maintained

Notice (October 2026): Following the major architectural overhaul of Luna Chat—specifically the transition from monolithic context assembly to HippoRAG (Personalized PageRank) OS-style virtual memory paging, sandboxed subagent execution, and procedural micro-tool distillation—@bitwarelabs/bwmem has concluded its active lifecycle and is no longer maintained.

The package remains accessible on npm (final release v0.13.0) and GitHub under AGPL-3.0 as a permanent reference implementation of bi-temporal fact indexing, rejected-value tombstones, and LongMemEval benchmark methodology. Active memory engineering continues directly within the Luna research build.

v0.13.0Final release (Archived)
93.2%LongMemEval top score (v0.13, 250 questions)
AGPL3.0-only

The problem it solves

§ 01 · Rationale

Bolting a vector store onto a chatbot gives you something that looks like memory for about a month. Then the corpus fills with near-duplicates, retrieval quality falls as storage grows, nothing ever becomes false, and cost scales with history rather than relevance.

bwmem treats memory as a pipeline rather than a bucket. Messages go in; structured facts, summaries, embeddings and a knowledge graph come out, and a background consolidation pass keeps the whole thing from silting up. The longer argument is here.

What it scores, and why that is a weaker claim than it looks

§ 02 · Evidence

Memory systems are easy to describe and hard to verify, so the system bwmem was extracted from is measured against LongMemEval, the standard long-term-memory benchmark.

SystemReader modelRetrievalScore
bwmem (v0.13.0 + Jev)deepseek-v4.1-flashadaptive / Jev (250q)93.2% (233/250)
bwmem (v0.11 engine)qwen3.8-maxadaptive85.0%
bwmem (v0.11 engine)glm-5.3adaptive81.7%
bwmem (v0.11 engine)gemini-3.7-flashadaptive81.7%
bwmem (v0.11 engine)muse-spark-1.2adaptive80.0%
bwmem (v0.11 engine)solar-pro4adaptive80.0%
bwmem (v0.11 engine)qwen3.7-flashadaptive78.3%
bwmem (v0.11 engine)glm-5.3-flashadaptive78.3%
bwmem (v0.11 engine)gpt-5.6-sol-proadaptive75.0%
bwmem (v0.11 engine)qwen3.8-flashadaptive75.0%
bwmem (v0.11 engine)ling-3.0-flashadaptive71.7%
bwmem (v0.11 engine)deepseek-v4-proadaptive70.0%
bwmem (v0.11 engine)deepseek-v4-flash-0731adaptive63.3%
bwmem's parent stack (MemoryCore)solar-pro42578.3%
bwmem (0.10.x release)deepseek-v4-pro2577.5%
bwmem (0.10.x release)deepseek-v4-flash-07312569.0%
ceiling: perfect retrievaldeepseek-v4-pro · 88.3%
bwmem's parent stackdeepseek-v4-pro2581.7%
bwmem's parent stackgpt-4o2578.3%
Zep (self-reported) · · 63.8–71.2%
mem0 (self-reported) · · ~49%

How the architecture works

§ 03 · Design

bwmem operates across five cooperating layers of epistemic protection:

  • 1. Episodic logging & turn windowing: Every interaction and event is logged with full temporal context, session lineage, and lateral turn windows (±1) that preserve conversational continuity without dragging in full-session distractor noise.
  • 2. Bi-temporal fact extraction: Facts are stored across two timelines: system recording time and validity time in the real world. Strict subject boundaries and anti-meta filters guarantee assistant persona details, tool errors, and search diagnostics never pollute user memory.
  • 3. Fast merge gates & contradiction lifecycle: Incoming claims are evaluated in ~250ms via TypeSafe AI structured decision models rather than slow generative calls, distinguishing temporary situational instructions from standing policies while managing open, held, and resolved contradictions.
  • 4. Rejected-value tombstones (v0.13): Memory is as much about permanent excision as learning. When a claim is excised or rejected, a durable tombstone record (keyed on SHA-256 value hashes and token similarity) guarantees retroactive extraction sweeps across conversation transcripts cannot silently resurrect the discarded belief.
  • 5. Pre-reply curation & consolidation routines: A fast candidate curator audits recall relevance before prompt assembly, maintaining an auditable dropped-memory ledger. Nightly background jobs distill dialogue, prune duplicates, and optimize the knowledge graph.

Archive & reference usage

§ 04 · Status & SDK

Package status: This package is archived and no longer under active development.

Install from npm for historical reference, audit, or research:

npm install @bitwarelabs/bwmem

The SDK includes native drivers for PostgreSQL (pgvector), Redis, optional Neo4j graph, OpenRouter, OpenAI, Ollama, and a standalone Fastify REST API with API key authentication and usage tracking.

Complete documentation, TypeScript definitions, and code examples remain available on npm and GitHub under AGPL-3.0. For the active next-generation memory paging architecture, see Luna's research architecture (§ 03).

DEPARTMENT CORRESPONDENCE & INDUSTRIAL COMMISSIONS PGP KEY ID: 53C91896B657212C

Principal Investigator Office · Skåne, Sweden

Correspondence, Audits & Research Commissions

Inquiries regarding technical audits, autonomous agent architecture, sovereign infrastructure builds, or academic correspondence are read directly by the Principal Investigator. Please describe the system, where it operates, and the scope required. Replies are sent within two working days.

Direct correspondence: henke@bitwarelabs.com