🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

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...

Versionv1.2.0
Installs2
πŸ’‘ Examples

# 1. Run setup script
bash scripts/setup_memory.sh /path/to/workspace

2. 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.

βš™οΈ Configuration

Before running setup, ensure:

  • OpenClaw CLI is installed and on your PATH (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.
  • Python 3.8+ (for QMD only β€” optional). Check with 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.
  • Node.js 18+ (for OpenClaw and Lossless Claw plugin).
  • Platform Notes

  • Linux: Fully supported. No special considerations.
  • macOS: Fully supported. Config lives at ~/.openclaw/openclaw.json (same as Linux). The setup script uses POSIX-compatible date and mkdir β€” no GNU-specific flags.
  • Windows (WSL2): Supported via WSL2 with Ubuntu or similar. Run everything inside WSL, not from Windows CMD/PowerShell. Gotcha: If your workspace is on a Windows-mounted drive (/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.
  • Windows (native): Not supported. OpenClaw requires a Unix shell.
  • πŸ“‹ Tips & Best Practices

    | 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 |

    View on ClawHub
    TERMINAL
    clawhub install agent-memory-setup-qmd

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’