Overview
Local-first memory keeps user data on their own devices by default, with optional encrypted sync. This architecture maximizes privacy, works offline, and gives users complete control over their data. Cloud sync is opt-in and always end-to-end encrypted.
Core Principles
Data Sovereignty
Users own their memory:
Offline-First
Works without internet:
Privacy by Default
Minimal data exposure:
Architecture Layers
┌─────────────────────────────────────────────────────────────┐
│ User's Device │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Application │ │
│ └────────────────────────┬─────────────────────────────┘ │
│ │ │
│ ┌────────────────────────┴─────────────────────────────┐ │
│ │ Local Memory Store │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ SQLite │ │ Vector │ │ Index │ │ │
│ │ │ (Facts) │ │ Store │ │ Cache │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └────────────────────────┬─────────────────────────────┘ │
│ │ │
│ ┌────────────────────────┴─────────────────────────────┐ │
│ │ Sync Engine (Optional) │ │
│ │ ├── End-to-end encryption │ │
│ │ ├── Conflict resolution │ │
│ │ └── Multi-device coordination │ │
│ └────────────────────────┬─────────────────────────────┘ │
└───────────────────────────┼─────────────────────────────────┘
│ encrypted sync (opt-in)
▼
┌─────────────────────────────────────────────────────────────┐
│ Sync Server (Dumb Storage) │
│ ├── Stores encrypted blobs only │
│ ├── Cannot read user data │
│ ├── Facilitates device sync │
│ └── Optional, user can self-host │
└─────────────────────────────────────────────────────────────┘
Local Storage
On-Device Vector Store
Lightweight vector search:
Memory Schema
memories:
├── id: local unique id
├── content: memory text
├── embedding: vector (computed locally)
├── created_at: timestamp
├── type: fact | preference | conversation
├── importance: score
├── sync_status: local | synced | conflict
└── version: for conflict resolution
Local Processing
Compute on device when possible:
Sync Design
Encryption
All synced data is encrypted:
Conflict Resolution
When devices diverge:
Selective Sync
User controls what syncs:
Privacy Features
Data Minimization
Only store what's needed:
Transparency
Users can see everything:
Consent
Explicit permission for everything:
Offline Capabilities
Full Functionality
Without internet:
Graceful Degradation
When connectivity is limited: