nox-mem: Pain-Weighted Hybrid Memory for LLM Agents
Abstract
We introduce nox-mem, a persistent memory system for autonomous LLM agents. Retrieval and retention are governed by an additive salience formula in which pain is a first-class signal. Pain is a severity in [0.1, 1.0], persisted on every chunk, that an operator can assign and that a fixed keyword rule otherwise sets once at ingest (default 0.2, §3.4.2). Ranking changes pass a mandatory shadow phase before production activation. Each store is a single SQLite file (one per agent plus a shared workspace store), with provider-swappable embeddings, event-driven writeback (inotifywait, 2-second debounce), per-chunk_type retention windows, chunk-level provenance, and a policy-gated pre-snapshot before destructive operations; the code is MIT-licensed. It has run in production since March 2026 (§2.4), serving six specialized agents at KG-path p50 = 2.5 ms, $0 per KG-path query, and a 399 MB resident set in a single self-hosted process (§5.7). Our central result is a pre-specified (execution plan committed to the public repository before the first run; not registered with an external registry), same-corpus comparison against five competing memory systems, of which four produced head-to-head quality numbers (two in the 2026-06-15 canonical run, and EverOS and Zep in later runs over the same corpus and the full n = 2,482 query set of the embedding-matched variant) and one was a documented deployment non-run (§6). Under each system’s native embedder, nox-mem and Mem0, the leaders of the 2026-06-15 run, split the datasets: Mem0 wins LoCoMo (nDCG@10 0.469 vs 0.426) and nox-mem wins LongMemEval. An embedding-matched variant (both Gemini 3072-d, full n = 2,482) was a planned side experiment, not a post-hoc analysis (§6.7); it matches the embedder but does not cleanly isolate architecture (§6.3.2). This variant inverts the split: nox-mem leads on both datasets (LongMemEval 0.526 vs 0.403; LoCoMo 0.495 vs 0.441) and in all five represented categories, with four residual confounds declared. Neither leads the field: EverOS, run later over the same corpus and query set, outperforms nox-mem on both datasets (overall nDCG@10 0.646 vs 0.501), with a mandatory 4B cross-encoder re-ranking stage that nox-mem’s pipeline lacks and whose share of the gap is unmeasured (§6.3.3); Zep ranks third, behind EverOS and nox-mem and ahead of Mem0 (§6.3.4). On EverMemBench, nox-mem reaches 63.28% Overall with Gemini-3-flash, 4.01 pp above the 59.27% that Table 4 of the benchmark paper publishes for MemOS on the same backbone (not re-run by us), 4.50 pp in Table 4’s own aggregation (unweighted mean of nine sub-dimensions, where nox-mem scores 63.77%), and below that backbone’s 72.61% full-context baseline, so this is not a state-of-the-art claim (§5.1.10). Three findings cut against our own headline: pain’s isolated retrieval effect is directional but not statistically significant (§7.1); section-aware ranking, not pain, is the dominant empirical driver (§5.1.3); and on the same EverMemBench run the F_MH multi-hop track sits at 6.02% (4–8% per batch), against 10.84% for MemOS on the same backbone in Table 4 (the best memory-augmented F_MH in any Table 4 column is 18.88%, MemOS on GPT-4.1-mini; all LLM-judged); §5.4 offers task setup as the leading, not established, account.
- agent memory
- hybrid retrieval
- reciprocal rank fusion
- SQLite
- retrieval-augmented generation
- salience ranking
- self-hosted
- cross-system benchmark
The DOI above always resolves to the latest version on Zenodo; this page hosts v1.0.6. Licensed CC BY 4.0.