| # 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* | |