Skip to main content

Deterministic Memory Framework

Project description

DMF Logo

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

dmf_memory-0.1.0-py3-none-any.whl (146.3 kB view details)

Uploaded Python 3

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

Hashes for dmf_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbcc6d755ef2da0569347eba2c1cbd5b511fc9ee825f2e6eb41c27e1b13fae1c
MD5 85ef09b0d95f0dc75b0fefadd54d2825
BLAKE2b-256 bef37a42cee6d1a06dd1c49c0db4ff94aa87b714b3764f0a205d990b2e9994f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dmf_memory-0.1.0-py3-none-any.whl:

Publisher: publish.yml on matstech/dmf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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