v3-memory-unification
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).
Install
mkdir -p .claude/skills/v3-memory-unification && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3430" && unzip -o skill.zip -d .claude/skills/v3-memory-unification && rm skill.zipInstalls to .claude/skills/v3-memory-unification
About this skill
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
# 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
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
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
// AgentDB adapter setup
const agentdb = new AgentDBAdapter({
dimensions: 1536,
indexType: 'HNSW',
speedupTarget: '150x-12500x'
});
Phase 2: Data Migration
// 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
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
More by ruvnet
View all skills by ruvnet →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversDesktop Commander MCP unifies code management with advanced source control, git, and svn support—streamlining developmen
Easily access and modify notes in your Obsidian vaults using a REST API. Integrate Obsidian features seamlessly into you
1MCP Agent simplifies configuration management by unifying MCP servers, lowering resource use, and enabling dynamic conf
AI Memory is a production-ready vector database server that manages and retrieves contextual knowledge with advanced sem
Fast Filesystem offers memory-efficient file operations, compress to zip or rar format, with backup and editing. Try wit
Agent Knowledge MCP: Model Context Protocol server combining an Elasticsearch knowledge base with file ops, document val
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.