Dev Chiniwala.
Selected workMNEMOS
Engineering case studyTemporal memory infrastructure

MNEMOS.

Context that keeps up with change.

A self-editing memory runtime with bi-temporal validity, six retrieval signals, and token-aware context packing.

Engineering in brief

Constraint
Facts change while an agent’s context budget stays finite.
Decision
Separate temporal validity from retrieval relevance, then pack useful evidence to a token budget.
Boundary
A research runtime with evaluation entry points. Each deployment needs its own retrieval evaluation.
Role & ownership

Creator · Memory lifecycle, retrieval architecture, graph reasoning, and agent integration

Project status

Public · Research runtime

Technology
  • Python
  • Neo4j
  • FAISS
  • FastAPI
  • MCP

Evidence in numbers

Measured results and implementation scope are labeled separately.

Implementation scope
6retrieval signals

Semantic, lexical, graph, time decay, cognitive, and memory tier; an architecture count, not an accuracy score.

View source
Implementation scope
4memory lifecycle actions

ADD, UPDATE, DELETE, and NOOP are documented operations in the memory runtime.

View source

/ overview

Memory is a changing system.

MNEMOS explores memory for agents that operate across conversations and changing facts. It combines explicit memory operations, temporal validity, graph associations, and bounded retrieval.

The repository packages a Python runtime with FastAPI and MCP entry points, examples, and evaluation tooling. It is an engineering and research project; deployment-specific evaluation remains necessary.

/ problem

Appending facts is not enough.

An agent can recall an old fact correctly and still answer a current question incorrectly. A vector index does not by itself resolve contradictions, track validity, or decide how much context deserves a place in a prompt.

MNEMOS makes those concerns part of the memory lifecycle and retrieval path rather than leaving them entirely to generation.

/ architecture

Resolve, retrieve, and pack.

Architecture overview

MEMORY WRITE & RETRIEVAL PATH

ECL ingestionextract · cognify · load
01
Memory lifecycleadd · update · delete · noop
02
Hybrid retrievalsix complementary signals
03
Context packingprovenance + token budget
04
Condensed from documented components

The write path uses Extract, Cognify, Load ingestion and explicit ADD, UPDATE, DELETE, and NOOP operations. Memories carry observed and valid-time information, along with provenance and expiry-related fields.

The retrieval path fuses semantic, lexical, graph, temporal-decay, cognitive, and tier signals. A context manager packs the selected evidence under a token budget. The research loop follows Plan → Search → Integrate → Reflect.

  • Neo4j supports graph associations and Personalized PageRank traversal.
  • Dense and lexical signals provide complementary retrieval paths.
  • tiktoken-based accounting constrains prompt context.
  • FastAPI and MCP expose the memory runtime to applications and agents.
Inspect the evidenceWhat the two time controls actually query

The temporal tests distinguish when a record is valid from when it was recorded. A valid-time query without a recorded-time cutoff can consult retained superseded versions.

With a recorded-time cutoff, retired versions are excluded after retirement. The exhibit reproduces that boundary rather than claiming unrestricted historical belief reconstruction.

/ Engineering decisions

Treat validity and relevance separately.

Temporal filtering asks whether a fact applies at the requested time. Ranking asks whether the applicable fact is useful to the query. Keeping both concerns visible makes stale answers easier to investigate.

Six-signal fusion offers configurable weights and normalization. More signals introduce calibration work, so the number of signals is an architectural description rather than an accuracy claim.

Context packing uses deduplication and compression fallbacks to keep retrieved evidence inside a bounded prompt.

/ challenges

Persistent context has a maintenance cost.

Contradictory memories need explicit resolution. Repeated evidence can consume prompt space. Large memory collections need consolidation and decay without silently removing relevant facts.

The implementation explores FSRS-inspired scheduling, consolidation, token-aware packing, and provenance-aware graph reasoning. The README identifies stronger test coverage around TTL and persistence than broad end-to-end benchmark automation.

/ results

An inspectable memory runtime.

The public code includes lifecycle operations, bi-temporal fields, hybrid retrieval, graph support, context management, API/MCP integration, and evaluation entry points.

The result is a research runtime for examining memory behavior. Retrieval quality remains a question to evaluate against a defined dataset, baseline, and protocol.

/ learnings

Useful memory preserves the reason to believe it.

Memory quality depends on keeping change and provenance visible, then deciding which evidence is useful under a real context limit.

Further work should test temporal drift, contradictory updates, and retrieval ablations under repeatable evaluation. These are research directions, not published results.

Source record

Sources & technical context

Architecture summaries are based on the linked documentation and source. Current implementation details and limits live in the repository.

Continue exploring

ControlSurface.

Make agent failures useful.