V3 Memory Unification — скилл для Claude Code: что делает
Сводит семь слоёв памяти агента в один бэкенд AgentDB с индексом HNSW: запись через единый сервис, семантический поиск по векторам.
npx skills add ruvnet/ruflo --skill v3-memory-unification -a claude-codeЧто делает V3 Memory Unification
Скилл переводит разрозненные хранилища памяти агента на общий бэкенд AgentDB с индексом HNSW. В списке семь систем: MemoryManager, DistributedMemorySystem, SwarmMemory, AdvancedMemoryManager, SQLiteBackend, MarkdownBackend и HybridBackend. После переезда запросы идут через UnifiedMemoryService: обычные уходят в AgentDB, семантические в HNSWIndexer.
Внутри три шага. Сначала адаптер AgentDB на 1536 измерений с indexType HNSW. Потом перенос данных: строки из SQLite читаются через getAll, Markdown собирается glob-ом по **/*.md, и каждая запись получает эмбеддинг. Третьим слоем идёт SONA, шаблоны обучения ложатся в ту же память вместе с метаданными режима и награды.
Заявленные цели: поиск быстрее в 150x-12,500x, памяти уходит меньше на 50-75%, отклик короче 100ms на 1M+ записей. Это цифры из спеки скилла, проверять их придётся на своих данных. И главное про зависимости: без генератора эмбеддингов на 1536 измерений миграция не поедет, generateEmbedding вызывается на каждой записи.
Какие задачи решает
- свести семь хранилищ памяти к одному бэкенду
- перенести записи из SQLite и Markdown в AgentDB с эмбеддингами
- ускорить семантический поиск по большой базе памяти
- сохранить обратную совместимость при смене бэкенда
- сложить шаблоны обучения SONA рядом с обычной памятью
Примеры запросов агенту
- Спроектируй стратегию объединения памяти на AgentDB через v3-memory-specialist
- Настрой индекс HNSW на 1536 измерений и перенеси записи из SQLite и Markdown
- Замерь скорость семантического поиска до и после миграции
Как установить V3 Memory Unification
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a claude-code2Вручную: положить файлы
~/.claude/skills/v3-memory-unification/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/v3-memory-unification/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a codex2Вручную: положить файлы
.agents/skills/v3-memory-unification/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a cursor2Вручную: положить файлы
.cursor/skills/v3-memory-unification/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo v3-memory-unification2Вручную: положить файлы
.github/skills/v3-memory-unification/SKILL.md1Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a gemini-cli2Командой платформы
gemini skills install https://github.com/ruvnet/ruflo --path v3/@claude-flow/cli/.claude/skills/v3-memory-unificationВручную: положить файлы
.devin/skills/v3-memory-unification/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill v3-memory-unification -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора104
Весь набор →Похожие
Вопросы о V3 Memory Unification
Как установить V3 Memory Unification в Claude Code?
Выполни npx skills add ruvnet/ruflo --skill v3-memory-unification -a claude-code. Файл скилла появится по пути ~/.claude/skills/v3-memory-unification/SKILL.md.
Что делает V3 Memory Unification?
Собирает несколько хранилищ памяти в AgentDB с индексом HNSW и отвечает на семантические запросы через единый интерфейс. Заодно переносит данные из SQLite и Markdown.
Что нужно, чтобы перенести Markdown в AgentDB?
Генератор эмбеддингов на 1536 измерений: каждая запись индексируется вектором. Индекс строится с efConstruction 200 и M 16.
Исходный текст
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