AthelaPerk commited on
Commit
0b5e8f8
ยท
verified ยท
1 Parent(s): fb0e934

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +35 -178
README.md CHANGED
@@ -3,204 +3,61 @@ license: mit
3
  library_name: mnemo
4
  tags:
5
  - memory
6
- - retrieval
 
 
7
  - rag
8
- - semantic-search
 
 
 
 
 
 
 
9
  - knowledge-graph
10
- - faiss
11
- - bm25
12
- language:
13
- - en
14
  pipeline_tag: feature-extraction
15
  ---
16
 
17
- # Mnemo: Semantic-Loop Memory
18
-
19
- > *Named after Mnemosyne, Greek goddess of memory*
20
-
21
- **21x faster than mem0. No API keys. Fully local. Learns from feedback.**
22
-
23
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
24
- [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
25
-
26
- ## ๐ŸŽฎ Try the Demo
27
-
28
- ๐Ÿ‘‰ [**Live Demo on HuggingFace Spaces**](https://huggingface.co/spaces/AthelaPerk/mnemo)
29
-
30
- ---
31
-
32
- ## ๐Ÿ† Benchmarks vs mem0
33
-
34
- | Metric | mem0 | Mnemo | Winner |
35
- |--------|------|-------|--------|
36
- | **Search Latency** | 5.73ms | 0.27ms | **Mnemo (21x faster)** |
37
- | **Ingestion Latency** | 31.1ms | 0.8ms | **Mnemo (39x faster)** |
38
- | **API Key Required** | Yes (OpenAI) | No | **Mnemo** |
39
- | **Offline Capable** | No | Yes | **Mnemo** |
40
- | **Features** | 5/10 | 8/10 | **Mnemo** |
41
-
42
- ---
43
-
44
- ## โœจ Features mem0 Doesn't Have
45
-
46
- | Feature | mem0 | Mnemo |
47
- |---------|------|-------|
48
- | Query Intent Detection | โŒ | โœ… |
49
- | Multi-Strategy Retrieval | โŒ | โœ… |
50
- | Knowledge Graph | โŒ | โœ… |
51
- | Feedback Learning | โŒ | โœ… |
52
- | Observability/Metrics | โŒ | โœ… |
53
- | Semantic Chunking | โŒ | โœ… |
54
- | Works Offline | โŒ | โœ… |
55
- | No API Dependencies | โŒ | โœ… |
56
 
57
- ---
58
 
59
- ## ๐Ÿš€ Quick Start
60
 
61
  ```bash
62
- git clone https://huggingface.co/AthelaPerk/mnemo-memory
63
- cd mnemo-memory
64
- pip install -r requirements.txt
65
- ```
66
-
67
- ```python
68
- from mnemo import Mnemo
69
-
70
- # Initialize
71
- m = Mnemo()
72
-
73
- # Add memories
74
- m.add("User prefers dark mode and morning notifications")
75
- m.add("Project deadline is March 15th for the API redesign")
76
- m.add("Team meeting every Tuesday at 2pm")
77
-
78
- # Search (0.27ms average!)
79
- results = m.search("notification preferences")
80
- print(results[0].content) # "User prefers dark mode..."
81
-
82
- # Feedback learning
83
- m.feedback("notification preferences", results[0].id, relevance=0.9)
84
- ```
85
-
86
- ---
87
-
88
- ## ๐Ÿง  Architecture
89
-
90
- ```
91
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
92
- โ”‚ MNEMO โ”‚
93
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
94
- โ”‚ Query โ†’ [Intent Detection] โ†’ [Multi-Strategy Retrieval] โ”‚
95
- โ”‚ โ”‚ โ”‚
96
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
97
- โ”‚ โ”‚ Semantic โ”‚ BM25 โ”‚ Graph โ”‚ โ”‚
98
- โ”‚ โ”‚ 50% โ”‚ 30% โ”‚ 20% โ”‚ โ”‚
99
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
100
- โ”‚ โ”‚ โ”‚
101
- โ”‚ [Feedback Loop] โ”‚
102
- โ”‚ (Learns & Improves) โ”‚
103
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
104
  ```
105
 
106
- ### Core Components
107
-
108
- 1. **FAISS Vector Store** - Scalable similarity search
109
- 2. **Knowledge Graph** - Entity relationships (NetworkX)
110
- 3. **Query Understanding** - Intent classification + NER
111
- 4. **Multi-Strategy Retrieval** - BM25 + Semantic + Graph
112
- 5. **Feedback Loop** - Learns from user interactions
113
- 6. **Observability** - Built-in metrics and tracing
114
-
115
- ---
116
-
117
- ## ๐Ÿ“– API Reference
118
-
119
- ### Basic Usage
120
 
121
  ```python
122
  from mnemo import Mnemo
123
 
124
- m = Mnemo(
125
- embedding_dim=384, # BGE-small compatible
126
- semantic_weight=0.5, # Weight for semantic search
127
- bm25_weight=0.3, # Weight for keyword search
128
- graph_weight=0.2 # Weight for graph traversal
129
- )
130
-
131
- # Add memory
132
- mem_id = m.add("content", metadata={"key": "value"})
133
-
134
- # Search
135
- results = m.search("query", top_k=5)
136
- for r in results:
137
- print(r.id, r.score, r.content)
138
-
139
- # Feedback
140
- m.feedback("query", mem_id, relevance=0.9) # -1 to 1
141
-
142
- # Stats
143
- print(m.get_stats())
144
  ```
145
 
146
- ### SearchResult Object
147
 
148
- ```python
149
- result.id # Memory ID
150
- result.content # Memory content
151
- result.score # Combined score
152
- result.strategy_scores # {'semantic': 0.5, 'bm25': 0.3, 'graph': 0.1}
153
- result.metadata # Original metadata
154
  ```
155
 
156
- ---
157
-
158
- ## ๐Ÿฅ Built for Compliance
159
-
160
- Mnemo was designed with **EU AI Act Article 10** compliance in mind:
161
-
162
- - โœ… **Full audit trails** - Every operation logged
163
- - โœ… **Documented provenance** - Know where memories came from
164
- - โœ… **No external API calls** - Data never leaves your infrastructure
165
- - โœ… **Traceable reasoning** - Understand why results were returned
166
-
167
- *From the team behind NRA-19 medical AI benchmark.*
168
-
169
- ---
170
-
171
- ## ๐Ÿ†š Why Not mem0?
172
-
173
- | Issue with mem0 | Mnemo Solution |
174
- |-----------------|----------------|
175
- | Requires OpenAI API key even for local embeddings | Zero API dependencies |
176
- | Data sent to external services | Fully local, air-gapped capable |
177
- | Single retrieval strategy | Multi-strategy (21x faster) |
178
- | No learning from usage | Feedback loop improves over time |
179
- | No query understanding | Intent detection + NER |
180
- | Limited observability | Full metrics and tracing |
181
-
182
- ---
183
-
184
- ## ๐Ÿ—บ๏ธ Roadmap
185
-
186
- - [ ] Sentence-transformers integration
187
- - [ ] Persistent storage (SQLite, PostgreSQL)
188
- - [ ] Multi-user support
189
- - [ ] REST API server
190
- - [ ] LangChain integration
191
- - [ ] LlamaIndex integration
192
- - [ ] ROS 2 integration (robotics)
193
-
194
- ---
195
-
196
- ## ๐Ÿ“œ License
197
-
198
- MIT License
199
-
200
- ---
201
 
202
- ## ๐Ÿ™ Etymology
 
 
 
 
203
 
204
- Named after **Mnemosyne** (ฮœฮฝฮทฮผฮฟฯƒฯฮฝฮท), the Greek goddess of memory and mother of the nine Muses. In Greek mythology, she was one of the Titans and personified memory itself.
205
 
206
- *Mnemo: Memory that learns.*
 
 
3
  library_name: mnemo
4
  tags:
5
  - memory
6
+ - ai-memory
7
+ - llm-memory
8
+ - semantic-memory
9
  - rag
10
+ - retrieval
11
+ - langchain
12
+ - llamaindex
13
+ - mcp
14
+ - agent-memory
15
+ - chatbot-memory
16
+ - mem0
17
+ - vector-search
18
  - knowledge-graph
 
 
 
 
19
  pipeline_tag: feature-extraction
20
  ---
21
 
22
+ # ๐Ÿง  Mnemo - AI Memory System
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ **Open-source memory for LLMs, chatbots, and AI agents**
25
 
26
+ ## Install
27
 
28
  ```bash
29
+ pip install mnemo-memory
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  ```
31
 
32
+ ## Quick Start
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  ```python
35
  from mnemo import Mnemo
36
 
37
+ memory = Mnemo()
38
+ memory.add("User prefers Python")
39
+ results = memory.search("preferences") # 0.27ms!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ```
41
 
42
+ ## MCP Server (for Claude)
43
 
44
+ ```json
45
+ {
46
+ "mcpServers": {
47
+ "mnemo": {"command": "uvx", "args": ["mnemo-memory"]}
48
+ }
49
+ }
50
  ```
51
 
52
+ ## Benchmarks vs mem0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ | Metric | mem0 | Mnemo |
55
+ |--------|------|-------|
56
+ | Search | 5.73ms | **0.27ms** |
57
+ | API Keys | Required | **None** |
58
+ | Offline | No | **Yes** |
59
 
60
+ ## Links
61
 
62
+ - [Demo](https://huggingface.co/spaces/AthelaPerk/mnemo)
63
+ - [MCP Server](https://huggingface.co/spaces/AthelaPerk/mnemo-mcp)