quick-reference.md•8.38 kB
# Quick Reference: Memory Systems Research
**Last Updated**: 2025-10-20
---
## 🎯 One-Minute Summary
Research completed on 4 memory systems for v2:
1. **AgentDB**: 2-3ms retrieval, SQLite-based, 20 MCP tools
2. **ReasoningBank**: +34% effectiveness, Bayesian learning, self-improving
3. **Claude Skills**: Progressive disclosure, automatic generation, composable
4. **Context Engineering**: 20K+ token savings, 5-layer architecture
**Recommendation**: Implement all four in 3 phases over 12 weeks.
---
## 📊 Key Numbers
| Technology | Primary Metric | Benchmark |
|------------|---------------|-----------|
| AgentDB | Retrieval Speed | 2-3ms @ 100K patterns |
| ReasoningBank | Effectiveness Gain | +34.2% |
| Skills | Token Overhead | Few dozen per skill |
| Context Eng | Token Savings | 20,000+ tokens |
---
## 🚀 Quick Start Commands
### AgentDB Setup
```bash
npm install agentdb sqlite3 sqlite-vec
npx agentdb benchmark --quick
```
### ReasoningBank Import
```bash
npm install agentic-flow
```
```javascript
import * as reasoningbank from 'agentic-flow/reasoningbank';
```
### Context Optimization
```bash
# Minimize CLAUDE.md to <5K tokens
# Create /prime commands:
/prime-bug # Bug investigation
/prime-feature # Feature development
/prime-refactor # Refactoring tasks
/prime-research # Research and analysis
```
### Skills Framework
```yaml
# SKILL.md format
---
name: unique-skill-identifier
description: Purpose of skill
---
# Skill Name
[Instructions here]
```
---
## 📋 Implementation Checklist
### Phase 1: Foundation (Weeks 1-3) ✅ HIGH PRIORITY
- [ ] Install AgentDB + dependencies
- [ ] Set up SQLite + sqlite-vec
- [ ] Implement 20 MCP memory tools
- [ ] Minimize CLAUDE.md to <5K tokens
- [ ] Create 4 /prime commands
- [ ] Measure baseline performance
- [ ] Achieve 20K+ token reduction
### Phase 2: Learning (Weeks 4-7) ✅ HIGH PRIORITY
- [ ] Import agentic-flow/reasoningbank
- [ ] Build STORE→EMBED→QUERY→RANK→LEARN pipeline
- [ ] Configure 6 thinking modes
- [ ] Set up Bayesian confidence updates
- [ ] Implement 5-layer context architecture
- [ ] Create 50-100 seed patterns
- [ ] Test pattern learning effectiveness
### Phase 3: Skills (Weeks 8-12) ⚠️ MEDIUM PRIORITY
- [ ] Adopt SKILL.md format
- [ ] Build skill-creator
- [ ] Implement progressive disclosure
- [ ] Enable skill composition
- [ ] Test cross-platform compatibility
- [ ] Create skill validation framework
---
## ⚡ Performance Targets
### Retrieval Performance
- **Target**: <5ms @ 100K patterns
- **Measure**: P50, P95, P99 latency
- **Baseline**: AgentDB 2-3ms
### Learning Effectiveness
- **Target**: +30% task success rate
- **Measure**: Before/after comparison
- **Baseline**: ReasoningBank +34.2%
### Token Efficiency
- **Target**: 20,000+ reduction
- **Measure**: Average tokens per task
- **Baseline**: Context engineering proven
### Pattern Quality
- **Target**: 84% confidence @ 20 uses
- **Measure**: Convergence rate
- **Baseline**: Bayesian updates validated
---
## 🔧 Technology Stack
### Core Dependencies
```json
{
"agentdb": "latest",
"agentic-flow": "latest",
"sqlite3": "^5.1.0",
"sqlite-vec": "^0.1.0",
"claude-flow": "@alpha"
}
```
### MCP Servers
- **Required**: `claude-flow` (orchestration)
- **Recommended**: `agentdb` (20 memory tools)
- **Optional**: `ruv-swarm`, `flow-nexus`
### System Requirements
- Node.js 18+
- 2GB RAM (4GB recommended)
- 1GB disk for patterns
- SQLite 3.x with vec extension
---
## ⚠️ Top Risks
### 1. Performance at Scale (>1M vectors)
- **Risk**: sqlite-vec brute-force degrades
- **Mitigation**: Limit <1M, monitor ANN development
### 2. Pattern Quality
- **Risk**: Poor patterns reduce effectiveness
- **Mitigation**: Seed library, validation framework
### 3. Context Complexity
- **Risk**: 5-layer architecture hard to debug
- **Mitigation**: Comprehensive logging, gradual rollout
---
## 📚 5-Minute Deep Dive Sections
### AgentDB Architecture
- **Foundation**: SQLite (transactional) + DuckDB (analytics)
- **Vector Search**: sqlite-vec extension, cosine similarity
- **Graph Search**: HNSW multi-level indexing (when available)
- **Performance**: SIMD acceleration (AVX/NEON)
- **Scale**: Thousands to hundreds of thousands of vectors
### ReasoningBank Pipeline
```
1. STORE → Save experience as pattern (SQLite)
2. EMBED → Convert to 1024-dim vector (SHA-512)
3. QUERY → Semantic search (cosine, 2-3ms)
4. RANK → Multi-factor score (semantic, confidence, recency, diversity)
5. LEARN → Bayesian update (+20% success, -15% failure)
```
### Six Thinking Modes
1. **Convergent**: Focused, analytical
2. **Divergent**: Creative, exploratory
3. **Lateral**: Indirect, innovative
4. **Systems**: Holistic, interconnected
5. **Critical**: Evaluative, questioning
6. **Adaptive**: Flexible, context-responsive
### 5-Layer Context Architecture
1. **Meta-Context**: Agent identity, tone, persona
2. **Operational Context**: Task, user intent, tools
3. **Domain Context**: Industry-specific knowledge
4. **Historical Context**: Condensed interaction memory
5. **Environmental Context**: System state, live data
---
## 🎯 Success Criteria
### Phase 1 (Week 3)
- ✅ <5ms retrieval @ 100K patterns
- ✅ 20,000+ token reduction achieved
- ✅ 20 MCP tools functional
- ✅ 4 /prime commands working
### Phase 2 (Week 7)
- ✅ +30% effectiveness improvement
- ✅ 84% confidence convergence
- ✅ 50+ quality patterns seeded
- ✅ 5-layer context operational
### Phase 3 (Week 12)
- ✅ Skill-creator functional
- ✅ Progressive disclosure working
- ✅ 10+ skills validated
- ✅ Cross-platform compatibility
---
## 🔗 Essential Links
### Documentation
- [Comprehensive Analysis](/docs/research/memory-systems-analysis.md)
- [Executive Summary](/docs/research/executive-summary.md)
- [This Quick Reference](/docs/research/quick-reference.md)
### External Resources
- [AgentDB](https://agentdb.ruv.io)
- [ReasoningBank Paper](https://arxiv.org/abs/2509.25140)
- [Claude Skills](https://www.anthropic.com/news/skills)
- [Context Engineering Guide](https://github.com/coleam00/context-engineering-intro)
- [Vector Benchmarks](https://www.letta.com/blog/benchmarking-ai-agent-memory)
### GitHub Repositories
- [agentdb](https://github.com/ruvnet/agentdb)
- [agentic-flow](https://github.com/ruvnet/agentic-flow)
- [anthropics/skills](https://github.com/anthropics/skills)
- [sqlite-vec](https://github.com/asg017/sqlite-vec)
---
## 💡 Pro Tips
### AgentDB
- Start with brute-force, monitor ANN development
- Benchmark early and often (`npx agentdb benchmark`)
- Keep vectors <1M until HNSW available
- Use chunked storage for memory efficiency
### ReasoningBank
- Seed 50-100 quality patterns before production
- Track confidence convergence rate
- Learn from failures (-15% is valuable)
- Use right thinking mode per task type
### Skills
- Keep skills focused (single responsibility)
- Test progressive disclosure thoroughly
- Validate skill composition early
- Monitor token overhead per skill
### Context Engineering
- Measure token usage before/after changes
- Use /prime commands for task-specific context
- Implement context budgeting from day one
- Quality > quantity always
---
## 🚦 Decision Framework
### Use AgentDB when:
- ✅ Need <5ms retrieval
- ✅ Working with <1M vectors
- ✅ Want SQLite reliability
- ✅ Need 20 MCP tools
### Use ReasoningBank when:
- ✅ Need self-improving system
- ✅ Want to learn from failures
- ✅ Have domain-specific patterns
- ✅ Need +30% effectiveness
### Use Skills when:
- ✅ Need composable capabilities
- ✅ Want automatic generation
- ✅ Require cross-platform support
- ✅ Need minimal token overhead
### Use Context Engineering when:
- ✅ Context window approaching limit
- ✅ Need 20K+ token reduction
- ✅ Have task-specific context needs
- ✅ Want quality over quantity
---
## 📞 Quick Support
### Issues
- AgentDB: https://github.com/ruvnet/agentdb/issues
- Agentic-Flow: https://github.com/ruvnet/agentic-flow/issues
- Claude-Flow: https://github.com/ruvnet/claude-flow/issues
### Community
- Discord: [rUv Community](https://discord.gg/ruv)
- Twitter: [@rUvInc](https://twitter.com/rUvInc)
---
**Last Updated**: 2025-10-20
**Next Review**: Phase 1 completion (Week 3)
**Status**: ✅ Research Complete, Ready for Implementation