soul-memoryIntelligent memory management system for AI agents - 8 modules + OpenClaw Plugin integration, with heartbeat deduplication, CLI interface, and full CJK support.
Install via ClawdBot CLI:
clawdbot install kingofqin2026/soul-memoryLong-term memory framework for AI agents with full OpenClaw integration. Now with v3.2.2 - Heartbeat deduplication + OpenClaw Plugin v0.2.1-beta.
8 Powerful Modules + OpenClaw Plugin Integration
| Module | Function | Description |
|:-------:|:---------:|:------------|
| A | Priority Parser | [C]/[I]/[N] tag parsing + semantic auto-detection |
| B | Vector Search | Keyword indexing + CJK segmentation + semantic expansion |
| C | Dynamic Classifier | Auto-learn categories from memory |
| D | Version Control | Git integration + version rollback |
| E | Memory Decay | Time-based decay + cleanup suggestions |
| F | Auto-Trigger | Pre-response search + Post-response auto-save |
| G | Cantonese Branch | ๐ ่ชๆฐฃ่ฉๅ็ด + ่ชๅขๆ ๅฐ + ็ฒต่ชๆชขๆธฌ |
| H | CLI Interface | ๐ Pure JSON output for external integration |
| Plugin | OpenClaw Hook | ๐ before_prompt_build Hook for automatic context injection |
| Web | Web UI | FastAPI dashboard with real-time stats |
| Feature | Description |
|---------|-------------|
| Heartbeat Deduplication | MD5 hash tracking, automatically skips duplicate content |
| CLI Interface | Pure JSON output for external system integration |
| OpenClaw Plugin | Automatically injects relevant memories before responses (v0.2.1-beta) |
| Lenient Mode | Lower recognition thresholds, saves more conversation content |
event.prompt instead of messages history# Clone and install
git clone https://github.com/kingofqin2026/Soul-Memory-.git
cd Soul-Memory-
bash install.sh
# Clean install (uninstall first if needed)
bash install.sh --clean
from soul_memory.core import SoulMemorySystem
# Initialize system
system = SoulMemorySystem()
system.initialize()
# Search memories
results = system.search("user preferences", top_k=5)
# Add memory
memory_id = system.add_memory("[C] User likes dark mode")
# Pre-response trigger (auto-search before answering)
context = system.pre_response_trigger("What are user preferences?")
# Pure JSON output
python3 cli.py search "QST physics" --format json
# Get stats
python3 cli.py stats --format json
# Plugin is automatically installed to ~/.openclaw/extensions/soul-memory
# Restart Gateway to enable
openclaw gateway restart
Automatic Trigger: Executes before each response
event.prompt (current input, not history)prependContextEdit ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"soul-memory": {
"enabled": true,
"config": {
"topK": 5,
"minScore": 0.0
}
}
}
}
}
# Run full test suite
python3 test_all_modules.py
# Expected output:
# ๐ Results: 8 passed, 0 failed
# โ
All tests passed!
Localized implementation:
Default categories (customizable):
soul-memory/
โโโ core.py # Core system
โโโ cli.py # CLI interface
โโโ install.sh # Auto-install script
โโโ uninstall.sh # Complete uninstall script
โโโ test_all_modules.py # Test suite
โโโ SKILL.md # ClawHub manifest (this file)
โโโ README.md # Documentation
โโโ modules/ # 6 functional modules
โ โโโ priority_parser.py
โ โโโ vector_search.py
โ โโโ dynamic_classifier.py
โ โโโ version_control.py
โ โโโ memory_decay.py
โ โโโ auto_trigger.py
โโโ plugin/ # OpenClaw Plugin
โ โโโ index.ts # Plugin source
โ โโโ openclaw.plugin.json
โโโ cache/ # Cache directory (auto-generated)
โโโ web/ # Web UI (optional)
Complete removal of all integration configs:
# Basic uninstall (will prompt for confirmation)
bash uninstall.sh
# Create backup before uninstall (recommended)
bash uninstall.sh --backup
# Auto-confirm (no manual confirmation)
bash uninstall.sh --backup --confirm
Removed Items:
~/.openclaw/openclaw.json)HEARTBEAT.md)MIT License - see LICENSE for details
Soul Memory System v3.2 is a personal AI assistant memory management tool, designed for personal use. Not affiliated with OpenClaw project.
ยฉ 2026 Soul Memory System
Generated Mar 1, 2026
Integrate Soul Memory into a customer service AI to retain user preferences, past issues, and interaction history. The system's priority parsing and vector search enable quick retrieval of critical details like [C] tags for account-specific information, improving response accuracy and personalization over long-term engagements.
Use Soul Memory in an educational AI tutor to track student progress, learning gaps, and preferred topics. The dynamic classifier auto-learns categories like Science or History, while memory decay cleans outdated data, ensuring tailored lesson plans and efficient review sessions based on accumulated knowledge.
Deploy Soul Memory for AI-driven content moderation, leveraging its CJK support and Cantonese branch to detect and classify nuanced language, slang, and emotional tones. The heartbeat deduplication prevents redundant flagging, and the CLI interface allows integration with external moderation dashboards for real-time analysis.
Implement Soul Memory in a healthcare AI to store patient histories, treatment plans, and critical notes tagged with [C] for urgent information. The version control module ensures data integrity with rollback capabilities, while the OpenClaw plugin automatically injects relevant patient context into diagnostic prompts, aiding in consistent care.
Integrate Soul Memory into coding assistants to remember project configurations, tech stack preferences, and common errors. The vector search with keyword indexing helps retrieve code snippets or setup instructions quickly, and the CLI's JSON output facilitates seamless use in CI/CD pipelines or IDE plugins for enhanced workflow efficiency.
Offer Soul Memory as a cloud-hosted or self-hosted service with tiered subscriptions based on memory storage, modules enabled, and support levels. Revenue comes from monthly fees, with premium tiers including advanced features like the OpenClaw plugin integration and priority customer support for enterprise clients.
Sell perpetual licenses to large organizations for on-premises deployment, with customization options for specific industries like healthcare or education. Revenue includes upfront licensing costs, plus ongoing fees for maintenance, updates, and dedicated integration support to ensure compliance and scalability.
Provide the core Soul Memory system as open-source under MIT license, with basic features free to use. Generate revenue by offering premium add-ons, such as the OpenClaw plugin, advanced analytics via the Web UI, or commercial support packages for businesses needing reliable deployment and troubleshooting assistance.
๐ฌ Integration Tip
Ensure the OpenClaw plugin is properly configured in openclaw.json to avoid memory loops, and use the CLI's JSON output for easy data exchange with external systems.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection