Session History for Openclaw

A powerful retrieval tool designed to search and browse past conversation transcripts across all agent sessions.

amor71
v1.0.0
Feb 20, 2026
0
1.9k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-history

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-history 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 History?

The Session History skill provides a robust mechanism for developers to access the long-term historical context of their AI interactions. By indexing and searching through JSONL transcript files stored locally, this tool allows for seamless continuity between disparate work sessions. It is a vital component for those building with Openclaw Skills who need to recover specific code snippets, architectural decisions, or logical threads that may not have been explicitly moved to permanent memory files.

Session History Use Cases

  • Recalling specific discussions or technical decisions from previous weeks.
  • Resuming a complex development thread that was prematurely closed or lost in the UI.
  • Extracting specific code snippets or error logs from past debugging sessions.
  • Cross-referencing historical chat logs against current project documentation.
  • Responding to user prompts such as "find that conversation about the API migration."

How Session History Works

  1. Run the search_sessions.py script with keyword terms to identify relevant sessions across the agent directory.
  2. Utilize the sessionKey returned by the search to target specific log files.
  3. Pull the full context from the transcript using the sessions_history tool or by reading the JSONL file directly.
  4. Process the raw data to provide a concise summary or specific answer rather than dumping raw transcripts into the current chat.

Session History Setup

The Session History tool is typically included in the scripts directory of your agent environment. To begin using it within the Openclaw Skills framework, you can run commands directly from your terminal:

# Search for conversations about a specific topic
python3 scripts/search_sessions.py "database migration"

# List all sessions from the last 7 days
python3 scripts/search_sessions.py --list --days 7

# Search a specific agent's history
python3 scripts/search_sessions.py "feature request" --agent lead-dev

Session History Data Schema & Taxonomy

The skill organizes data within a predictable directory structure for easy programmatic access:

Component Details
Storage Path ~/.openclaw/agents/{agent_id}/sessions/
File Format JSONL (JSON Lines) for streaming and append-only efficiency
Search Scope Covers both user-sent messages and assistant responses
Metadata Includes session UUIDs, timestamps, and agent identifiers

Session History Advanced Features

  • Multi-agent history scanning to find interactions across different specialized agents.
  • Time-based filtering using the --days flag to narrow down results in high-volume environments.
  • Keyword and exact matching capabilities that search the entire transcript body.
  • Complementary workflow with memory_search, allowing for both semantic and keyword-based retrieval of Openclaw Skills data.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*