File size: 1,575 Bytes
819c052
 
 
 
 
 
 
 
 
57f5d36
3825070
57f5d36
3825070
57f5d36
3825070
 
57f5d36
3825070
 
57f5d36
 
 
eb6ef45
 
57f5d36
3825070
57f5d36
 
 
 
 
3825070
57f5d36
 
 
 
3825070
57f5d36
3825070
57f5d36
 
 
 
 
3825070
57f5d36
3825070
57f5d36
 
819c052
57f5d36
 
 
 
3825070
eb6ef45
57f5d36
3825070
819c052
0b5e8f8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
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)