Memory On Demand for Openclaw

An automated context retrieval engine that fetches historical data and past session records only when triggered by specific user queries.

aeoleader
v1.0.0
Feb 24, 2026
0
2.5k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install memory-on-demand

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 memory-on-demand 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 Memory On Demand?

Memory On Demand is a specialized utility designed to manage long-term context without exhausting the model's context window. It functions as an intelligent retrieval layer for Openclaw Skills, monitoring user input for references to past events or historical data. By dynamically searching through session logs and memory files, it ensures the AI agent has access to the right information at the right time.

The skill eliminates the need for manual context management by providing a seamless bridge between the current session and stored knowledge. It leverages high-performance search tools to find relevant snippets from previous interactions, making the agent appear more consistent and knowledgeable over long-term projects.

Memory On Demand Use Cases

  • Recalling specific technical decisions made in previous debugging or development sessions.
  • Searching through historical fitness logs, meeting notes, or research summaries stored in the memory folder.
  • Providing continuity in multi-session projects when a user asks "What did we do last time?"
  • Automatically fetching context when the user uses temporal keywords like "before" or "history."

How Memory On Demand Works

  1. Input Analysis: The skill scans the user's message for specific triggers such as "last time," "previously," or "remember."
  2. Primary Retrieval (QMD): It first executes a high-speed search using the QMD engine to find relevant matches in workspace, butler, and session logs.
  3. Secondary Retrieval (Grep): If primary results are insufficient, it performs a recursive grep search within the memory directory (~/.openclaw/workspace/memory/).
  4. Data Synthesis: The retrieved information is organized and presented back to the user or injected into the agent's active context.

Memory On Demand Setup

To enable this skill within your Openclaw Skills environment, ensure your workspace is correctly indexed and the memory path exists.

# Ensure the memory directory is initialized
mkdir -p ~/.openclaw/workspace/memory/

# Perform an initial index of your workspace for QMD
qmd index --path ~/.openclaw/workspace/

Memory On Demand Data Schema & Taxonomy

The skill organizes and accesses data across two main structures:

Data Source Format Description
QMD Index Vector/Text Index Covers workspace, butler, researcher, and session data for fast lookup.
Memory Files Markdown (.md) Persistent files located in the memory/ directory for structured long-term facts.
Meta-tags String Triggers Keywords like "last time", "history", and "previous" used for intent detection.

Memory On Demand Advanced Features

  • Context optimization: Loads data only on demand to prevent token waste and reduce latency.
  • Multi-source fallback: Automatically switches between QMD search and raw file system grep for 100% reliability.
  • Automated intent detection: Uses natural language keyword matching to trigger searches without explicit user commands.
  • Cross-session continuity: Bridges the gap between disparate sessions by indexing butler and researcher logs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*