Session Memory for Openclaw

Bridges the gap between transient chat logs and long-term memory by summarizing sessions and enabling keyword-based history search.

breezezephyr
v1.0.0
Feb 28, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-memory-workspace

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-workspace 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 is a specialized utility within the Openclaw Skills ecosystem designed to give AI agents persistent historical awareness. It transforms raw session transcripts into structured daily memory files, allowing agents to recall specific details from past conversations through citations and retrieval-augmented generation. By bridging the local session storage and the workspace memory directory, this skill ensures that context is never lost across different sessions.

This skill is particularly valuable for developers building complex workflows where the agent needs to reference previous decisions, code snippets, or user preferences discussed in earlier dates. It provides the technical infrastructure to answer queries like "what did we talk about last week?" while maintaining a clean and searchable data structure for the Openclaw Skills framework.

Session Memory Use Cases

  • Summarizing an entire day of session activity into a single Markdown memory file for future retrieval.
  • Searching through historical session transcripts via keywords to find specific code blocks or architectural decisions.
  • Automating the creation of daily journals or logs based on agent-user interactions.
  • Providing the AI agent with a mechanism to cite past conversations accurately when answering current questions.

How Session Memory Works

  1. The agent triggers the session-to-memory script to process logs from the default sessions directory.
  2. The script aggregates messages for a specific date and generates a concise summary using the configured LLM context.
  3. The summary is written to a daily Markdown file (e.g., memory/YYYY-MM-DD.md) within the local workspace.
  4. When a user asks a question about the past, the agent uses the session-search script to scan JSONL logs for relevant snippets.
  5. The search results or memory files are then fed back into the agent's context, allowing for informed and accurate historical recall within the Openclaw Skills environment.

Session Memory Setup

To get started with this component of Openclaw Skills, ensure you have Node.js installed and follow these steps:

# Navigate to your workspace root
cd ~/.openclaw/workspace

# Summarize a specific day's chat history
node skills/session-memory/scripts/session-to-memory.js --date 2026-02-27 --append

# Search your entire session history for a keyword
node skills/session-memory/scripts/session-search.js --query "your search term" --limit 10

Session Memory Data Schema & Taxonomy

Path Format Description
~/.openclaw/agents/main/sessions/ JSONL Stores the raw transcript of every message and metadata for each session.
<workspace>/memory/YYYY-MM-DD.md Markdown The output file containing daily session summaries used for RAG and citations.
sessions.json JSON An index file used to map session IDs to specific dates and timestamps.

Session Memory Advanced Features

  • Multi-date summarization to reconcile large gaps in project history.
  • Configurable message limits per session to prevent oversized memory files and optimize token usage.
  • Advanced CLI filtering using --since and --until flags for surgical history searches.
  • Seamless integration with the default Openclaw Skills citation system for transparent data sourcing.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins node
Github Stars: 0
forks: 0

Featured*