Paper: arXiv
The Deterministic Memory Framework (DMF) is a memory management system designed for conversational agents. The idea behind this framework is to avoid unpredictable retention, hallucination, and information loss in memory systems due to an "LLM-in-the-flow" architecture. For this reason, DMF operates on deterministic rules, mathematical temporal decay, and structured semantic retrieval.
At its core, the framework orchestrates active short-term and long-term memory by bridging interaction pipelines with vector databases.
Current approaches to memory in conversational agents rely heavily on the LLM itself to decide what to remember, summarize, or forget. This introduces several fundamental problems:
- Non-reproducibility: The same conversation can produce different memory states across runs, making debugging and testing nearly impossible (caching is practically infeasible).
- Silent information loss: LLM-driven summarization silently drops details that may be critical later, with no audit trail or recovery mechanism.
- Hallucinated recall: When asked to retrieve past context, models may confabulate facts that were never part of the conversation.
- Opaque retention logic: There is no way to inspect, tune, or predict which information will survive and which will be discarded.
DMF addresses these issues by replacing probabilistic memory management with a fully deterministic, mathematically grounded pipeline. Every retention decision is traceable to explicit scoring functions, configurable thresholds, and transparent decay curves.
- Deterministic NLP Analysis: Employs rule-based parsing to deterministically extract interaction signals, topics, and metrics like information density.
- Temporal Dynamics: Automatically manages context size using mathematical time-decay functions and recency windows, naturally prioritizing fresh and highly relevant information.
- Pluggable Long-Term Memory: Seamlessly archives interactions into vector databases and triggers context-aware semantic recalls when relevant historical data is needed.
- Structured Retrieval: Guarantees that the context injected into your agent's prompt is always optimized through multi-stage candidate generation, answerability reranking, and evidence assembly.
You can install it via pip:
pip install dmf-memoryDMF is fully configurable via a TOML file. You can adjust NLP models, temporal decay rates, and pruning priorities to suit your agent's needs.
For a comprehensive guide on all configuration parameters, please check our configuration documentation in MkDocs.
The project provides a Makefile to simplify common development tasks:
make install: Install project dependencies using Poetry.make test: Run the test suite.make check: Verify package metadata.make build: Build the distributable wheel.make docs-serve: Serve the documentation locally.make docs-build: Build the static documentation site.
This framework has been tested and compared with the LoCoMo and LongMemEval frameworks; full details are available in the dedicated repository
If you use the Deterministic Memory Framework in your research, please cite our paper:
@misc{stabile2026dmf,
title = {DMF: A Deterministic Memory Framework for Conversational AI Agents},
author = {Matteo Stabile and Enrico Zimuel},
year = {2026},
eprint = {2606.03463},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2606.03463}
}Copyright 2026 by Matteo Stabile and Enrico Zimuel.