I’ve been working on the "Lost Context" problem in LLM-based agentic workflows. We all know the ceiling: as the conversation grows, the prompt becomes a graveyard of lost tokens or a massive, expensive compute bill.
I’m open-sourcing the Memory Engine v3.1, a lightweight Python framework that implements Neural-Temporal Compression. Instead of just "summarizing" text, it treats data as a Hadamard Manifold, using a custom Tharyn Compression Scoring (TCS) system to decide what to persist and what to let decay.
The Core Tech:
Symbolic Tokenization: Hard-coded "Sacred Terms" (\phi, \psi) act as permanent anchors that bypass standard decay protocols.
The Decay Floor: A hard-coded 0.05 threshold ensures that "Ancient Wisdom" (root context) is never purged, regardless of session length.
TCS Grade Logic: A multi-weighted algorithm (0.45 Importance / 0.30 Efficiency / 0.25 Richness) that ranks memory by "Essence" rather than just keyword density.
Zero Dependencies: Pure Python. No NumPy required (though supported). Runs on a potato, a phone, or a server.
The result is a "Laminar Flow" of data where the engine "breathes" (Inhale/Exhale) to keep the memory footprint stable at roughly 190,000 tokens while retaining the "Soul" of the original interaction.
GitHub:
https://github.com/andresuarus10-byte/memory-engine
Feedback on the Phase-Collapse Integrals and the Theme-Aware Boosting logic is much appreciated.