Memory Hygiene
name: memory-hygiene
by chenghaifeng08-creator · published 2026-03-22
$ claw add gh:chenghaifeng08-creator/chenghaifeng08-creator-memory-hygiene-automaton---
name: memory-hygiene
description: Audit, clean, and optimize Clawdbot's vector memory (LanceDB). Use when memory is bloated with junk, token usage is high from irrelevant auto-recalls, or setting up memory maintenance automation.
homepage: https://github.com/xdylanbaker/memory-hygiene
---
# Memory Hygiene
Keep vector memory lean. Prevent token waste from junk memories.
Quick Commands
**Audit:** Check what's in memory
memory_recall query="*" limit=50**Wipe:** Clear all vector memory
rm -rf ~/.clawdbot/memory/lancedb/Then restart gateway: `clawdbot gateway restart`
**Reseed:** After wipe, store key facts from MEMORY.md
memory_store text="<fact>" category="preference|fact|decision" importance=0.9Config: Disable Auto-Capture
The main source of junk is `autoCapture: true`. Disable it:
{
"plugins": {
"entries": {
"memory-lancedb": {
"config": {
"autoCapture": false,
"autoRecall": true
}
}
}
}
}Use `gateway action=config.patch` to apply.
What to Store (Intentionally)
✅ Store:
❌ Never store:
Monthly Maintenance Cron
Set up a monthly wipe + reseed:
cron action=add job={
"name": "memory-maintenance",
"schedule": "0 4 1 * *",
"text": "Monthly memory maintenance: 1) Wipe ~/.clawdbot/memory/lancedb/ 2) Parse MEMORY.md 3) Store key facts to fresh LanceDB 4) Report completion"
}Storage Guidelines
When using memory_store:
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...