Memory Palace for Openclaw

A zero-infrastructure, file-based long-term memory system for AI agents using BGE-M3 vector search and compound scoring.

z1one0415
v3.0.0
Apr 28, 2026
0
677
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install z1-memory-palace

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 z1-memory-palace 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 Palace?

Memory Palace is a sophisticated long-term memory architecture designed specifically for AI agents within the Openclaw Skills framework. Unlike traditional database-heavy solutions, it utilizes a zero-infrastructure, file-based approach that organizes knowledge into a logical palace structure. It empowers agents to maintain persistent context across sessions without the need for complex external services like Docker.

At its core, the system leverages BGE-M3 vector search to provide high-fidelity semantic retrieval. By implementing a multi-room directory structure—ranging from active chambers to the archive basement—Memory Palace ensures that agent knowledge is not just stored, but intelligently categorized and surfaced based on relevance, importance, and temporal decay.

Memory Palace Use Cases

  • Building agentic long-term memory from scratch using Openclaw Skills standards.
  • Upgrading flat-file memory systems with advanced vector search and temporal weighting.
  • Managing agent knowledge through automatic consolidation and structured reflection.
  • Implementing cold-storage archiving for large-scale agent datasets to maintain search performance.
  • Establishing a GraphRAG Lite neighbor expansion for complex relational knowledge retrieval.

How Memory Palace Works

  1. The system initializes a structured directory hierarchy known as the palace to separate active knowledge from archived data.
  2. BGE-M3 embeddings are generated for all markdown files and stored in a local vector index via the build script.
  3. When a query is initiated, the system calculates a compound score based on semantic similarity (50%), recency (25%), and importance (25%).
  4. The GraphRAG Lite component expands the search by traversing internal links to provide contextual neighbor information.
  5. Memory metabolism protocols periodically promote high-value insights from project rooms to the reflection wing or constitution.

Memory Palace Setup

To get started with this component of Openclaw Skills, follow these steps:

# 1. Initialize the palace directory structure
mkdir -p palace/{grand_hall,chambers,project_rooms,reflection_wing,dispatch_corridor,conflict_room,archive_basement}

# 2. Install the necessary embedding dependencies
pip install FlagEmbedding

# 3. Build the initial vector index
python3 scripts/build_index_bge.py --force

# 4. Execute a test search query
python3 scripts/query_bge.py "your search query"

Memory Palace Data Schema & Taxonomy

The system uses a manifest-driven data schema to manage metadata and facilitate efficient filtering within the Openclaw Skills environment.

Directory Purpose
grand_hall/ Global navigation, room maps, and system logs.
chambers/ Agent-specific knowledge bases.
reflection_wing/ Compiled insights, principles, and thinking patterns.
archive_basement/ Cold storage excluded from default semantic search.

Manifest Entry Format (watchdog_manifest_v1.jsonl):

  • path: The relative file path to the memory object.
  • type: Metadata tag used for category-based filtering.
  • priority: Importance level (high, medium, low) used in compound scoring calculations.

Memory Palace Advanced Features

  • Compound Scoring Engine: Balances cosine similarity with 30-day half-life decay and manual priority weighting.
  • Memory Metabolism: A 3-tier upgrade path that distills raw data into principles, prompt kernels, and failure patterns.
  • Cold Zone Blinding: Specialized patches to prevent search noise by excluding the archive basement during active retrieval.
  • Graph Router: Enables 1-hop link navigation to discover related knowledge nodes through internal file referencing.
  • Incremental Maintenance: Efficiently updates the BGE-m3 vector index without rebuilding the entire database.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*