π¦ ClawHub
Memoria Memory System
by @cuilinshen
Manages AI assistant long-term memory with layered storage for facts, events, skills, context, and fast indexing, including backup and integrity tools.
TERMINAL
clawhub install memoria-systemπ About This Skill
Memoria System
Overview
Memoria System is a comprehensive long-term memory management system designed for AI assistants. It implements a human-like cognitive memory architecture with distinct layers for different types of information.
Memory Architecture
The system organizes memory into five distinct types, mirroring human cognitive structures:
1. Semantic Memory (semantic/)
Stores factual knowledge, concepts, and general information.
2. Episodic Memory (episodic/)
Records events, experiences, and conversations with timestamps.
3. Procedural Memory (procedural/)
Contains skills, workflows, and learned procedures.
4. Working Memory (working/)
Holds current session context and active tasks.
5. Index (index/)
Provides fast lookup and search capabilities.
Tools
memory-backup.sh
Creates incremental backups of the memory system.Usage:
./memory-backup.sh [options]
Options:
--dry-run - Show what would be backed up without doing it--verbose - Show detailed output--path PATH - Override memory path--output PATH - Override backup destinationmemory-migrate.sh
Initializes new memory structures or migrates existing ones.Usage:
./memory-migrate.sh {init|daily [DATE]|migrate [VERSION]}
Commands:
init - Initialize memory structuredaily [DATE] - Create daily memory file (default: today)migrate [VERSION] - Migrate from specified versionmemory-rollback.sh
Restores memory from a previous backup.Usage:
./memory-rollback.sh {list|rollback BACKUP_NAME [--force]}
Commands:
list - List available backupsrollback BACKUP_NAME - Restore to specified backupOptions:
--force - Skip confirmation promptmemory-health-check.sh
Validates memory integrity and optionally repairs issues.Usage:
./memory-health-check.sh [options]
Options:
--fix - Automatically fix detected issues--path PATH - Override memory pathConfiguration
Edit config.json to customize behavior:
{
"memory": {
"base_path": "./memory",
"structure": { ... }
},
"backup": {
"enabled": true,
"retention_days": 30,
"schedule": "0 2 * * *"
},
"health_check": {
"auto_fix": false,
"check_interval_hours": 24
}
}
Cron Setup
Add to crontab for automated maintenance:
# Daily backup at 2 AM
0 2 * * * cd /path/to/memoria-system && ./memory-backup.shWeekly health check on Sundays at 3 AM
0 3 * * 0 cd /path/to/memoria-system && ./memory-health-check.sh --fix
Installation
openclaw skill install memoria-system
Requirements
License
MIT
βοΈ Configuration
Edit config.json to customize behavior:
{
"memory": {
"base_path": "./memory",
"structure": { ... }
},
"backup": {
"enabled": true,
"retention_days": 30,
"schedule": "0 2 * * *"
},
"health_check": {
"auto_fix": false,
"check_interval_hours": 24
}
}