Deterministic Memory Framework
Project description
dmf
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.
Motivations
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.
Core Design Principles
- 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.
Installation
You can install it via pip:
pip install dmf-memory
Configuration
DMF 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.
Development & Makefile
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dmf_memory-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dmf_memory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 146.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbcc6d755ef2da0569347eba2c1cbd5b511fc9ee825f2e6eb41c27e1b13fae1c
|
|
| MD5 |
85ef09b0d95f0dc75b0fefadd54d2825
|
|
| BLAKE2b-256 |
bef37a42cee6d1a06dd1c49c0db4ff94aa87b714b3764f0a205d990b2e9994f2
|
Provenance
The following attestation bundles were made for dmf_memory-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on matstech/dmf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dmf_memory-0.1.0-py3-none-any.whl -
Subject digest:
bbcc6d755ef2da0569347eba2c1cbd5b511fc9ee825f2e6eb41c27e1b13fae1c - Sigstore transparency entry: 1632451173
- Sigstore integration time:
-
Permalink:
matstech/dmf@9733786a9e335f6050949eb38063adcf4ac44021 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/matstech
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9733786a9e335f6050949eb38063adcf4ac44021 -
Trigger Event:
push
-
Statement type: