V3 Memory Unification — Claude Code skill: what it does, install
Pushes seven separate memory layers onto one AgentDB store with an HNSW index, then answers semantic queries through a single service.
npx skills add ruvnet/ruflo --skill v3-memory-unification -a claude-codeWhat V3 Memory Unification does
The skill moves an agent's scattered memory layers onto one AgentDB backend with HNSW indexing. Seven systems go in: MemoryManager, DistributedMemorySystem, SwarmMemory, AdvancedMemoryManager, SQLiteBackend, MarkdownBackend and HybridBackend. Queries afterwards pass through UnifiedMemoryService, which routes plain lookups to AgentDB and semantic ones to HNSWIndexer.
The work splits into steps. First the AgentDB adapter at 1536 dimensions with indexType HNSW. Then the migration: SQLite rows read through getAll, Markdown files picked up by a **/*.md glob, every record given an embedding. A third layer stores SONA learning patterns in the same memory with mode and reward metadata.
Search speed is quoted at 150x-12,500x, memory use at 50-75% lower, queries under 100ms across 1M+ entries. Treat those as targets to validate on your own data. The constraint that bites first is embeddings: nothing migrates without a 1536-dimension embedding function, since generateEmbedding runs on each record.
What it helps with
- collapse seven memory stores into one backend
- migrate SQLite and Markdown records into AgentDB with embeddings
- speed up semantic search over a large memory store
- keep backward compatibility while swapping the backend
- keep SONA learning patterns next to regular memory
Example prompts for the agent
- Design an AgentDB unification strategy for the memory layer with v3-memory-specialist
- Set up HNSW indexing at 1536 dimensions and migrate the SQLite and Markdown records
- Measure semantic search speed before and after the migration
How to install V3 Memory Unification
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a claude-code2Manually: put the files in place
~/.claude/skills/v3-memory-unification/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/v3-memory-unification/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a codex2Manually: put the files in place
.agents/skills/v3-memory-unification/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a cursor2Manually: put the files in place
.cursor/skills/v3-memory-unification/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo v3-memory-unification2Manually: put the files in place
.github/skills/v3-memory-unification/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path v3/@claude-flow/cli/.claude/skills/v3-memory-unificationManually: put the files in place
.devin/skills/v3-memory-unification/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about V3 Memory Unification
How do I install V3 Memory Unification in Claude Code?
Run npx skills add ruvnet/ruflo --skill v3-memory-unification -a claude-code. The skill lands at ~/.claude/skills/v3-memory-unification/SKILL.md.
What does V3 Memory Unification do?
It consolidates several memory systems into AgentDB with HNSW vector search and serves semantic queries through one interface. It also carries data over from SQLite and Markdown.
What is required to migrate Markdown into AgentDB?
An embedding generator at 1536 dimensions, because each record is indexed as a vector. The HNSW index uses efConstruction 200 and M 16.
Source text
SKILL.md · MIT
---
name: "V3 Memory Unification"
description: "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)."
---
# V3 Memory Unification
## What This Skill Does
Consolidates disparate memory systems into unified AgentDB backend with HNSW vector search, achieving 150x-12,500x search performance improvements while maintaining backward compatibility.
## Quick Start
```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")
```
## Systems to Unify
### Legacy Systems → AgentDB
```
┌─────────────────────────────────────────┐
│ • 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 │
└─────────────────────────────────────────┘
```
## Implementation Architecture
### Unified Memory Service
```typescript
class 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);
}
}
```
### HNSW Vector Search
```typescript
class 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);
}
}
```
## Migration Strategy
### Phase 1: Foundation
```typescript
// AgentDB adapter setup
const agentdb = new AgentDBAdapter({
dimensions: 1536,
indexType: 'HNSW',
speedupTarget: '150x-12500x'
});
```
### Phase 2: Data Migration
```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 }
});
}
};
```
## SONA Integration
### Learning Pattern Storage
```typescript
class 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' }
});
}
}
```
## Performance Targets
- **Search Speed**: 150x-12,500x improvement via HNSW
- **Memory Usage**: 50-75% reduction through optimization
- **Query Latency**: <100ms for 1M+ entries
- **Cross-Agent Sharing**: Real-time memory synchronization
- **SONA Integration**: <0.05ms adaptation time
## Success Metrics
- [ ] All 7 legacy memory systems migrated to AgentDB
- [ ] 150x-12,500x search performance validated
- [ ] 50-75% memory usage reduction achieved
- [ ] Backward compatibility maintained
- [ ] SONA learning patterns integrated
- [ ] Cross-agent memory sharing operational
© ruvnet · MIT · ruvnet/ruflo