Back to News
RSS feedgithub.com

SelMem Uses Selective Reconstruction to Give LLMs Path-Dependent Memory

Summary

SelMem is an exploratory Rust project for adding selective, reconstructive memory to an LLM-based entity. Instead of exposing the model to a complete archive or simply appending a longer context, the system stores a lived narrative separately from a sealed archive and presents the model only with a gist, core, schema, affect, fidelity, mood, and living axioms. Its loop encodes experience, interprets it, applies an identity-based gate, recalls or narrates memories, and periodically sleeps to decay, rewrite, merge, or extinguish motifs. Repeated traces can become motifs, beliefs, and traits, while mood can change the meaning of recalled material and nearby episodes can fuse into myths; heavy anchors are kept separate. Two profiles, such as tender and austere sensitivities, can therefore diverge on the same corpus, with fingerprints and singularity distance used as a proxy for path-dependent originality. The repository includes Rust APIs, a command-line service, HTTP routes for live input, recall, speech, sleep, lineage, mood, and saving, and a browser UI. Persistence uses SQLite or a flat SELMEM1 file, while the memory organ itself runs in RAM and is dumped and reloaded through snapshots. The project is exploratory rather than fitted, ships without a local neural encoder, and can connect to external LLM and embedding endpoints or operate without an endpoint using a rule-based narrator and hashed vectors. Its authors explicitly distinguish it from RAG, a vector database, a system-prompt personality, and a brain.