session-logs

Search and analyze JSONL session logs with jq and rg.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/MaxSaiets/myOpenCL --skill session-logs-maxsaiets
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/MaxSaiets/myOpenCL/tree/main/openclaw/skills/session-logs
Command: npx skills add https://github.com/MaxSaiets/myOpenCL --skill session-logs-maxsaiets

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Search and analyze your own session logs stored as JSONL files to recover context from older conversations and inform decisions.

Core Features & Use Cases

  • Index and query session history across multiple sessions using jq and rg.
  • Extract user and assistant messages, timestamps, and costs for auditing.
  • Reconstruct conversation trails to provide historical context during planning or debugging.

Quick Start

Ask it to pull and summarize prior conversations from your session logs to provide historical context.

Frequently Asked Questions about session-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search conversation history stored in JSONL session logs?

You can search conversation history stored in JSONL session logs by using jq and rg to parse and filter data from the ~/.openclaw/agents/<agentId>/sessions directory. This allows you to retrieve specific prompts, responses, and timestamps from prior sessions.

Can I extract cost data and timestamps when analyzing session logs?

Yes, you can extract costs and timestamps when analyzing session logs by querying the structured JSONL files with jq. This enables auditing of assistant responses and accurate reconstruction of historical conversation trails across multiple sessions.

What is the best way to reconstruct prior conversation trails for debugging?

The best way to reconstruct prior conversation trails for debugging is to query the sessions.json index and individual <session-id>.jsonl files. Using rg and jq filters historical context from stored session logs to recover older prompts and assistant responses.

Does this session log search tool require any external dependencies?

No external dependencies are required to use this session log search tool. It operates independently by relying on standard jq and rg command-line utilities to parse JSONL files directly from the local ~/.openclaw/agents/<agentId>/sessions path.

How do I retrieve historical context from older agent sessions?

To retrieve historical context from older agent sessions, you parse the JSONL files located in the standard sessions directory. The tool indexes user and assistant messages across sessions to help you recall prior prompts and inform current decisions.

What format do session logs need to be in for conversation analysis to work?

Session logs must be stored in JSONL format within per-session files and a sessions.json index. The conversation analysis tool specifically reads these structured files from the standard ~/.openclaw/agents/<agentId>/sessions path to parse and filter log data.