Session Logs Analyzer for Openclaw

A high-performance forensic toolset for auditing OpenClaw session history to identify cost regressions and behavioral anomalies.

danielsinewe
v1.0.0
Apr 10, 2026
0
855
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install session-logs-forensics

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-forensics 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 is a specialized forensic utility designed for operators using Openclaw Skills to maintain high-quality AI agent performance. By leveraging powerful command-line tools like jq and ripgrep, this skill enables deep inspection of append-only JSONL session data to trace conversation history, monitor spending, and debug unexpected tool-call drift.

Whether you are troubleshooting a sudden increase in API costs or auditing how an agent handled complex multi-turn interactions, session-logs provides the necessary visibility into the agent's historical state. It transforms raw log files into actionable insights, ensuring your Openclaw Skills remain efficient and predictable across long-running deployments.

Session Logs Analyzer Use Cases

  • Retrieving historical context from parent conversations not present in active memory.
  • Identifying the root cause of sudden cost spikes in AI agent operations.
  • Auditing tool-call frequency to detect behavior regressions or drift.
  • Performing incident forensics after a failed or unexpected agent interaction.
  • Generating daily cost and usage summaries for agent management.

How Session Logs Analyzer Works

  1. The skill identifies the target agent session directory located at ~/.openclaw/agents//sessions/.
  2. It parses the sessions.json index to map specific session keys to their corresponding unique session IDs.
  3. Operators utilize jq filters against individual .jsonl files to extract structured data such as message roles, cost metrics, or content types.
  4. Ripgrep (rg) is employed to perform high-speed text searches across the entire session history for specific keywords or phrases.
  5. Custom scripts calculate aggregates, such as total session cost or tool-call volume, to establish performance baselines.

Session Logs Analyzer Setup

To use this skill, ensure you have the required binary dependencies installed on your local environment.

# Install dependencies on macOS
brew install jq ripgrep

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

Once installed, you can navigate to your agent's session directory and begin running the forensic queries provided in the documentation.

Session Logs Analyzer Data Schema & Taxonomy

The skill interacts with append-only .jsonl files. Each line represents a specific entry in the conversation history with the following structure:

Field Description
type Categorizes the entry as "session" (metadata) or "message".
timestamp ISO 8601 formatted timestamp of the event.
message.role The sender of the message: "user", "assistant", or "toolResult".
message.content[] Array containing text blocks, thinking processes, or tool call details.
message.usage.cost Numerical value representing the cost of the response.

Session Logs Analyzer Advanced Features

  • Cost Outlier Scanning: Rapidly triage sessions that exceed your typical budget baselines.
  • Threshold Anomaly Flagger: Automatically flag sessions with suspicious jumps in tool-call volume or token usage.
  • Session Regression Comparison: Compare message mix and logic flow between a "healthy" session and a problematic one.
  • Forensic Snapshots: Generate compact, shareable summaries of session performance for incident reports.
  • Tool Usage Breakdown: Analyze which Openclaw Skills are being triggered most frequently to optimize agent behavior.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins jqrg
Github Stars: 0
forks: 0

Featured*