Semantic Memory for Openclaw

A sophisticated long-term memory infrastructure for OpenClaw Agents optimized for Chinese semantic retrieval using a hybrid triple-track search engine.

jackxc2026
v1.0.0
Apr 12, 2026
1
881
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install 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 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?

Semantic Memory is a specialized infrastructure designed to provide OpenClaw Agents with robust long-term memory capabilities, specifically optimized for the Chinese language. It solves the common limitations of standard vector-only search by implementing a hybrid approach that combines jieba TF-IDF word segmentation with traditional vector embeddings. This ensures that the agent maintains high accuracy in context retrieval and semantic understanding, even when dealing with complex Chinese syntax.

By integrating this skill, developers can enable their agents to manage multiple memory collections and automatically route queries based on intent. This Openclaw Skills component is essential for building persistent AI personalities or knowledge-heavy assistants that require high hit rates and low-latency responses without the need for expensive GPU or Docker setups.

Semantic Memory Use Cases

  • Building persistent AI agents that need to remember user preferences or historical project data in Chinese.
  • Implementing high-accuracy knowledge base retrieval for technical documentation and internal wikis.
  • Managing multi-agent collaboration where different agents need access to specific memory collections.
  • Scaling AI search capabilities on low-resource environments using pure pip installations.

How Semantic Memory Works

  1. Intent Routing: The agent automatically identifies the user intent and routes the query to the corresponding memory collection using keyword matching.
  2. Hybrid Indexing: The system performs simultaneous searches across three tracks: TF-IDF for precise Chinese word matching, ChromaDB for semantic expansion, and keyword boosting for source titles.
  3. Score Synthesis: Results are calculated using a weighted formula: 0.45 × Vector Similarity + 0.55 × TF-IDF Norm + Keyword Boost.
  4. Context Output: The system returns the top 6 most relevant results to the agent for context-aware response generation.

Semantic Memory Setup

To integrate this into your project, follow these installation steps:

# Install core dependencies
pip install chromadb jieba

# Start the ChromaDB service
chroma run --path ./vector_db --host 0.0.0.0 --port 8000 &

# Import your initial memory data
python3 scripts/import_memory.py

Semantic Memory Data Schema & Taxonomy

The skill organizes memory through a structured collection system. Below is the file and metadata taxonomy used by Semantic Memory:

File Purpose
scripts/vector_search.py Core retrieval logic and hybrid scoring engine
scripts/import_memory.py Utility for bulk data ingestion into ChromaDB
scripts/start_chroma.sh Shell script for initializing the vector database service

Metadata Taxonomy:

  • Collection Name: Used for routing different Agent memories.
  • Source: Path or title reference for the original data.
  • Combined Score: Normalized value derived from the hybrid search tracks.

Semantic Memory Advanced Features

  • Triple-Track Hybrid Search: Combines the precision of TF-IDF with the breadth of Vector Search for a 100% hit rate in benchmark tests.
  • Auto-Routing Engine: Automatically maps user queries to specific memory segments based on pre-defined AGENT_KEYWORDS.
  • Adjustable Weighting: Power users can fine-tune the balance between exact keyword matching and semantic expansion by modifying the scoring coefficients.
  • Lightweight Infrastructure: Operates entirely within a Python environment without requiring Docker or GPU acceleration.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*