Bitware Labs/bwmem
bwmem, memory that survives the session
The memory layer from our own long-running agent, pulled out and published as a standalone SDK. Facts, embeddings, contradiction detection and multi-stage consolidation for AI that has to remember things past next Tuesday.
The problem it solves
§ 01 · RationaleBolting 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 · EvidenceMemory 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.
| System | Reader model | Retrieval | Score |
|---|---|---|---|
| bwmem (v0.11 engine preview) | qwen3.8-max | adaptive | 85.0% |
| bwmem (v0.11 engine preview) | glm-5.3 | adaptive | 81.7% |
| bwmem (v0.11 engine preview) | gemini-3.7-flash | adaptive | 81.7% |
| bwmem (v0.11 engine preview) | muse-spark-1.2 | adaptive | 80.0% |
| bwmem (v0.11 engine preview) | solar-pro4 | adaptive | 80.0% |
| bwmem (v0.11 engine preview) | qwen3.7-flash | adaptive | 78.3% |
| bwmem (v0.11 engine preview) | glm-5.3-flash | adaptive | 78.3% |
| bwmem (v0.11 engine preview) | gpt-5.6-sol-pro | adaptive | 75.0% |
| bwmem (v0.11 engine preview) | qwen3.8-flash | adaptive | 75.0% |
| bwmem (v0.11 engine preview) | ling-3.0-flash | adaptive | 71.7% |
| bwmem (v0.11 engine preview) | deepseek-v4-pro | adaptive | 70.0% |
| bwmem (v0.11 engine preview) | deepseek-v4-flash-0731 | adaptive | 63.3% |
| bwmem's parent stack (MemoryCore) | solar-pro4 | 25 | 78.3% |
| bwmem (0.10.x release) | deepseek-v4-pro | 25 | 77.5% |
| bwmem (0.10.x release) | deepseek-v4-flash-0731 | 25 | 69.0% |
| ceiling: perfect retrieval | deepseek-v4-pro | · | 88.3% |
| bwmem's parent stack | deepseek-v4-pro | 25 | 81.7% |
| bwmem's parent stack | gpt-4o | 25 | 78.3% |
| Zep (self-reported) | · | · | 63.8–71.2% |
| mem0 (self-reported) | · | · | ~49% |
How the architecture works
§ 03 · Designbwmem operates across four distinct cooperating layers:
- 1. Episodic logging: Every interaction and event is logged with full temporal context and session lineage.
- 2. Bi-temporal fact extraction: Facts are stored across two timelines: system recording time and validity time in the real world.
- 3. Contradiction gates: New claims are evaluated against historical knowledge to catch updates and conflicting facts.
- 4. Consolidation routines: Background jobs distill dialogue, prune duplicates, and optimize the knowledge graph.
Installation & usage
§ 04 · SDKInstall from npm:
npm install @bitwarelabs/bwmem
Complete documentation and TypeScript examples are available on npm and GitHub under AGPL-3.0.