Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.45 KB

File metadata and controls

62 lines (46 loc) · 1.45 KB

Architecture

System architecture and design of ab.

Overview

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)

Core Components

Database Layer

  • SQLite (default) or PostgreSQL
  • Hybrid: Graph (Treeweb) + SQL persistence
  • ACID guarantees from SQL
  • Graph performance from Treeweb

Entity Model

  • Project - Scopes memories
  • Moment - Timeline entry
  • Card - Memory object
  • Buffer - Named payload with channel
  • Connections - Card-to-card and buffer-to-buffer

Graph Structure

  • Card Connections - Relationships between cards
  • Buffer Connections - Energy distribution
  • Auto-linking - Similarity-based connections

Data Flow

Storage

Input → Card → Moment → Database
              ↓
         Treeweb (graph)

Recall

Query → Shape → Graph Traversal → Cards → Results

Key Features

  • 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

Performance

  • 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.