session-logs

Search and analyze agent session logs stored as JSONL transcripts using jq.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/shalevamin/Tau_agent --skill session-logs-shalevamin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/shalevamin/Tau_agent/tree/main/tau-agent-main/skills/session-logs
Command: npx skills add https://github.com/shalevamin/Tau_agent --skill session-logs-shalevamin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, rg.

What problem does it solve? When a user references an older or parent conversation that is no longer in context, there is no built-in way to recall what was said. This Skill lets you search, filter, and analyze your complete conversation history stored in session JSONL files. ## Core Features & Use Cases - Full-History Search: Search across all session transcripts for keywords or phrases using jq and ripgrep. - Session Analytics: Compute per-session and daily cost totals, message counts, token usage, and tool usage breakdowns. - Message Extraction: Extract user or assistant text messages from any session for review. - Use Case: A user asks "what did we decide about the database schema last week?" You locate sessions from that date, extract the relevant messages, and summarize the prior decision. ## Quick Start Search my session logs from January 6th for any mention of the deployment plan and summarize what was discussed.

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 conversation history with an AI agent?

Session transcripts are stored as JSONL files under ~/.openclaw/agents/<agentId>/sessions/. Use ripgrep to search across all files for a phrase, or jq to filter messages by role and extract text content from a specific session.

How to extract user messages from a JSONL session file?

Pipe the session file through jq with a filter selecting entries where message.role equals user, then extract text-type content blocks. This returns only the human-readable user messages from the transcript.

How can I calculate the total cost of an agent session?

Each message records usage.cost.total. Use jq with the slurp option to sum all cost values in a session file, or loop over all session files grouped by date to produce a daily cost summary.

What tools are required to query session JSONL logs?

The workflow requires jq for parsing JSONL records and ripgrep (rg) for fast text search across files. Standard Unix utilities like head, sort, and awk are used for sampling and aggregation.

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 transcript appears to be missing.