Session Memory for Openclaw

A three-layer persistent memory system that converts session transcripts into searchable Markdown and structured glossaries to prevent AI knowledge loss.

moltbotmolty-del
v1.0.0
Feb 24, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install faya-session-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 faya-session-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 Session Memory?

The Session Memory skill solves the most common challenge with long-running AI agents: context compaction. When an agent summarizes old messages to free up context, it often loses granular details like specific file paths, reasoning, and names. This Openclaw Skills extension creates a persistent knowledge base that survives compaction by converting transient session logs into a navigable hierarchy.

By implementing a three-layer architecture—consisting of curated human notes, an auto-generated glossary, and full searchable transcripts—this skill ensures your agent retains a high-fidelity memory of every interaction. This makes Openclaw Skills significantly more reliable for long-term projects where recalling who said what or why a specific decision was made is critical to project success.

Session Memory Use Cases

  • Preventing the loss of technical details or reasoning after an agent performs context compaction.
  • Recalling specific stakeholder names, project decisions, or timelines from conversations months ago.
  • Bootstrapping long-term memory for new agents to give them immediate access to historical project data.
  • Automating the indexing of 24/7 autonomous agents to keep their knowledge base current without manual intervention.

How Session Memory Works

  1. The system scans raw JSONL session logs from the agent directory and converts them into searchable Markdown transcripts.
  2. Assistant responses are intelligently truncated to preserve space while maintaining the core context of the interaction.
  3. A builder script analyzes transcripts to extract people, projects, and topics into a structured SESSION-GLOSSAR.md file.
  4. Decisions and daily timelines are automatically indexed to provide a navigational layer for the agent's vector search.
  5. Automated cron jobs ensure that new interactions are continuously synced and indexed into the memory layer.
  6. The memory_search tool utilizes this hierarchy to find the right session via the glossary before retrieving specific details from transcripts.

Session Memory Setup

First, convert your existing session logs into the searchable Markdown format:

python3 scripts/session-to-memory.py --agent main

Next, generate the structured index and glossary to enable entity tracking:

python3 scripts/build-glossary.py

Finally, optimize your existing automated tasks to use this new memory context:

python3 scripts/cron-optimizer.py

Session Memory Data Schema & Taxonomy

The skill organizes data within a dedicated memory directory to ensure clear taxonomy and easy searchability:

File/Folder Description
MEMORY.md Hand-curated long-term memory and high-level notes.
SESSION-GLOSSAR.md Auto-generated index of people, projects, and timelines.
memory/sessions/ Directory containing full Markdown transcripts of every session.
YYYY-MM-DD.md Daily logs capture specific notes before context compaction.
.glossary-state.json Internal state tracking for incremental indexing.

Session Memory Advanced Features

  • Cron Memory Optimizer: Automatically suggests prompt enhancements for cron jobs to make them memory-aware.
  • Incremental Indexing: High-performance updates that only process new session data using cached state files.
  • Custom Entity Detection: Extensible Python-based regex patterns for identifying domain-specific projects and stakeholders.
  • Decision Extraction: Automated identification of decision-like statements to build a historical record of project pivots.
  • Multi-Agent Support: Capability to aggregate and index memory across different agent IDs within the same Openclaw Skills environment.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*