Session Logs Analyzer for Openclaw

A specialized utility for querying, auditing, and extracting insights from your AI agent's complete conversation history using JSONL analysis.

guogang1024
v1.0.0
Feb 4, 2026
31
46.3k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-logs

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-logs 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 Logs Analyzer?

The session-logs skill provides a robust interface for searching and analyzing historical conversation data stored in session JSONL files. It enables users to bridge the gap between current interactions and past context by providing programmatic access to every exchange, metadata, and tool usage record generated by the agent.

By leveraging powerful CLI tools like jq and rg, this entry in the Openclaw Skills ecosystem transforms raw log files into actionable intelligence. Whether you need to recover a specific piece of information from a weeks-old thread or audit the financial overhead of your automation, this skill provides the precision needed for professional agent management.

Session Logs Analyzer Use Cases

  • Retrieving context from parent conversations or older chat threads not currently in memory.
  • Auditing daily or session-specific API costs and token consumption metrics.
  • Analyzing tool usage patterns to optimize agent performance and identify common failure points.
  • Searching for specific keywords or instructions across thousands of historical messages using regex.
  • Generating message frequency and interaction reports for agent performance reviews.

How Session Logs Analyzer Works

  1. The skill identifies the active agent's session directory within the .clawdbot storage path using the agent ID.
  2. It references the sessions.json index to map specific provider keys (like Discord or WhatsApp) to their respective session IDs.
  3. The system executes jq or ripgrep commands against the append-only JSONL files to filter and extract specific data points like message roles, timestamps, or content types.
  4. Extracted data is processed to calculate aggregates, such as total cost or message counts, and then presented as a structured response.

Session Logs Analyzer Setup

To use this skill, ensure that your environment has jq and ripgrep (rg) installed. These binaries are essential for the Openclaw Skills log processing capabilities.

# Install dependencies on macOS
brew install jq ripgrep

# Install dependencies on Ubuntu/Debian
sudo apt-get install jq ripgrep

No further configuration is required as the skill automatically detects the session path at ~/.clawdbot/agents/<agentId>/sessions/.

Session Logs Analyzer Data Schema & Taxonomy

The skill interacts with JSONL files where each line represents a discrete event or message. The schema is optimized for high-speed filtering.

Field Type Description
type string Defines the record type: "session" (metadata) or "message".
timestamp string ISO-8601 formatted timestamp of the event.
message.role string Identifies the sender: "user", "assistant", or "toolResult".
message.content array Contains text blocks, thinking blocks, or tool call objects.
message.usage.cost.total number The calculated USD cost of the specific response.

Session Logs Analyzer Advanced Features

  • Global search capability across all session history using ripgrep integration for near-instant keyword matching.
  • Automated financial reporting that generates daily cost summaries by aggregating JSONL usage fields.
  • Granular tool usage breakdown to see which functions are being called most frequently and by which agent.
  • Text-only noise reduction mode that filters out system metadata and thinking blocks to show only human-readable dialogue.
  • Session recovery support for identifying and reading logs from deleted sessions marked with timestamp suffixes.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins jqrg
Github Stars: 0
forks: 0

Featured*