Agent Memory Setup
by @autosolutionsai-didac
Set up the full OpenClaw agent memory system with 3-tier memory (HOT/WARM/COLD), daily logs, semantic search (QMD), and lossless context management (Lossless...
# 1. Run setup script
bash scripts/setup_memory.sh /path/to/workspace2. Copy AGENTS.md template to workspace
(read references/AGENTS_TEMPLATE.md, adapt, write to workspace/AGENTS.md)
3. Add config to openclaw.json (see Step 3 below for exact JSON)
4. Restart
openclaw gateway restart
For full details, read the sections below.
Before running setup, ensure:
openclaw --version). If not installed, the setup script will still create directories and memory files, but plugin installation and config changes must be done manually.python3 --version. QMD provides semantic search (memory_search) over memory files. The core memory system (tiers, daily logs, Lossless Claw) works fully without it. If you can't install QMD (no Python, restricted server), you lose semantic search but keep everything else.Platform Notes
~/.openclaw/openclaw.json (same as Linux). The setup script uses POSIX-compatible date and mkdir β no GNU-specific flags./mnt/c/...), file permissions may behave unexpectedly β prefer using a path inside the WSL filesystem (~/workspace) for reliable permission handling. The script's set -euo pipefail and mkdir -p work fine under WSL2.| Symptom | Likely Cause | Fix |
|---------|-------------|-----|
| Agent doesn't read memory files on startup | AGENTS.md missing or doesn't include memory instructions | Copy references/AGENTS_TEMPLATE.md β AGENTS.md |
| memory_search not working | QMD not installed or memorySearch not configured | Run qmd --version; add "memorySearch": { "provider": "local" } to config |
| Old conversations vanish (no summaries) | Lossless Claw not enabled | Check openclaw plugins list for lossless-claw; enable in plugins config |
| Config changes have no effect | Gateway not restarted | Run openclaw gateway restart |
| Plugin install fails | openclaw CLI not in PATH or npm issue | Verify openclaw --version; try npm install -g openclaw |
| Agent overwrites existing memory files | Script bug (shouldn't happen) | Script checks if [ ! -f ] before creating β report if override occurs |
clawhub install agent-memory-setup-qmd