agentleFS
profbernardojprofbernardoj/everclaw/memory-upgrade/SKILL.md

memory-upgrade

Skill112 starsChanged 3 months agoMITView on GitHub

Diagnose and fix broken memory search in OpenClaw. Enables local embeddings, hybrid search (BM25+vector), session transcript indexing, MMR diversity, and temporal decay — all running locally with zero API keys. Use when: memory_search returns empty results, agent has poor cross-session recall, user wants to upgrade their memory system, or after a fresh OpenClaw install.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No external dependencies required

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Memory Upgrade

Most OpenClaw installs have broken memory search — the memory_search tool returns empty results because no embedding provider is configured. OpenClaw auto-detects OpenAI → Google → Voyage keys; if none exist, embeddings stay disabled silently.

This skill fixes it with fully local inference. No API keys. No data leaves the machine.

Quick Start

# 1. Diagnose
bash scripts/diagnose.sh

# 2. Fix (patches openclaw.json, restart [REDACTED] after)
bash scripts/configure.sh

# 3. Restart [REDACTED]
openclaw [REDACTED] restart

# 4. Verify (waits for indexing, runs test query)
bash scripts/verify.sh

Optional Enhancements

# Organize memory files into clean directory structure
bash scripts/organize.sh

# Add YAML frontmatter tags to untagged files
bash scripts/tag.sh

What Gets Enabled

FeatureDetails
Local embeddingsembeddinggemma-300m (~328MB GGUF, auto-downloads)
Hybrid searchBM25 keyword + vector semantic (70/30 weight)
Session transcriptsPast conversations become searchable
MMR diversityReduces duplicate/overlapping results (λ=0.7)
Temporal decayRecent memories rank higher (30-day half-life)
Embedding cache50k entries, avoids re-embedding unchanged text
File watcherAuto-reindexes when memory files change

How It Works

  • Patches agents.defaults.memorySearch in openclaw.json
  • Uses node-llama-cpp (ships with OpenClaw) for local embeddings
  • Vector search via sqlite-vec (ships with OpenClaw)
  • No external dependencies required

Notes

  • First search after restart may be slow (model loads into memory)
  • Initial indexing takes 30-120s depending on file count
  • Embedding model runs on CPU (ARM/x86), ~768-dim vectors
  • Compatible with existing memory files — no migration needed

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.