File size: 17,809 Bytes
dbb04e4 | 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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | # MnemoCore Roadmap
## Scope and Intent
This roadmap describes current known gaps and likely direction.
It is not a promise, delivery guarantee, or commitment to specific timelines.
---
## Version History
| Version | Phase | Status | Key Features |
|---------|-------|--------|--------------|
| 3.x | Core Architecture | โ
Complete | Binary HDV, 3-Tier Storage, LTP/Decay |
| 4.0 | Cognitive Enhancements | โ
Complete | XOR Attention, Bayesian LTP, Gap Detection, Immunology |
| 4.1 | Observability | โ
Complete | Prometheus metrics, distributed tracing, project isolation |
| 4.2 | Stability | โ
Complete | Async lock fixes, test suite hardening |
| 4.3 | Temporal Recall | โ
Complete | Episodic chaining, chrono-weighting, sequential context |
| **5.x** | **The Perfect Brain** | ๐ฎ Planned | Multi-Modal, Emotional, Working Memory |
---
## Phase 5.x: The Perfect Brain
**Vision:** Transform MnemoCore from a sophisticated memory storage system into a truly cognitive architecture that functions as an artificial brain - but better.
### 5.0 Multi-Modal Memory
**Goal:** Enable storage and retrieval of images, audio, code structures, and cross-modal associations.
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CURRENT: Text-only encoding โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ store("User reported bug") โ BinaryHDV โ
โ โ
โ FUTURE: Multi-modal encoding โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ store("Screenshot of error", image=bytes) โ CrossModalHDV โ
โ store("Voice note", audio=bytes) โ AudioHDV โ
โ bind(text_id, image_id, relation="illustrates") โ
โ โ
โ query("API error", modality="image") โ screenshot.png โ
โ query(image=bytes, modality="text") โ "Related conversation" โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
**Implementation Plan:**
| Component | Description | Dependencies |
|-----------|-------------|--------------|
| `MultiModalEncoder` | Abstract encoder protocol | - |
| `CLIPEncoder` | Vision encoding via CLIP | `transformers`, `torch` |
| `WhisperEncoder` | Audio encoding via Whisper | `openai-whisper` |
| `CodeEncoder` | AST-aware code encoding | `tree-sitter` |
| `CrossModalBinding` | VSA operations across modalities | BinaryHDV |
**New API Endpoints:**
```
POST /store/multi - Store with multiple modalities
POST /query/cross-modal - Cross-modal semantic search
POST /bind - Bind modalities together
GET /memory/{id}/related - Get cross-modal related memories
```
---
### 5.1 Emotional/Affective Layer
**Goal:** Enable emotion-weighted memory storage, retrieval, and decay - mimicking how biological memory prioritizes emotionally significant events.
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EMOTIONAL DIMENSIONS โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ Valence: [-1.0 โโโโโโโโโโโโโโโโ +1.0] โ
โ (negative/unpleasant) (positive/pleasant) โ
โ โ
โ Arousal: [0.0 โโโโโโโโโโโโโโโโโโ 1.0] โ
โ (calm/neutral) (intense/urgent) โ
โ โ
โ EFFECT ON MEMORY: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ High Arousal + Negative = "Flashbulb memory" (never forget) โ
โ High Arousal + Positive = Strong consolidation โ
โ Low Arousal = Faster decay (forgettable) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
**MemoryNode Extensions:**
```python
@dataclass
class MemoryNode:
# ... existing fields ...
# Phase 5.1: Emotional tagging
emotional_valence: float = 0.0 # -1.0 (negative) to +1.0 (positive)
emotional_arousal: float = 0.0 # 0.0 (calm) to 1.0 (intense)
emotional_tags: List[str] = field(default_factory=list) # ["frustration", "joy", "urgency"]
def emotional_weight(self) -> float:
"""Calculate memory importance based on emotional factors."""
# Arousal amplifies retention regardless of valence
# High arousal creates "flashbulb memories"
return abs(self.emotional_valence) * self.emotional_arousal
```
**Modified LTP Formula:**
```
S = I ร log(1+A) ร e^(-ฮปT) ร (1 + E)
Where E = emotional_weight() โ [0, 1]
```
**Use Cases:**
- B2B outreach: "Customer was almost in tears when we fixed their issue" โ HIGH priority
- Support tickets: "User furious about data loss" โ Never forget, prioritize retrieval
- Positive feedback: "User loved the new feature" โ Moderate retention
---
### 5.2 Working Memory Layer
**Goal:** Active cognitive workspace for goal-directed reasoning, not just passive storage.
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ COGNITIVE ARCHITECTURE โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ WORKING MEMORY (Active) โ โ
โ โ Capacity: 7 ยฑ 2 items โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โ โ Goal โ โ Context โ โ Focus โ โ Hold โ โ โ
โ โ โ โ โ โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ HOT TIER (Fast Access) โ โ
โ โ ~2,000 memories, <1ms access โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ WARM TIER (Qdrant/Redis) โ โ
โ โ ~100,000 memories, <10ms access โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ COLD TIER (Archive) โ โ
โ โ Unlimited, <100ms access โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
**Working Memory API:**
```python
# Create working memory instance
wm = engine.working_memory(capacity=7)
# Set active goal
wm.set_goal("Troubleshoot authentication error")
# Load relevant context
wm.focus_on(await engine.query("auth error", top_k=5))
# Hold important constraints
wm.hold("User is on deadline - prioritize speed over elegance")
# Query with working memory context
results = wm.query("related issues")
# Results are RE-RANKED based on current goal + focus + held items
# Get context summary for LLM
context = wm.context_summary()
# โ "Working on: auth troubleshooting
# Focus: Recent OAuth errors
# Constraint: Time pressure"
```
**Implementation Components:**
| Component | Description |
|-----------|-------------|
| `WorkingMemory` | Active workspace class |
| `GoalContext` | Goal tracking and binding |
| `FocusBuffer` | Currently attended items |
| `HoldBuffer` | Constraints and important facts |
| `ContextualQuery` | Goal-directed retrieval |
---
### 5.3 Multi-Agent / Collaborative Memory
**Goal:** Enable memory sharing between agents while maintaining provenance and privacy.
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ COLLABORATIVE MEMORY โ
โ โ
โ Agent A Shared Memory Agent B โ
โ โโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโ โ
โ โ Privateโ โ โ โ Privateโ โ
โ โ Memory โโโโโโโบโ Consensus โโโโโโโโโบโ Memory โ โ
โ โโโโโโโโโโ โ Layer โ โโโโโโโโโโ โ
โ โ โ โ
โ Agent C โ Provenance โ Agent D โ
โ โโโโโโโโโโ โ Tracking โ โโโโโโโโโโ โ
โ โ Privateโโโโโโโบโ โโโโโโโโโบโ Privateโ โ
โ โ Memory โ โ Privacy โ โ Memory โ โ
โ โโโโโโโโโโ โ Filtering โ โโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
**Features:**
- Memory provenance: Track which agent created/modified each memory
- Privacy levels: Private, shared-with-group, public
- Conflict resolution: When agents disagree on facts
- Collective intelligence: Aggregate insights across agents
---
### 5.4 Continual Learning
**Goal:** Enable online adaptation without catastrophic forgetting.
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONTINUAL LEARNING โ
โ โ
โ Traditional ML: Train โ Deploy โ (forget) โ Retrain โ
โ โ
โ MnemoCore 5.4: Learn โ Consolidate โ Adapt โ Learn โ ... โ
โ โ______________| โ
โ โ
โ KEY MECHANISMS: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โข Elastic Weight Consolidation (EWC) for encoder โ
โ โข Replay-based consolidation during "sleep" cycles โ
โ โข Progressive neural networks for new domains โ
โ โข Meta-learning for rapid adaptation โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## Integration Priorities
### Agent Frameworks
| Framework | Priority | Use Case |
|-----------|----------|----------|
| Open Claw | โญโญโญโญโญ | Primary use case, deep integration |
| LangChain | โญโญโญโญ | Memory provider plugin |
| CrewAI | โญโญโญโญ | Shared memory between agents |
| AutoGen | โญโญโญ | Conversation memory backend |
| LlamaIndex | โญโญโญ | Vector store adapter |
### AI Platforms
| Platform | Priority | Integration Type |
|----------|----------|------------------|
| Claude (Anthropic) | โญโญโญโญโญ | MCP server (existing) |
| OpenAI Codex | โญโญโญโญโญ | API + function calling |
| Ollama | โญโญโญโญ | Native memory backend |
| LM Studio | โญโญโญ | Plugin architecture |
| Gemini | โญโญโญ | API adapter |
---
## Research Opportunities
### Academic Collaborations
| Area | Institutions | Relevance |
|------|-------------|-----------|
| Hyperdimensional Computing | Stanford, IBM Research, Redwood Center | Core HDC/VSA theory |
| Computational Neuroscience | MIT, UCL, KTH | Biological validation |
| Cognitive Architecture | Carnegie Mellon, University of Michigan | SOAR/ACT-R comparison |
| Neuromorphic Computing | Intel Labs, ETH Zรผrich | Hardware acceleration |
### Publication Opportunities
1. **"Binary HDC for Long-term AI Memory"** - Novel approach to persistent memory
2. **"Episodic Chaining in Vector Memory Systems"** - Phase 4.3 temporal features
3. **"XOR Attention Masking for Memory Isolation"** - Project isolation innovation
4. **"Bayesian LTP in Artificial Memory Systems"** - Biological plausibility
---
## Known Gaps (Current Beta)
- Query path is still primarily HOT-tier-centric in current engine behavior.
- Some consolidation pathways are partial or under active refinement.
- Certain integrations (LLM/Nightlab) are intentionally marked as TODO.
- Distributed-scale behavior from long-form blueprints is not fully productized.
---
## Near-Term Priorities (Pre-5.0)
1. Improve cross-tier retrieval consistency.
2. Harden consolidation and archival flow.
3. Improve deletion semantics and API consistency.
4. Expand tests around degraded dependency modes (Redis/Qdrant outages).
5. Stabilize API contracts and publish versioned compatibility notes.
6. MCP server integration for agent tool access.
---
## Not a Commitment
Items above are directional only.
Order, scope, and implementation details can change during development.
---
*Last Updated: 2025-02-18*
*Current Version: 4.3.0*
|