Semantic Memory for Openclaw

A locally-hosted semantic memory plugin that allows OpenClaw agents to store and recall conversation context using vector search and Transformers.js.

zuiho-kai
v1.0.0
Feb 17, 2026
0
2.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install openclaw-semantic-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 openclaw-semantic-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 Semantic Memory?

The semantic-memory skill provides a robust, privacy-focused solution for long-term agent memory. By leveraging Openclaw Skills, developers can integrate high-performance vector search directly into their local environment without relying on external cloud providers or expensive API tokens. It utilizes Transformers.js to generate embeddings locally, ensuring that sensitive conversational data remains on the host machine while still allowing the agent to understand and recall complex relationships between different pieces of information.

This skill is an essential component for building sophisticated agents that need to learn from past interactions and maintain continuity across multiple sessions. Whether used in a volatile in-memory mode for temporary tasks or a persistent disk-based mode for long-term learning, it offers the flexibility required for modern AI workflows.

Semantic Memory Use Cases

  • Recalling specific user preferences and workflow patterns across different chat sessions.
  • Storing technical facts, project decisions, and architectural choices made during long-term development cycles.
  • Searching through historical conversation context to resolve current queries with high semantic relevance.
  • Maintaining a local knowledge base that evolves and improves as the agent interacts with the user over time.

How Semantic Memory Works

  1. The skill initializes a local embedding model (Xenova/all-MiniLM-L6-v2) and a vector database interface using Qdrant.
  2. When information is submitted via the memory_store tool, the input text is converted into a high-dimensional vector representation.
  3. These embeddings are stored either in-memory or persisted to the local file system within the user's home directory.
  4. During a retrieval request, the search query is embedded and compared against stored vectors to find the most semantically similar context.
  5. The agent utilizes these retrieved memories to provide context-aware responses or perform actions based on historical data.

Semantic Memory Setup

To begin using this skill within the Openclaw Skills ecosystem, install it via the CLI:

clawhub install semantic-memory

Next, enable the plugin in your configuration file and adjust persistence settings as needed:

{
  "plugins": {
    "semantic-memory": {
      "enabled": true,
      "persistToDisk": true,
      "autoRecall": true
    }
  }
}

Note: On the first execution, the skill will download a 25MB embedding model from Hugging Face. Ensure your environment has the necessary build tools for onnxruntime dependencies.

Semantic Memory Data Schema & Taxonomy

The skill manages information using a vector-based taxonomy. Data is organized as follows:

Attribute Description
Content The raw text string or fact to be stored
Vector A 384-dimensional embedding generated by MiniLM-L6-v2
Category An optional metadata tag (e.g., 'preference', 'fact') for filtered searching
Storage Path Defaults to ~/.openclaw-memory/ for persistent data
Memory ID A unique UUID assigned to each stored entry for precise deletion

Semantic Memory Advanced Features

  • Optional integration with external Qdrant servers for distributed or shared memory environments.
  • Opt-in auto-capture functionality that intelligently records conversation context based on semantic triggers.
  • Built-in PII protection that automatically filters out sensitive information like emails and phone numbers from auto-captured text.
  • Local ONNX runtime execution for high-performance embedding generation without network latency.
  • Flexible cleanup tools allowing for memory deletion by specific ID or semantic similarity matching.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*