Skip to main content

Mandol

An In-Process Semantic Memory Runtime
for Agent Retrieval Systems

Current Mandol exposes MemoryUnit, SemanticMap, SemanticGraph, MultiRetriever, and three-tower retrieval components from the src/mandol package.

Get StartedView on GitHub
3.12Python Runtime
MapSemanticMap
GraphSemanticGraph
MultiMultiRetriever

What is Mandol?

Mandol is an in-process semantic memory package for agent retrieval experiments. Its indexes and graph topology remain resident, with optional RocksDB-backed paging for cold MemoryUnit payloads.

Retrieval is handled through MultiRetriever for BM25, SPLADE, cosine search, graph expansion, score fusion, and reranker orchestration. Current development is on main; exact reproduction of the published experiments uses the frozen paper-repro branch.

Mandol System Architecture Overview

Core Innovations

The maintained runtime is built from explicit, inspectable memory primitives

API

Core Memory Objects

Theoretical

MemoryUnit stores the payload, MemorySpace stores logical membership, and MemorySpaceRegistry defines canonical three-tower spaces.

  • String UIDs and dictionary raw_data payloads
  • Tree-shaped spaces backed by UID references
  • Canonical hierarchical, entity-relation, and episodic tower names
MAP

SemanticMap + SemanticGraph

Architecture

SemanticMap owns embeddings, FAISS indexing, sparse vectors and space-filtered search; SemanticGraph adds rustworkx relationships and graph persistence.

  • Global FAISS index with MemorySpace filtering
  • BM25 and SPLADE index integration through retrieval modules
  • Complete graph snapshots with RocksDB-backed tiered payload paging
RET

Retrieval Orchestration

Retrieval

MultiRetriever and TripleTowerRetriever provide retrieval-facing orchestration for dense, sparse, graph, episodic and entity-relation paths.

  • BM25, SPLADE and cosine retrieval with RRF fusion
  • Optional graph expansion and reranker management
  • Async paths for vLLM-backed rerankers

Benchmark Performance

SOTA-level accuracy with lower token consumption on long-term conversational memory benchmarks

LoCoMo Accuracy (%) Comparison

GPT-4o-miniAvg. TokSingleMultiTemp.OpenOverall
Mem01.0k66.7158.1655.4540.6261.00
MemU4.0k72.7762.4133.9646.8861.15
MemOS2.5k81.4569.1572.2760.4275.87
Zep1.4k88.1171.9974.4566.6781.06
EverMemOS2.5k91.6882.7479.3470.1486.13
Mandol2.0k93.8285.1189.1065.6389.48
GPT-4.1-miniAvg. TokSingleMultiTemp.OpenOverall
Mem01.0k68.9761.7058.2650.0064.20
MemU4.0k74.9172.3443.6154.1766.67
MemOS2.5k85.3779.4375.0864.5880.76
Zep1.4k90.8481.9177.2675.0085.22
EverMemOS2.3k95.3289.0190.1377.4391.97
Mandol1.9k95.3692.2087.8579.1792.21

Mandol achieves 92.21% overall on LoCoMo with only 1.9k tokens. Paper rows use generated three-tower graphs with router + quantification; Qwen/DeepSeek build and deduplicate memories, while GPT-4.1-mini/GPT-4o-mini are used for task evaluation and judging.

LongMemEval Accuracy (%) Comparison

GPT-4o-miniAvg. TokSS-PrefSS-AsstTemporalMulti-SKnow. Upd.SS-UserOverall
MemU0.5k76.7019.6017.3042.1041.0067.1038.40
Mem01.1k90.0026.7872.1863.1566.6782.8666.40
Zep1.6k53.3075.0054.1047.4074.4092.9063.80
MemOS1.4k96.6767.8677.4470.6774.2695.7177.80
Mandol2.1k96.6798.2178.9574.4488.4697.1485.00
GPT-4.1-miniAvg. TokSS-PrefSS-AsstTemporalMulti-SKnow. Upd.SS-UserOverall
EverMemOS2.8k93.3385.7177.4473.6889.7497.1483.00
Mandol2.3k96.6798.2187.2277.4489.7498.5788.40

Mandol achieves 88.40% overall on LongMemEval with 2.3k tokens. Reproduction requires the cleaned dataset plus generated hierarchical, episodic, and entity-relation graph artifacts before running task_eval.

Retrieval and Insertion Latency

Complete tail and mean latency results, with server and local deployments reported separately

82.2 ms

Mean Search Latency

H800 · 10 QPS

39.7 ms

Mean Add Latency

H800 · 10 QPS

5.4×

Retrieval Speedup

server mean · vs. best non-Mandol baseline

4.8×

Insertion Speedup

server mean · vs. best non-Mandol baseline

Server Deployment

NVIDIA H800 80GB · Search 10 QPS · Add 10 QPS

ms
NVIDIA H800 80GB · Search 10 QPS · Add 10 QPS
SystemSearchAdd
P99P90MeanP99P90Mean
MemU63000.760539.547554.512070.67273.15077.9
EverMemOS37192.435220.420092.1790.2555.5317.7
Mem04637.01397.01089.02841.01650.0888.0
Zep5348.7614.8571.7375.1254.5239.0
MemOS777.1528.4440.5376.4211.6191.9
Mandol (Ours)94.888.582.267.346.939.7

All values are milliseconds. Server measurements use an NVIDIA H800 80GB at 10 QPS for Search and Add. Local measurements use an NVIDIA RTX 5090 Laptop 24GB at 5 QPS for Search and 10 QPS for Add.

† EverMemOS was reproduced using its official implementation.

These results correspond to the frozen paper reproduction artifact.


Quick Start

Install the package or source environment, add MemoryUnit records, search with MultiRetriever, then persist the graph

# Published package
python -m pip install mandol
 
# Reproducible package pin
python -m pip install "mandol==0.1.0"
 
# Base source environment
uv sync
 
# Development and documentation environment
uv sync --extra dev --extra docs --group spacy-model
 
# Paper performance stack (run from the paper-repro branch)
uv sync --extra dev --extra cuda --group spacy-model
 
# Lightweight import check
uv run python -c "import mandol; print(mandol.__version__)"
1. Environment2. Units3. Search4. Persist

Citation

If this work is helpful to your research, please cite our paper

mandol.bib
@misc{zhang2026mandol,
  title={Mandol: An Agglomerative Agent Memory System for Long-Term Conversations},
  author={Yuhan Zhang and Zhiyuan Guo and Ziheng Zeng and Wei Wang and Wentao Wu and Lijie Xu},
  year={2026},
  eprint={2606.29778},
  archivePrefix={arXiv},
  primaryClass={cs.DB},
  doi={10.48550/arXiv.2606.29778},
  url={https://arxiv.org/abs/2606.29778}
}

The paper is available as arXiv:2606.29778.