vector-memory
Scannednpx machina-cli add skill a5c-ai/babysitter/vector-memory --openclawVector Memory
Overview
High-performance vector search using HNSW (Hierarchical Navigable Small World) graphs for pattern storage and retrieval, combined with a knowledge graph for relational reasoning.
When to Use
- Retrieving similar patterns from execution history
- Building and querying knowledge graphs for project context
- Managing cross-session memory across project/local/user scopes
- Fast similarity search for routing decisions
HNSW Performance
- Search latency: ~61 microseconds
- Query throughput: ~16,400 QPS
- Configurable embedding dimensions (default: 128)
Knowledge Graph
- PageRank: Importance scoring for knowledge nodes
- Community Detection: Cluster related patterns
- LRU Cache: Fast access to frequently used patterns
- SQLite Backing: Persistent cross-session storage
3-Tier Memory
| Scope | Persistence | Content |
|---|---|---|
| Project | Codebase-level | Patterns, architecture decisions, dependencies |
| Local | Session-level | Context, adaptations, temporary patterns |
| User | Cross-project | Preferences, learned behaviors, global patterns |
Agents Used
agents/optimizer/- Memory and cache optimization
Tool Use
Invoke via babysitter process: methodologies/ruflo/ruflo-intelligence
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/methodologies/ruflo/skills/vector-memory/SKILL.mdView on GitHub Overview
High-performance vector search using HNSW for pattern storage and retrieval, paired with a relational knowledge graph. It supports PageRank scoring, community detection, and a 3-tier memory model to manage data across project, local, and user scopes.
How This Skill Works
Vector-memory builds an HNSW index over pattern embeddings to enable fast similarity search, while a knowledge graph stores relational context between patterns and decisions. It applies PageRank scores and community detection to organize relevance, uses an LRU cache for hot items, and persists data with SQLite to enable cross-session memory.
When to Use It
- Retrieving similar patterns from execution history to guide decisions
- Building and querying a knowledge graph for project context
- Managing cross-session memory across project, local, and user scopes
- Fast similarity search to inform routing decisions
- Persisting cross-session storage and retrieval via SQLite backing
Quick Start
- Step 1: Initialize vector-memory via the babysitter process and establish an HNSW index for pattern embeddings
- Step 2: Enable PageRank scoring, run community detection, and configure the LRU cache with SQLite backing
- Step 3: Index patterns, then run similarity queries or knowledge-graph traversals within the 3-tier memory framework
Best Practices
- Tune HNSW parameters and set an embedding dimension that matches your data (default 128)
- Enforce clear 3-tier memory boundaries: Project, Local, and User scopes
- Keep the knowledge graph up to date with PageRank scores and community clusters
- Leverage the LRU cache to accelerate access to frequently used patterns
- Use SQLite backing for durable cross-session persistence
Example Use Cases
- Retrieving similar execution patterns to speed up debugging and troubleshooting
- Constructing a project knowledge graph to reveal module relationships and decisions
- Preserving user and project context across sessions for faster work
- Routing decisions based on the closest pattern matches in history
- Clustering related patterns with community detection to simplify exploration