Skip to main content

Mandol

An In-Memory Layered Memory System
for Long-Term Conversational Agents

Unified representation, efficient storage, and accurate retrieval of complex memory information — providing next-generation cognitive architecture for conversational agents.

Get StartedView on GitHub
92.21%LoCoMo Accuracy
88.40%LongMemEval Accuracy
5.4×Retrieval Speedup
4.8×Insertion Speedup

What is Mandol?

Mandol is an in-memory, layered memory system for long-term conversational agents, with efficient and precise retrieval capabilities. It achieves unified representation, efficient storage, and accurate retrieval of complex memory information, providing theoretical foundations and technical solutions for next-generation agent cognitive architectures.

The system fuses key-value, vector, and graph indexing paradigms into a unified in-memory data structure, exposing a minimalist add() → holistic_retrieve() operational model. Its core innovation transforms the traditional "passive recall–rerank" retrieval paradigm into a proactive "Query-Aware Routing → quantitative denoising → high-quality context generation" paradigm.

Mandol System Architecture Overview

Core Innovations

Three breakthroughs redefining how conversational agents remember

🏗️

Layered Memory Model

Theoretical

A layered theoretical memory model dividing the system into base, high-level, and intelligent query layers, with a structured semantic graph unifying complex multi-relational memory representations.

  • Structured semantic graph for unified representation of complex memory
  • Implicit semantic edges generated on demand for precision–flexibility balance
  • Bidirectional traceability linking base and high-level memories
💾

Unified In-Memory Storage

Architecture

A unified storage architecture based on in-memory semantic data structures, where co-designed SemanticMap and SemanticGraph fuse key-value, vector, and graph capabilities at the physical level.

  • Native fusion of KV storage, vector indexing, and graph structures
  • Atomic hybrid retrieval operators eliminate cross-store I/O bottlenecks
  • Active-memory / durable-storage synergy balancing performance and capacity
🔍

Intelligent Routing & Retrieval

Retrieval

A Query-Aware Routing and quantitative retrieval method transforming retrieval from passive recall–rerank into a proactive understand–filter–summarize paradigm.

  • Query-Aware Routing dynamically selects memory sources by intent
  • Two-stage quantitative denoising with conflict resolution
  • Token-constrained high-quality context generation without LLM in loop

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 — outperforming EverMemOS (91.97% / 2.3k) while using 17% fewer tokens, and surpassing Mem0 (64.20%) by 28 points.

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 — outperforming EverMemOS (83.00% / 2.8k) by 5.4 points while using 18% fewer tokens.


Quick Start

Three-step operational model: add → build → retrieve

# Install Mandol (zero mandatory dependencies)
pip install mandol
 
# Optional backends
pip install mandol[faiss] # FAISS vector index acceleration
pip install mandol[neo4j] # Neo4j graph database
pip install mandol[all] # Install all optional deps
1. Install2. Add Memories3. Build & Query4. Persist

Citation

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

mandol.bib
@article{mandol2026,
title = {Mandol: An In-Memory Layered Memory System
for Long-Term Conversational Agents},
author = {Yuhan Zhang and Zhiyuan Guo and Ziheng Zeng
and Wei Wang and Wentao Wu and Lijie Xu},
journal = {arXiv preprint arXiv:260x.xxxxx},
year = {2026}
}

The paper is forthcoming. The full author list and arXiv link will be updated upon publication.