session-logs

Search and analyze JSONL conversation logs with jq and rg.

386k|81.1k|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/openclaw/openclaw --skill session-logs-openclaw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/openclaw/openclaw/tree/main/skills/session-logs
Command: npx skills add https://github.com/openclaw/openclaw --skill session-logs-openclaw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, rg, and includes references (resource) components.

What problem does it solve?

This Skill allows you to search and analyze your past conversation logs, which are stored in JSONL files, enabling you to recall previous discussions or context.

Core Features & Use Cases

  • Session Log Search: Query your complete conversation history stored in ~/.openclaw/agents/<agentId>/sessions/.
  • Data Analysis: Utilize jq to filter and extract specific information like user messages, assistant responses, costs, and tool usage from session files.
  • Use Case: If a user asks about a decision made in a previous conversation that isn't in the current memory, you can use this skill to search through session logs to find the relevant information.

Quick Start

Use the session-logs skill to search for the keyword "budget" in all assistant responses across all sessions.

Frequently Asked Questions about session-logs

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

FAQPage Schema
How do I search past conversation logs stored in JSONL format?

To search conversation logs stored in JSONL format, use this skill to query session files with `jq` and `rg`. It filters historical context, user messages, and tool usage from the `~/.openclaw/agents/` directory.

Can I extract cost data and tool usage from my session history?

Yes, you can extract cost data and tool usage from session history by applying `jq` filters to the JSONL files. This allows you to isolate and analyze specific metrics from your past agent interactions.

Do I need `jq` and `rg` installed to analyze session files?

Yes, you need `jq` and `rg` installed to analyze session files. These command-line tools are required dependencies for efficiently processing JSONL logs and performing pattern matching on conversation data.

What is the best way to find a specific decision made in a previous conversation?

The best way to find a previous decision is to search session logs for relevant keywords. Use `rg` for pattern matching across conversation history files and `jq` to extract the matching assistant responses.

How does querying JSONL session logs with `jq` work?

Querying JSONL session logs with `jq` works by parsing each line as a JSON object to filter and extract specific fields like user messages or costs. `rg` complements this by quickly finding matching text patterns across files.