Documentation

📚Persistent Memory

Rock-solid SQLite database that preserves every conversation, context, and insight across sessions and system restarts

← Back to Documentation

📚 Persistent Memory

Built on enterprise-grade SQLite, our persistent memory system ensures your AI conversations and insights never disappear. Every context, pattern, and preference is preserved locally with complete privacy control.

Why Persistent Memory Matters

Traditional AI tools lose everything when you restart. Our SQLite-based architecture preserves complete conversation history, context relationships, and learning patterns across sessions.

🗄️ SQLite Storage

Enterprise-grade local database with ACID compliance

🔗 Context Linking

Smart relationships between conversations and topics

🔒 Local Privacy

100% local storage with your complete data control

🗄️ SQLite Database Architecture

Production-Ready Storage Design

Our SQLite implementation uses enterprise patterns with proper indexing, foreign key constraints, and ACID transactions for reliability.

# Database location
~/.hive-ai/hive-ai.db
📊 Storage Schema:
• conversations - Conversation metadata with user/profile links
• messages - All conversation messages with roles and models
• knowledge_conversations - Processed knowledge entries
• conversation_context - Cross-conversation relationships
• conversation_keywords - Extracted keywords for indexing
• conversation_topics - Topic classification with relevance

Database Features

  • ACID-compliant transactions
  • Foreign key constraints
  • Optimized indexing strategy
  • Automatic timestamp tracking
  • Conversation-message relationships

Storage Capacity

  • Unlimited conversation history
  • Complete message preservation
  • Context relationship mapping
  • Keyword and topic indexing
  • Profile-specific memory

🔗 Context Preservation & Linking

Cross-Conversation Context

Intelligent linking between related conversations with automatic context discovery

# Continue previous conversation
hive consensus "follow-up question" \\
--conversation-id abc123
🔗 Context Types:
• recent_24h - Recent relevant context
• thematic - Related topic conversations
• direct_reference - Explicit references

Knowledge Base Integration

Processed knowledge entries with source-of-truth validation

# Knowledge storage schema
knowledge_conversations {
question: "original question",
final_answer: "consensus result",
source_of_truth: "validated info",
conversation_context: "linked data"
}

🛠️ Memory Management & Backup

Comprehensive Backup System

Enterprise-grade backup and recovery with multiple backup types and encryption support for complete data protection.

Full
Complete database backup
Perfect for migrations
Incremental
Changes since last backup
Daily automated backups
Emergency
Critical data only
Fast disaster recovery
# Backup management commands
hive backup create full "before-update"
hive backup create incremental --encrypt
hive backup restore /path/to/backup.db
hive backup list --show-details

🧠 Consensus Pipeline Integration

Memory-Aware AI Processing

Each stage of the 4-stage consensus pipeline has access to relevant conversation history and context for improved responses.

Generator Stage Memory

  • Access to conversation history
  • Context from related discussions
  • User preference patterns
  • Previous question styles

Validation Memory

  • Cross-reference against stored knowledge
  • Consistency with past answers
  • Source-of-truth validation
  • Quality pattern recognition

⌨️ Memory Management Commands

Backup Operations

# Create backups
hive backup create full
hive backup create incremental
# Restore from backup
hive backup restore <path>
# Backup health check
hive backup health

System Health

# Database health check
hive health --detailed
hive health --component database
# System status
hive status
# Cache management
hive cache clear

Analytics & Insights

# Memory usage analytics
hive analytics collect
hive analytics trends
# Generate reports
hive report generate memory
# Dashboard view
hive dashboard operational

Configuration Export

# Export configuration
hive config export
hive config export --include-data
# Apply configuration
hive config apply <file>
# Validate config
hive config validate <file>

🔒 Privacy & Data Security

Complete Local Control

Your conversation data never leaves your machine unless you explicitly choose to export or backup. Full GDPR compliance with user-controlled data management.

🛡️ Security Features

  • 100% local SQLite storage
  • No cloud transmission by default
  • Encrypted backup support
  • User-controlled data export
  • Complete conversation ownership

🔐 Privacy Controls

  • GDPR-compliant data handling
  • Selective data export options
  • Secure backup encryption
  • Local-only processing mode
  • Complete data portability

📊 Real Memory Usage Statistics

Actual Database Performance

Real statistics from production hive.ai installations showing reliable performance and storage efficiency.

88
Conversations Stored
Average user database
272
Messages Preserved
Complete conversation history
15
Knowledge Entries
Processed knowledge base

🚀 Never Lose Context Again

Build on your AI conversations with persistent memory that preserves every insight across sessions. Enterprise-grade SQLite storage with complete privacy control.

# Start building persistent AI memory
hive consensus "What did we discuss about React patterns?"
hive backup create full "my-ai-knowledge"
hive analytics collect # Track your memory growth
Start free trial