Session Memory Enhanced for Openclaw

A comprehensive three-in-one memory management solution that automatically synchronizes AI session data, updates QMD knowledge bases, and commits changes to Git.

zhaog100
v3.4.0
Mar 7, 2026
0
220
2

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-memory-enhanced

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 session-memory-enhanced 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 Session Memory Enhanced?

Session Memory Enhanced is a sophisticated memory management hook designed for high-efficiency AI development workflows. It serves as a superior alternative to native session memory by integrating a three-in-one solution: session saving, QMD knowledge base indexing, and automated Git repository commits. By utilizing immutable sharding and session cleaning, this skill helps users maintain a permanent, searchable record of interactions while optimizing performance.

As part of the Openclaw Skills ecosystem, it addresses common pain points such as redundant token consumption and fragmented knowledge storage. It features advanced logic like 20-second debouncing and PID locking to prevent process conflicts, ensuring that your AI agent's long-term memory remains consistent and reliable across multiple sessions.

Session Memory Enhanced Use Cases

  • Automated long-term memory management for multi-hour project discussions.
  • Synchronizing development progress between AI coding sessions and Git repositories.
  • Building a searchable local knowledge base from raw AI chat histories via QMD.
  • Reducing API costs by filtering system metadata and utilizing incremental updates during session processing.

How Session Memory Enhanced Works

  1. Triggering: The workflow initiates via manual commands like /new or /reset, periodic crontab schedules, or real-time file monitoring using inotify.
  2. Session Capture: The script captures raw session data into a temporary buffer while ensuring native session-memory hooks have completed their cycle.
  3. Session Cleaning: It automatically filters out system messages, metadata, and unique message IDs to ensure high-precision indexing and search results.
  4. Sharding & Optimization: Once specific conditions are met, the buffer is solidified into immutable JSON shards to save significant token costs during subsequent AI processing.
  5. Sync & Commit: The knowledge base is updated with new vectors, and all changes are committed to the Git repository with detailed statistics on additions and modifications.

Session Memory Enhanced Setup

Installation via ClawHub

clawhub install session-memory-enhanced

Manual Setup

  1. Copy the script to your workspace:
cp scripts/session-memory-enhanced.sh /root/.openclaw/workspace/scripts/
chmod +x /root/.openclaw/workspace/scripts/session-memory-enhanced.sh
  1. Configure crontab for automated updates:
crontab -e
# Add the following for hourly updates:
0 * * * * /root/.openclaw/workspace/scripts/session-memory-enhanced.sh >> /root/.openclaw/workspace/logs/session-memory-enhanced.log 2>&1

Session Memory Enhanced Data Schema & Taxonomy

Path Description
scripts/session-memory-enhanced.sh The main execution logic and logic controller
logs/session-memory-enhanced.log Detailed run history and change statistics
MEMORY.md Primary file for long-term memory and project context
memory/YYYY-MM-DD.md Daily session logs for chronological tracking
memory/partNNN.json Immutable shards used for token-efficient knowledge retrieval

Session Memory Enhanced Advanced Features

  • Debounce mechanism (20s) to prevent redundant triggers during rapid AI interactions.
  • PID locking system to prevent process conflicts and ensure data integrity in multi-agent environments.
  • Real-time monitoring support using inotify and systemd service integration for instant updates.
  • Automated vector generation using qmd embed for advanced RAG capabilities.
  • Multi-agent support via centralized configuration in agents.json.
  • Smart commit strategy that only triggers Git actions when meaningful changes are detected.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*