explaingit

neboy72/openclaw-nexus-memory

0PythonAudience · developerComplexity · 3/5ActiveSetup · moderate

TLDR

A Python toolkit that audits, scores, and auto-fixes the Markdown memory files of OpenClaw agents, with a wiki layer instead of a vector database.

Mindmap

mindmap
  root((openclaw-nexus-memory))
    Inputs
      MEMORY.md files
      Wiki folder
      YAML pattern rules
    Outputs
      Health score
      Auto-fix edits
      Knowledge gap report
    Use Cases
      Audit agent memory
      Schedule weekly cleanup
      Build agent wiki
      Track entity growth
    Tech Stack
      Python
      sentence-transformers
      Ollama
      Obsidian templates

Things people build with this

USE CASE 1

Audit an OpenClaw agent's Markdown memory for stale or contradictory facts

USE CASE 2

Schedule a weekly auto-fix cron that marks old entries HISTORICAL

USE CASE 3

Add an Obsidian-style wiki layer to an existing agent without a vector DB

USE CASE 4

Detect entities mentioned often but never given a wiki page

Tech stack

Pythonsentence-transformersOllamaYAMLObsidian

Getting it running

Difficulty · moderate Time to first run · 30min

Needs Python 3.11+ and an existing OpenClaw agent layout for the scans to find anything meaningful.

In plain English

OpenClaw Nexus Memory is a Python toolkit for taking care of the long-term memory of an AI agent. The agents it targets, called OpenClaw agents, store their memory as plain Markdown files such as MEMORY.md plus a memory and wiki folder. Over time those notes go out of date or start to contradict each other. Nexus runs health checks against those files, can fix some problems automatically, and adds a wiki layer on top, all without needing a database. There are three main pieces. A health script scans the Markdown for stale patterns (facts that are out of date, defined by regex rules in a YAML config), contradictions (pairs of patterns that conflict, such as one file saying a feature is enabled and another saying it is disabled), and gives an overall health score from 0 to 10. A patterns script looks for knowledge gaps, which are entities mentioned a lot but never given their own wiki page, finds co-occurrences between entities, and tracks how the memory grows over time. Auto-fix is the action half of the tool. When you pass --auto-fix, stale MEMORY.md entries are marked as HISTORICAL, RESOLVED, or ARCHIVED, which excludes them from later scans so old incidents stop being flagged as current problems. A --dry-run flag previews the changes before anything is written. There is also a scheduled maintenance recipe using OpenClaw's cron feature so the weekly run happens on its own and delivers a report through a channel like Telegram. Installation is either a curl install script or a self-install where you point the agent at an AGENTS.md URL and it does the setup itself. For semantic work, embeddings can come from sentence-transformers by default (local, no key), Ollama as a local service, or the Voyage cloud API. The wiki layer ships Obsidian-compatible templates for entities like Agent, User, Infrastructure, and Concepts, linked with Wikilinks. Requirements are Python 3.11 or newer, and the README is clear that no Qdrant or other vector database is needed.

Copy-paste prompts

Prompt 1
Walk me through installing openclaw-nexus-memory with the curl script and running the first health check on my agent
Prompt 2
Help me write a YAML pattern rule for openclaw-nexus-memory that flags any mention of a deprecated API key
Prompt 3
Show me how to switch openclaw-nexus-memory from sentence-transformers to a local Ollama embedding model
Prompt 4
Explain what the auto-fix step does to a stale MEMORY.md entry and how to preview it with --dry-run
Prompt 5
Add a Telegram delivery step to the weekly cron report from openclaw-nexus-memory
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.