Enhanced Memory for Openclaw

A high-performance retrieval system for agent memory that combines vector embeddings with keyword scoring and temporal routing.

jameseball
v1.0.0
Feb 10, 2026
0
1.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install enhanced-memory

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install enhanced-memory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Enhanced Memory?

Enhanced Memory is a specialized extension designed to significantly upgrade the retrieval capabilities of Openclaw Skills. Unlike standard flat vector searches, this skill implements a 4-signal hybrid retrieval pipeline that fuses vector similarity, keyword matching, header alignment, and filepath scoring. This architecture allows AI agents to find relevant information with much higher precision, achieving a documented 0.782 Mean Reciprocal Rank (MRR).

By leveraging local embedding models through Ollama, Enhanced Memory ensures that data stays private and local while providing advanced features like temporal routing—which prioritizes files based on date references—and pseudo-relevance feedback to refine search results dynamically. It is the ideal solution for developers building complex Openclaw Skills that require robust, context-aware memory management.

Enhanced Memory Use Cases

  • Improving retrieval accuracy for agents managing large documentation or memory repositories.
  • Automatically building a knowledge graph of cross-references between related memory files.
  • Prioritizing recent or time-sensitive information using built-in temporal routing logic.
  • Identifying stale or highly important memory items through automated salience scoring.

How Enhanced Memory Works

  1. The system chunks Markdown files within the memory directory based on header structure.
  2. Chunks are embedded using the nomic-embed-text model via a local Ollama instance.
  3. When a query is made, the search engine calculates scores across four distinct signals: vector similarity, keyword overlap, header matches, and filepath relevance.
  4. The system applies temporal boosts if the query contains date-related terms like 'yesterday' or specific months.
  5. If initial search scores are below a set threshold, the system triggers pseudo-relevance feedback to expand the query and re-run the search for better results.
  6. Results are returned as a ranked list of snippets, headers, and file paths.

Enhanced Memory Setup

# 1. Install Ollama and pull the required embedding model
ollama pull nomic-embed-text

# 2. Index your memory files from the workspace root
python3 skills/enhanced-memory/scripts/embed_memories.py

# 3. Optional: Build the cross-reference knowledge graph
python3 skills/enhanced-memory/scripts/crossref_memories.py build

Enhanced Memory Data Schema & Taxonomy

Component Data Type Description
memory/vectors.json JSON File Persistent storage for embeddings, chunk text, and metadata.
search_memory.py Python Script Main entry point for the 4-signal hybrid retrieval logic.
memory_salience.py Python Script Logic for calculating importance vs. staleness of memory items.
crossref_memories.py Python Script Generates similarity links between disparate memory chunks.

Enhanced Memory Advanced Features

  • Temporal Routing: Automatically grants a 3x score boost to files matching date-related queries.
  • Pseudo-Relevance Feedback (PRF): Dynamically expands search queries using terms from top results when initial confidence is low.
  • Adaptive Weighting: Shifts search priority between vector and keyword signals based on query characteristics.
  • Salience Scoring: Surfaces critical memory items for 'heartbeat' prompts based on access frequency and query gap correlation.
  • Zero Dependencies: Runs using only the Python standard library and the local Ollama API.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*