session-logs

Search and analyze OpenClaw session JSONL logs using jq and ripgrep.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/travis-burmaster/agentbox --skill session-logs-travis-burmaster
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/travis-burmaster/agentbox/tree/main/agentfork/skills/session-logs
Command: npx skills add https://github.com/travis-burmaster/agentbox --skill session-logs-travis-burmaster

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, rg.

What problem does it solve? When a user references older or parent conversations that are no longer in context, there is no built-in way to recall what was said. This Skill provides ready-to-use jq and ripgrep commands to search, filter, and analyze the complete conversation history stored in session JSONL files. ## Core Features & Use Cases - Session Discovery: List all sessions by date and size, or find sessions from a specific day using the sessions.json index. - Content Search: Extract user or assistant messages from a session and search across all sessions for keywords or phrases. - Usage Analytics: Compute per-session and daily cost totals, message counts, token statistics, and tool usage breakdowns. - Use Case: A user asks "what did we decide about the database migration last week?" You locate the relevant session file by date, extract the text messages, and search for the migration discussion to recover the decision. ## Quick Start Search my past session logs for any conversation where we discussed the deployment configuration and summarize what was decided.

Frequently Asked Questions about session-logs

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

FAQPage Schema
How do I search my past AI conversation history?

Session logs are stored as JSONL files in ~/.openclaw/agents/<agentId>/sessions/. Use ripgrep to search across all session files for a phrase, or use jq to extract text messages from a specific session transcript.

How to extract user messages from a JSONL session file?

Use jq with a filter selecting messages where message.role equals "user", then iterate over message.content entries of type "text" to print the text field. This returns only the human-readable user messages.

How do I calculate the cost of an agent session?

Each message in the JSONL transcript includes a message.usage.cost.total field. Use jq with the -s flag to slurp all lines and sum the cost values, defaulting missing values to zero.

What tools are required to analyze session logs?

The Skill requires jq for parsing JSONL records and ripgrep (rg) for fast text search across session files. Both are standard command-line tools available on macOS and Linux.

Why can't I find a deleted session in the logs?

Deleted sessions are renamed with a .deleted.<timestamp> suffix rather than removed. Check for files matching that pattern in the sessions directory if a session appears to be missing from the index.