Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Unify 6+ memory systems into AgentDB with HNSW indexing for 150x-12,500x search improvements. Implements ADR-006 (Unified Memory Service) and ADR-009 (Hybrid Memory Backend).
.claude/skills/ruvnet-v3-memory-unification/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 27% | 0% |
Consolidates disparate memory systems into unified AgentDB backend with HNSW vector search, achieving 150x-12,500x search performance improvements while maintaining backward compatibility.
bash# Initialize memory unification Task("Memory architecture", "Design AgentDB unification strategy", "v3-memory-specialist") # AgentDB integration Task("AgentDB setup", "Configure HNSW indexing and vector search", "v3-memory-specialist") # Data migration Task("Memory migration", "Migrate SQLite/Markdown to AgentDB", "v3-memory-specialist")
┌─────────────────────────────────────────┐
│ • MemoryManager (basic operations) │
│ • DistributedMemorySystem (clustering) │
│ • SwarmMemory (agent-specific) │
│ • AdvancedMemoryManager (features) │
│ • SQLiteBackend (structured) │
│ • MarkdownBackend (file-based) │
│ • HybridBackend (combination) │
└─────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ 🚀 AgentDB with HNSW │
│ • 150x-12,500x faster search │
│ • Unified query interface │
│ • Cross-agent memory sharing │
│ • SONA learning integration │
└─────────────────────────────────────────┘typescriptclass UnifiedMemoryService implements IMemoryBackend { constructor( private agentdb: AgentDBAdapter, private indexer: HNSWIndexer, private migrator: DataMigrator ) {} async store(entry: MemoryEntry): Promise<void> { await this.agentdb.store(entry); await this.indexer.index(entry); } async query(query: MemoryQuery): Promise<MemoryEntry[]> { if (query.semantic) { return this.indexer.search(query); // 150x-12,500x faster } return this.agentdb.query(query); } }
typescriptclass HNSWIndexer { constructor(dimensions: number = 1536) { this.index = new HNSWIndex({ dimensions, efConstruction: 200, M: 16, speedupTarget: '150x-12500x' }); } async search(query: MemoryQuery): Promise<MemoryEntry[]> { const embedding = await this.embedContent(query.content); const results = this.index.search(embedding, query.limit || 10); return this.retrieveEntries(results); } }
typescript// AgentDB adapter setup const agentdb = new AgentDBAdapter({ dimensions: 1536, indexType: 'HNSW', speedupTarget: '150x-12500x' });
typescript// SQLite → AgentDB const migrateFromSQLite = async () => { const entries = await sqlite.getAll(); for (const entry of entries) { const embedding = await generateEmbedding(entry.content); await agentdb.store({ ...entry, embedding }); } }; // Markdown → AgentDB const migrateFromMarkdown = async () => { const files = await glob('**/*.md'); for (const file of files) { const content = await fs.readFile(file, 'utf-8'); await agentdb.store({ id: generateId(), content, embedding: await generateEmbedding(content), metadata: { originalFile: file } }); } };
typescriptclass SONAMemoryIntegration { async storePattern(pattern: LearningPattern): Promise<void> { await this.memory.store({ id: pattern.id, content: pattern.data, metadata: { sonaMode: pattern.mode, reward: pattern.reward, adaptationTime: pattern.adaptationTime }, embedding: await this.generateEmbedding(pattern.data) }); } async retrieveSimilarPatterns(query: string): Promise<LearningPattern[]> { return this.memory.query({ type: 'semantic', content: query, filters: { type: 'learning_pattern' } }); } }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | pass→pass | 13,288 | 11,167 | -16% | 1 | 1 | 0% | 2,712 | 3,655 | +35% | 0 | 0 | — |
case-16 | pass→pass | 14,420 | 15,756 | +9% | 1 | 1 | 0% | 2,779 | 4,069 | +46% | 0 | 0 | — |
case-01 | fail→pass | 18,062 | 14,518 | -20% | 1 | 1 | 0% | 3,083 | 4,435 | +44% | 0 | 0 | — |
case-02 | fail→pass | 26,327 | 22,256 | -15% | 1 | 1 | 0% | 5,668 | 6,602 | +16% | 0 | 0 | — |
case-03 | fail→pass | 19,222 | 11,291 | -41% | 1 | 1 | 0% | 3,663 | 3,699 | +1% | 0 | 0 | — |
case-04 | pass→pass | 12,008 | 7,321 | -39% | 1 | 1 | 0% | 2,334 | 2,746 | +18% | 0 | 0 | — |
case-05 | fail→pass | 9,854 | 2,842 | -71% | 1 | 1 | 0% | 1,597 | 1,772 | +11% | 0 | 0 | — |
case-06 | fail→fail | 27,991 | 9,237 | -67% | 1 | 1 | 0% | 905 | 3,277 | +262% | 0 | 0 | — |
case-07 | fail→pass | 15,773 | 11,926 | -24% | 1 | 1 | 0% | 3,171 | 4,019 | +27% | 0 | 0 | — |
case-08 | fail→fail | 15,416 | 13,709 | -11% | 1 | 1 | 0% | 3,305 | 4,489 | +36% | 0 | 0 | — |
case-09 | fail→pass | 16,619 | 16,967 | +2% | 1 | 1 | 0% | 3,436 | 5,152 | +50% | 0 | 0 | — |
case-10 | fail→pass | 9,916 | 3,380 | -66% | 1 | 1 | 0% | 1,854 | 1,922 | +4% | 0 | 0 | — |
case-11 | fail→pass | 15,289 | 8,326 | -46% | 1 | 1 | 0% | 3,330 | 3,118 | -6% | 0 | 0 | — |
case-12 | fail→pass | 6,953 | 2,213 | -68% | 1 | 1 | 0% | 1,257 | 1,651 | +31% | 0 | 0 | — |
case-13 | fail→pass | 16,942 | 10,012 | -41% | 1 | 1 | 0% | 2,723 | 3,205 | +18% | 0 | 0 | — |
case-14 | fail→fail | 14,331 | 10,377 | -28% | 1 | 1 | 0% | 2,738 | 3,399 | +24% | 0 | 0 | — |
case-17 | pass→pass | 9,651 | 5,526 | -43% | 1 | 1 | 0% | 1,932 | 2,315 | +20% | 0 | 0 | — |
case-18 | fail→pass | 13,110 | 13,929 | +6% | 1 | 1 | 0% | 2,875 | 4,567 | +59% | 0 | 0 | — |
case-19 | pass→pass | 18,093 | 15,394 | -15% | 1 | 1 | 0% | 2,910 | 4,003 | +38% | 0 | 0 | — |
case-20 | fail→pass | 16,016 | 1,843 | -88% | 1 | 1 | 0% | 2,812 | 1,640 | -42% | 0 | 0 | — |
case-21 | fail→fail | 15,532 | 12,668 | -18% | 1 | 1 | 0% | 2,681 | 3,582 | +34% | 0 | 0 | — |
case-22 | fail→pass | 7,841 | 3,116 | -60% | 1 | 1 | 0% | 1,338 | 1,852 | +38% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.