Skip to main content

Mandol

Mandol is an agent memory system with hierarchical, episodic, and entity-relation retrieval over a unified semantic graph.

English | 中文

Mandol Overview

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, and SemanticGraph core 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 MemoryUnit payloads.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mandol-0.1.0.tar.gz (317.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mandol-0.1.0-py3-none-any.whl (342.6 kB view details)

Uploaded Python 3

File details

Details for the file mandol-0.1.0.tar.gz.

File metadata

  • Download URL: mandol-0.1.0.tar.gz
  • Upload date:
  • Size: 317.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for mandol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 17c0965f3f1abdc6779abbe20027584fa001e7d9837e242d05dc3600063cfc96
MD5 4ff67ade69bf2e71b755b0824274f600
BLAKE2b-256 4ec57c98eb83755ec45df2411044f36226727621892f7aeabe9d4e2039f6cbf6

See more details on using hashes here.

File details

Details for the file mandol-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mandol-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 342.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for mandol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4be089e7ff7ce50556d1da5e4d2c4f2c1023eda417655fa18311725c5c1dbc7f
MD5 3b0e3e99b8370b7f74527486485d45f2
BLAKE2b-256 b3cb5a3fdfd89777eafb0c662042344e3120ec24388689593f61d193f4bfd10b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page