System architecture and design of ab.
ab implements a structured memory system with:
- Graph-based storage (RFS memory web)
- SQL persistence (hybrid approach)
- Multi-modal memory (text, images, audio, emotions)
- Efficient queries (graph traversal)
- SQLite (default) or PostgreSQL
- Hybrid: Graph (Treeweb) + SQL persistence
- ACID guarantees from SQL
- Graph performance from Treeweb
- Project - Scopes memories
- Moment - Timeline entry
- Card - Memory object
- Buffer - Named payload with channel
- Connections - Card-to-card and buffer-to-buffer
- Card Connections - Relationships between cards
- Buffer Connections - Energy distribution
- Auto-linking - Similarity-based connections
Input → Card → Moment → Database
↓
Treeweb (graph)
Query → Shape → Graph Traversal → Cards → Results
- RFS Memory Web - Graph of connected memories
- Master Cards - Aggregate outputs per moment
- Energy Distribution - Resource flow through buffers
- Forgetting - Natural memory decay
- Emotional States - Track feelings
- Graph queries: O(depth) vs O(n²) SQL JOINs
- Auto-linking: Efficient similarity detection
- Batch operations: Reduced DB round trips
See examples for usage patterns.