🦀 ClawHub
A powerful memory management system powered by ReMe that provides persistent cross-session memory, automatic user preference application, and intelligent context compression for OpenClaw.
by @minybear
Memory management system powered by ReMe. Enables cross-session memory persistence, automatic user preference application, and intelligent context compressio...
💡 Examples
Installation (One-time setup)
pip install reme-ai
Session Initialization
At the start of EVERY session:
1. Initialize ReMe 2. Retrieve user preferences 3. Apply to current context
# Initialize
from reme.reme_light import ReMeLight
reme = ReMeLight(working_dir=".reme", language="zh")
await reme.start()Retrieve preferences
prefs = await reme.memory_search(
query="用户偏好 文件发送",
max_results=5
)Apply
if prefs and "必须发送" in prefs[0]['content']:
auto_send_files = True
📋 Tips & Best Practices
1. Always Start Sessions with Memory Retrieval
Bad:
# Start without memory
user_request = get_user_input()
process_request(user_request)
Good:
# Start with memory
reme = await init_reme()
prefs = await reme.memory_search(query="用户偏好")
apply_preferences(prefs)
user_request = get_user_input()
process_request(user_request)
2. Learn from Every Correction
When user says "You forgot X": 1. Acknowledge immediately 2. Extract the rule 3. Add to memory 4. Verify application
Example:
User: 你总是忘记发送文件!Me: ✓ 已记住:生成文件后必须发送文件
正在添加到 MEMORY.md...
Next file generation:
✓ File created
📤 Auto-sending...
✓ Sent
3. Be Specific in Memory Records
Bad:
- User prefers good code
Good:
- User prefers concise, well-commented Python code
- Use docstrings for functions
- Maximum 3 levels of nesting
- Prefer list comprehensions over loops
4. Update Memory Regularly
Daily tasks:
Weekly tasks:
5. Use Semantic Search Effectively
Bad queries:
Good queries:
Why: Specific queries return more relevant results.
TERMINAL
clawhub install memory-reme