--- license: mit tags: - memory - llm - rag - semantic-search --- # 🧠 Mnemo v4.1 - SLM-Inspired Memory System Memory augmentation library for LLMs based on the Semantic-Loop Memory architecture. ## Installation ```python # Download mnemo.py from this repo from mnemo import Mnemo mnemo = Mnemo() mnemo.add("User prefers Python for data analysis") results = mnemo.search("programming language") ``` ## Features ### Core - **Three-Tier Memory**: Working (50 items) → Token Loops → Semantic (persistent) - **Neural Links**: 8 link types with different creation thresholds and decay rates - **Memory Utility Predictor**: Decides WHEN to inject memory (90% accuracy) - **Self-Tuning**: Auto-adjusts thresholds based on feedback ### v4.1 New - **Memory Decay**: Unused memories lose 1% quality per day - **Auto-Pruning**: Removes stale memories (quality < 0.15, unused > 30 days) - **Link Cleanup**: Orphaned links removed when memories are pruned ## Benchmark Results | Test | Without Memory | With Mnemo | Improvement | |------|----------------|------------|-------------| | Novel retrieval | 5% | 85% | +80% | | Code retrieval | 60% | 88% | +28% | | ROS continuous learning | 25% | 75% | +50% | ## API ```python mnemo = Mnemo() mnemo.add(content, namespace="default") results = mnemo.search(query, top_k=5) context = mnemo.get_context(query, top_k=3) should_inject = mnemo.should_inject(query) mnemo.maintenance_cycle() ``` ## Links - [Demo](https://huggingface.co/spaces/AthelaPerk/mnemo) - [MCP Server](https://huggingface.co/spaces/AthelaPerk/mnemo-mcp)