Mandol
Mandol is an agent memory system with hierarchical, episodic, and entity-relation retrieval over a unified semantic graph.
Installation
Mandol 0.1.0 requires Python >=3.12,<3.13 and currently targets Linux.
python -m pip install mandol
Use an explicit pin for a reproducible package environment:
python -m pip install "mandol==0.1.0"
Package Scope
The package provides:
MemoryUnit,MemorySpace,SemanticMap, andSemanticGraphcore APIs;- dense, BM25, SPLADE, graph-expansion, fusion, and reranking paths;
- hierarchical, entity-relation, and episodic triple-tower retrieval;
- query routing, semantic quantification, and high-level memory builders; and
- RocksDB-backed automatic tiered paging for cold
MemoryUnitpayloads.
The package does not include benchmark datasets, generated graphs, model caches, or provider credentials. Models may be downloaded on first use, and complete benchmark reproduction requires external model services.
Quick Start
The following example uses a compact sentence-transformers model and disables realtime SPLADE generation. The embedding model may be downloaded on first use.
from mandol import MemoryUnit, SemanticGraph, SemanticMap
semantic_map = SemanticMap(
embedding_model_name="all-MiniLM-L6-v2",
use_flash_attention=False,
)
graph = SemanticGraph(semantic_map_instance=semantic_map)
graph.add_unit(
MemoryUnit(
uid="msg_001",
raw_data={"text_content": "Zhang San travelled to Beijing today."},
metadata={"timestamp": "2026-06-21T09:00:00"},
),
space_names=["demo"],
generate_sparse_embedding=False,
)
results = graph.search_similarity_in_graph(
query_text="Where did Zhang San go?",
top_k=3,
ms_names=["demo"],
return_score=True,
)
for unit, score in results:
print(score, unit.uid, unit.text_cached)
Paper Reproduction
The published LoCoMo, LongMemEval, and performance results were produced with the frozen paper-repro artifact, not from the package alone. Follow the benchmark-specific guides in that branch for datasets, model roles, configurations, and commands.
Mandol 0.1.0 is a research artifact and early public release. It is not a
production-ready service, and APIs may evolve during the 0.x series.
Links
Citation
@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}
}
Mandol is distributed under the Apache License 2.0.
Metadata
Release files for mandol 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mandol-0.1.0.tar.gz | 317.2 kB | Without provenance | Details for mandol-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mandol-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mandol-0.1.0-py3-none-any.whl |
Total release size: 659.9 kB
Release files / mandol-0.1.0.tar.gz
| Download URL | mandol-0.1.0.tar.gz |
|---|---|
| Size | 317.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17c0965f3f1abdc6779abbe20027584fa001e7d9837e242d05dc3600063cfc96
|
|
BLAKE2b-256 checksum How to use checksums |
4ec57c98eb83755ec45df2411044f36226727621892f7aeabe9d4e2039f6cbf6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / mandol-0.1.0-py3-none-any.whl
| Download URL | mandol-0.1.0-py3-none-any.whl |
|---|---|
| Size | 342.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4be089e7ff7ce50556d1da5e4d2c4f2c1023eda417655fa18311725c5c1dbc7f
|
|
BLAKE2b-256 checksum How to use checksums |
b3cb5a3fdfd89777eafb0c662042344e3120ec24388689593f61d193f4bfd10b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for mandol 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.