v2/docs/integrations/reasoningbank/MIGRATION-v1.5.13.md
Claude-Flow has been updated to use [email protected] with the Node.js backend for ReasoningBank, replacing the previous WASM adapter approach.
Before (v1.5.12 - WASM):
After (v1.5.13 - Node.js):
.swarm/memory.db✅ No breaking changes to external API - All claude-flow memory functions remain the same:
storeMemory(key, value, options)queryMemories(searchQuery, options)listMemories(options)getStatus()initializeReasoningBank()Storage:
// Old (WASM)
pattern = { task_description, task_category, strategy, success_score }
await wasm.storePattern(pattern)
// New (Node.js)
memory = { type: 'reasoning_memory', pattern_data: { title, content, domain } }
ReasoningBank.db.upsertMemory(memory)
await ReasoningBank.computeEmbedding(content) // Generate embeddings
Retrieval:
// Old (WASM)
results = await wasm.findSimilar(query, category, limit)
// New (Node.js)
results = await ReasoningBank.retrieveMemories(query, {
domain, agent, k: limit, minConfidence
})
Location: .swarm/memory.db
Tables:
patterns - Reasoning memories with confidence scorespattern_embeddings - Vector embeddings for semantic searchpattern_links - Memory relationships and contradictionstask_trajectories - Task execution historymatts_runs - MaTTS algorithm runsconsolidation_runs - Memory consolidation historyWhen you upgrade to v2.7.0-alpha.7+, ReasoningBank will automatically:
.swarm/memory.dbNo manual migration needed! Old WASM data was ephemeral and not persisted.
# Optional: Custom database path
export CLAUDE_FLOW_DB_PATH="/path/to/memory.db"
# Optional: Disable ReasoningBank
export REASONINGBANK_ENABLED=false
| Feature | WASM (v1.5.12) | Node.js (v1.5.13) |
|---|---|---|
| Storage | Ephemeral (in-memory) | Persistent (SQLite) |
| Semantic Search | Basic similarity | Embeddings + MMR ranking |
| Domain Filtering | Category-based | Full JSON query support |
| Memory Consolidation | ❌ Not available | ✅ Built-in |
| Trajectory Tracking | ❌ Not available | ✅ Full history |
| Cross-session Memory | ❌ Lost on restart | ✅ Persistent |
| Performance | 0.04ms/op (WASM) | 1-2ms/op (SQLite + embeddings) |
| Database Size | ~0 MB (memory) | Grows with data (~41MB for 100 patterns) |
Benchmarks (100 memories, semantic search):
Storage: 1-2ms per memory (includes embedding generation)
Query: 1-3ms per semantic search query
Cached: <1ms for cached queries
List: <1ms for database queries
Memory Usage:
Test your ReasoningBank integration:
# Run comprehensive test
node tests/test-semantic-search.mjs
# Expected output:
# ✅ Initialized successfully
# ✅ Stored 5 test memories
# ✅ Semantic search returning results
# ✅ Query caching working
# Ensure initialization ran
npx claude-flow@alpha memory status
# Manually initialize if needed
npx claude-flow@alpha memory init
# Check embeddings are being generated
# Look for warnings: "[ReasoningBank] Failed to generate embedding"
# Verify database has embeddings:
sqlite3 .swarm/memory.db "SELECT COUNT(*) FROM pattern_embeddings;"
# Ensure API key is set (if using Claude embeddings)
export ANTHROPIC_API_KEY=$YOUR_API_KEY
# Or configure alternative embedding provider in .reasoningbank.json
✅ Persistent Memory - Survives process restarts ✅ Semantic Search - True embedding-based similarity ✅ Memory Consolidation - Deduplicate and prune old memories ✅ Trajectory Tracking - Full task execution history ✅ Production-Ready - Battle-tested SQLite backend
If you need to temporarily rollback to v1.5.12:
npm install [email protected] --legacy-peer-deps
Note: This will lose Node.js backend features and return to ephemeral storage.
For issues or questions:
/docs/integrations/reasoningbank//tests/test-semantic-search.mjsMigration completed: Claude-Flow v2.7.0-alpha.7 with [email protected] Node.js backend ✅