TITAN Memory: AI That Remembers Like You Do
Turn any AI into a learning companion that remembers across conversations
What is MCP-TITAN??
Think about how you remember things:
💭 Short-term memory - What you heard 5 seconds ago
📝 Long-term memory - Important facts you recall later
🗄️ Deep storage - Things you "just know" from years ago
HOPE (Hierarchical Online Persistent Encoding) is the second generation of TITAN and gives AI this same ability. Instead of forgetting everything after each conversation, it builds up knowledge like a human brain.
The Problem HOPE Solves
Related MCP server: Memory Bank MCP
Key Features
🧠 Three-Tier Memory System
Like your brain, HOPE has multiple memory levels:
Memory Level | What It Stores | How Long | Like Your Brain |
Short-term | Current conversation | Minutes | Working memory - what you just heard |
Long-term | Important patterns | Days/weeks | Consolidated facts - things you studied |
Archive | Core knowledge | Permanent | Deep knowledge - things you "just know" |
Example:
🎯 Smart Forgetting
Not everything deserves to be remembered!
Surprising/novel information → Stored longer
Repeated boring stuff → Forgotten faster
Important patterns → Promoted to long-term storage
This prevents memory bloat and focuses on what matters.
📈 Continuous Learning (Momentum-Based)
Unlike standard AI that's frozen after training:
How it works:
Sees pattern once → Small memory trace
Sees pattern repeatedly → Stronger reinforcement
Contradictory information → Gradual update (not catastrophic overwrite)
This is called momentum learning - changes happen smoothly, preventing the AI from "unlearning" important things.
🔗 Sequence Understanding (Token Flow)
HOPE understands sequences, not just individual facts:
📊 Surprise-Based Attention
HOPE pays attention to what's unexpected:
How It Works (Technical Overview)
The HOPE Architecture
HOPE is based on cutting-edge research in Nested Learning - the idea that learning happens at multiple levels simultaneously:
Core Mechanisms
Continuum Memory System (CMS)
Multi-tier storage with automatic promotion/demotion
Memories move between tiers based on access patterns and surprise
Momentum-Based Updates (from research paper)
M_t = (1 - α) * M_t + S_t Where: - M_t = Memory at time t - α = Forgetting gate (higher for boring stuff) - S_t = Momentum term (accumulated learning)Selective State-Space Filters (Mamba-style)
Efficient sequence processing
Adaptive filtering based on context
Sparse Routing
Not all memories are checked for every query
Routes queries to relevant memory tiers
Installation & Setup
Requirements
Node.js 22+ (required for TensorFlow.js optimizations)
npm or bun package manager
Quick Start
Configuration for Cursor
Add to ~/.cursor/settings.json:
Configuration for Claude Desktop
Open Claude Desktop settings
Add MCP server:
Name: hope-memory
Command:
npxArgs:
-y @henryhawke/mcp-titanWorking Directory: Where you want memories stored (default:
~/.hope_memory)
First Run
Operational Quickstart
Run server:
bun run build && bun start(ornpx @henryhawke/mcp-titan)Initialize tools in order:
init_modelinit_tokenizerstart_learner
Store and recall:
Store:
store_memory { text, type?: episodic|semantic }Recall:
recall { query, topK? }Distill:
distill_memories { memories: number[][] }
Online learning:
Add data:
enqueue_samples(batch of input/target pairs, optional positive/negative)Status:
learner_statusControl:
start_learner,pause_learner,stop_learner
Checkpoints:
Save:
save_checkpoint { path }Auto-export:
export_checkpoint→.hope_memory/checkpointsImport:
import_checkpoint { filename }orload_checkpoint { path }
Health:
health_check --detailedget_hierarchical_metrics,get_momentum_metrics,get_token_flow_metrics
Safety defaults:
Inputs sanitized and length-capped; arrays validated; paths sandboxed
URL bootstrap uses timeouts/size guards
Logs are structured, rotated, redacted
Dumbed Down Getting Started
bun run build && bun startCall
init_model, theninit_tokenizer, thenstart_learnerstore_memoryto save facts;recallto fetch themenqueue_samplesto teach; watchlearner_statusexport_checkpointto back up;import_checkpointto restoreIf stuck:
health_check --detailed
Backward Compatibility
Titan aliases are still exported (e.g.,
TitanMemoryModel→ HOPE)Checkpoints include version + checksum and validate dimensions on load
Usage Examples
Basic Memory Operations
Training HOPE
Online Learning Mode
Available MCP Tools
HOPE exposes 19 tools via the Model Context Protocol:
Memory Management
init_model- Initialize or reconfigure memory systembootstrap_memory- Quick-load context from text or URLget_memory_state- Inspect current memory contentsmemory_stats- Get statistical summaryprune_memory- Clean up low-value memories
Learning Operations
forward_pass- Query memory and get predictiontrain_step- Explicit learning from example pairreset_gradients- Clear training state
Persistence
save_checkpoint- Save memory to fileload_checkpoint- Restore from checkpoint
Online Learning
init_learner- Start background learning servicepause_learner/resume_learner- Control learningget_learner_stats- Monitor learning metricsadd_training_sample- Feed training data
Advanced Metrics
get_token_flow_metrics- Sequence pattern analysisget_hierarchical_metrics- Memory tier distributionhealth_check- System health & performance
Utilities
help- List all available tools with descriptions
See docs/api/README.md for complete API reference.
Real-World Use Cases
1. Personalized Code Assistant
2. Project Context Memory
3. Research Assistant
4. Continuous Learning Chatbot
Performance & Scalability
Benchmarks
Metric | Performance |
Memory initialization | ~100ms |
Forward pass (query) | <50ms (95th percentile) |
Training step | ~75ms |
Checkpoint save/load | ~200ms for 10K memories |
Memory footprint | ~500MB for typical usage |
Capacity
Short-term: 64 slots (fast access)
Long-term: 256 slots (medium access)
Archive: 512 slots (stable storage)
Total: ~800 distinct memory traces
Memories automatically promoted/demoted based on:
Access frequency
Surprise value
Temporal recency
Architecture Deep Dive
For technical users interested in the implementation:
Research Foundation
HOPE implements concepts from:
Nested Learning - Multi-level optimization problems
Continuum Memory Systems - Multi-tier storage with different update frequencies
Retentive Networks - Efficient sequence modeling
Selective State-Space Models (Mamba) - Adaptive filtering
See HOPE.md for the full research paper.
Key Components
Memory State Structure
Development
Build from Source
Project Structure
Running Tests
Roadmap
✅ Implemented (v3.0)
Three-tier continuum memory system
Retentive sequence processing
Selective state-space filters
Memory routing with surprise detection
Hierarchical promotion/demotion
MCP server with 19 tools
Checkpoint save/load
Online learning service
🚧 In Progress (v3.1)
Fix TypeScript compilation errors (42 → 0)
Implement momentum-based updates (Equations 32-33)
Activate forgetting gate mechanism
Token flow tracking
🔮 Planned (v4.0)
Deep neural memory module (MLP-based)
Self-modifying learning
Multi-modal memory (text + code + images)
Distributed memory across multiple servers
Fine-grained access control
See PLAN.md for detailed implementation plan.
Troubleshooting
"Module not found" errors
Memory leaks during long sessions
TypeScript compilation errors
Current known issue (being fixed in v3.1). To use despite errors:
Slow performance
Contributing
Contributions welcome! Areas needing help:
Fixing TypeScript errors - See
docs/typescript-error-resolution-guide.mdImplementing momentum updates - See
PLAN.mdPhase 1, Task 1.1Documentation improvements - Make HOPE more accessible
Test coverage - Current ~60%, target 80%+
Development Workflow
Fork the repo
Create feature branch:
git checkout -b feature/amazing-featureMake changes and test:
bun testCommit:
git commit -m 'Add amazing feature'Push:
git push origin feature/amazing-featureOpen Pull Request
See CONTRIBUTING.md for detailed guidelines.
Research & Citations
If you use HOPE in research, please cite:
Related Work
Transformer-XL - Segmented recurrence for long sequences
Retentive Networks - Efficient alternatives to attention
Mamba - Selective state-space models
Test-Time Training (TTT) - Online learning in neural networks
Fast Weight Programmers - Dynamic weight updates
License
MIT License - See LICENSE file
Support & Community
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: docs/
Email: support@henryhawke.dev
FAQ
Q: How is this different from RAG (Retrieval-Augmented Generation)?
A: RAG fetches external documents; HOPE builds internal neural memory.
Feature | RAG | HOPE |
Storage | External vector DB | Internal neural tensors |
Learning | No learning (just retrieval) | Continuous learning with momentum |
Forgetting | Never forgets (stores all) | Smart forgetting (prunes low-value) |
Context | Retrieved documents | Learned patterns |
Speed | Slower (external lookup) | Faster (in-memory) |
Q: Does HOPE replace fine-tuning?
A: No, complementary. Fine-tuning = pre-training knowledge. HOPE = session-specific learning.
Q: How much memory does HOPE use?
A: ~500MB typical, configurable. Reduce by lowering tier capacities.
Q: Can HOPE run on CPU?
A: Yes! Uses TensorFlow.js Node backend (CPU). GPU optional but not required.
Q: Is my data private?
A: Yes. HOPE runs locally, memories stored on your disk (~/.hope_memory). No cloud upload.
Made with ❤️ by the HOPE team
Turn your AI into a learning companion that grows with you.