Shared Memory Knowledge Base for Openclaw

A unified cross-persona memory layer for Openclaw agents to store, retrieve, and reflect on personal knowledge and professional experience.

ludiansheng
v1.0.0
Apr 12, 2026
0
800
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install shared-memory-kb

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 shared-memory-kb 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 Shared Memory Knowledge Base?

The Shared Memory Knowledge Base is a sophisticated architectural layer designed to provide Openclaw Skills with a persistent, cross-persona memory. It allows multiple AI agents to share a single source of truth, enabling them to learn from past interactions regardless of which specific 'persona' was active at the time. By moving beyond simple chat history, this skill transforms raw dialogue into structured insights, lessons learned, and methodological frameworks.

Built with a focus on semantic understanding, it doesn't just store text; it categorizes information based on its utility, importance, and uniqueness. Whether you are switching between a coding persona and a project management persona, the Shared Memory Knowledge Base ensures that your breakthroughs in one area are immediately accessible as context in another, fostering a truly integrated personal AI ecosystem.

Shared Memory Knowledge Base Use Cases

  • Storing architectural decisions and project post-mortems for future reference.
  • Retrieving specific technical solutions or 'lessons learned' from previous debugging sessions.
  • Conducting weekly or monthly reflections to track personal growth and skill acquisition.
  • Syncing critical user preferences and workflow optimizations across different AI agents.
  • Building a long-term methodology library based on iterative practical experiences.

How Shared Memory Knowledge Base Works

  1. Semantic Triggering: The agent analyzes the conversation in real-time to identify high-value insights, reflections, or instructions worth remembering.
  2. Value Assessment: The system evaluates the content's reuse value, uniqueness, and operability based on configurable sensitivity thresholds.
  3. Structured Storage: Data is stored with rich metadata, including persona, category, tags, and importance levels ($1-5$).
  4. Contextual Retrieval: When a user asks about past events or related topics, the agent performs a multi-dimensional query to fetch relevant memories.
  5. Relationship Mapping: The system can link related memories to create a knowledge graph, representing how different concepts or experiences interconnect.
  6. Autonomous Maintenance: Periodically, the skill recalculates the importance of memories based on retrieval frequency and temporal decay.

Shared Memory Knowledge Base Setup

To initialize the shared memory environment, prepare the directory structure and set optional environment variables:

# Create the default storage directory
mkdir -p ~/.openclaw/memory/index

# (Optional) Set a custom path for your knowledge base
export MEMORY_KB_PATH="/your/custom/path/memory"

The skill relies on standard Python libraries, requiring no heavy external database dependencies for basic operation.

Shared Memory Knowledge Base Data Schema & Taxonomy

The knowledge base organizes information using a structured taxonomy to ensure high retrieval accuracy.

Field Description Constraints
Content The core memory text 20-2000 characters
Persona The origin identity e.g., Work, General, Dev
Category Functional classification e.g., Methodology, Insight
Tags Metadata keywords Max 10 tags per entry
Importance Weight for retrieval Scale of 1 to 5
Scene Contextual description Optional situational info

Shared Memory Knowledge Base Advanced Features

  • Auto-Importance Adjustment: Automatically promotes frequently accessed memories and demotes obsolete ones using a decay algorithm.
  • Cross-Persona Sync: Seamlessly bridge the gap between different agent identities using the 'all' persona query capability.
  • Periodic Reflection Narratives: Generates natural language summaries of learning progress over specific timeframes (week/month).
  • Semantic Linking: Manually or automatically establish relations like 'Evidence', 'Contrast', or 'Extension' between memory nodes.
  • Dry-run Maintenance: Preview importance recalibrations and index integrity before committing changes to the filesystem.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*