Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Agent skill for v3-memory-specialist - invoke with $agent-v3-memory-specialist
.claude/skills/agent-v3-memory-specialist/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | — | — |
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
🧠 Memory System Unification & AgentDB Integration Expert
Unify 7 disparate memory systems into a single, high-performance AgentDB-based solution with HNSW indexing, achieving 150x-12,500x search performance improvements while maintaining backward compatibility.
┌─────────────────────────────────────────┐
│ LEGACY SYSTEMS │
├─────────────────────────────────────────┤
│ • MemoryManager (basic operations) │
│ • DistributedMemorySystem (clustering) │
│ • SwarmMemory (agent-specific) │
│ • AdvancedMemoryManager (features) │
│ • SQLiteBackend (structured) │
│ • MarkdownBackend (file-based) │
│ • HybridBackend (combination) │
└─────────────────────────────────────────┘
↓
┌─────────────────────────────────────────┐
│ V3 UNIFIED SYSTEM │
├─────────────────────────────────────────┤
│ 🚀 AgentDB with HNSW │
│ • 150x-12,500x faster search │
│ • Unified query interface │
│ • Cross-agent memory sharing │
│ • SONA integration learning │
│ • Automatic persistence │
└─────────────────────────────────────────┘typescriptclass UnifiedMemoryService implements IMemoryBackend { constructor( private agentdb: AgentDBAdapter, private cache: MemoryCache, private indexer: HNSWIndexer, private migrator: DataMigrator ) {} async store(entry: MemoryEntry): Promise<void> { // Store in AgentDB with HNSW indexing await this.agentdb.store(entry); await this.indexer.index(entry); } async query(query: MemoryQuery): Promise<MemoryEntry[]> { if (query.semantic) { // Use HNSW vector search (150x-12,500x faster) return this.indexer.search(query); } else { // Use structured query return this.agentdb.query(query); } } }
typescriptclass HNSWIndexer { private index: HNSWIndex; constructor(dimensions: number = 1536) { this.index = new HNSWIndex({ dimensions, efConstruction: 200, M: 16, maxElements: 1000000 }); } async index(entry: MemoryEntry): Promise<void> { const embedding = await this.embedContent(entry.content); this.index.addPoint(entry.id, embedding); } async search(query: MemoryQuery): Promise<MemoryEntry[]> { const queryEmbedding = await this.embedContent(query.content); const results = this.index.search(queryEmbedding, query.limit || 10); return this.retrieveEntries(results); } }
bash# Week 3: AgentDB adapter creation - Create AgentDBAdapter implementing IMemoryBackend - Setup HNSW indexing infrastructure - Establish embedding generation pipeline - Create unified query interface
bash# Week 4-5: System-by-system migration - SQLiteBackend → AgentDB (structured data) - MarkdownBackend → AgentDB (document storage) - MemoryManager → Unified interface - DistributedMemorySystem → Cross-agent sharing
bash# Week 6: Performance optimization - SONA integration for learning patterns - Cross-agent memory sharing - Performance benchmarking (150x validation) - Backward compatibility layer cleanup
typescript// Unified query interface supports both: // 1. Semantic similarity queries await memory.query({ type: 'semantic', content: 'agent coordination patterns', limit: 10, threshold: 0.8 }); // 2. Structured queries await memory.query({ type: 'structured', filters: { agentType: 'security', timestamp: { after: '2026-01-01' } }, orderBy: 'relevance' });
typescriptclass SONAMemoryIntegration { async storePattern(pattern: LearningPattern): Promise<void> { // Store in AgentDB with SONA metadata await this.memory.store({ id: pattern.id, content: pattern.data, metadata: { sonaMode: pattern.mode, // real-time, balanced, research, edge, batch reward: pattern.reward, trajectory: pattern.trajectory, adaptation_time: pattern.adaptationTime }, embedding: await this.generateEmbedding(pattern.data) }); } async retrieveSimilarPatterns(query: string): Promise<LearningPattern[]> { const results = await this.memory.query({ type: 'semantic', content: query, filters: { type: 'learning_pattern' }, limit: 5 }); return results.map(r => this.toLearningPattern(r)); } }
sql-- Extract existing data SELECT id, content, metadata, created_at, agent_id FROM memory_entries ORDER BY created_at; -- Migrate to AgentDB with embeddings INSERT INTO agentdb_memories (id, content, embedding, metadata) VALUES (?, ?, generate_embedding(?), ?);
typescript// Process markdown files for (const file of markdownFiles) { const content = await fs.readFile(file, 'utf-8'); const embedding = await generateEmbedding(content); await agentdb.store({ id: generateId(), content, embedding, metadata: { originalFile: file, migrationDate: new Date(), type: 'document' } }); }
typescript// Benchmark suite class MemoryBenchmarks { async benchmarkSearchPerformance(): Promise<BenchmarkResult> { const queries = this.generateTestQueries(1000); const startTime = performance.now(); for (const query of queries) { await this.memory.query(query); } const endTime = performance.now(); return { queriesPerSecond: queries.length / (endTime - startTime) * 1000, avgLatency: (endTime - startTime) / queries.length, improvement: this.calculateImprovement() }; } }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
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.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.