ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Community Verified developer tools Safety 4/5

session-logs

Search and analyze your own session logs (older/parent conversations) using jq.

Why use this skill?

Learn to search, analyze, and extract insights from your OpenClaw session logs using the powerful session-logs skill. Optimize memory and track costs.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/openclaw/skills/session-logs
Or

What This Skill Does

The session-logs skill acts as an intelligent retrieval system for your OpenClaw conversation history. By interacting with JSONL-formatted logs located in your agent's local directory, this skill allows the AI to perform complex queries, data analysis, and historical context extraction. It essentially bridges the gap between active memory and long-term storage, enabling the AI to recall specific instructions, past reasoning chains, or previous task outcomes that exist outside of current context windows.

Installation

You can install this skill directly via the ClawHub command-line interface. Simply execute the following command in your terminal: clawhub install openclaw/openclaw/skills/session-logs Ensure you have read permissions set for the ~/.openclaw/agents/ directory to allow the tool to index and search your session files properly.

Use Cases

  • Context Retrieval: Recovering specific technical decisions or code snippets from older sessions to inform current development tasks.
  • Cost Tracking: Calculating exactly how much a long-term project has cost in token usage by aggregating the message.usage.cost.total field across multiple session logs.
  • Behavioral Analysis: Performing a breakdown of tool usage frequency to identify which skills you rely on most and which might be underutilized.
  • Audit Trails: Searching for specific phrases or keywords across all past sessions to verify whether a particular topic was discussed or a specific task was completed.
  • Data Aggregation: Summarizing conversation intensity by date to identify peak usage days for your agent.

Example Prompts

  1. "Check my logs from January 6th and tell me what the final consensus was regarding the API integration architecture."
  2. "How much total money have I spent on the agent's token usage since I started using this session ID?"
  3. "Find the last session where I used the web-search tool and list all the URLs I visited during that conversation."

Tips & Limitations

  • Efficiency: Since this skill utilizes jq and rg (ripgrep) for processing, it is extremely fast even with large datasets. Always leverage these tools for filtering before passing data to the LLM to save on token costs.
  • Formatting: Remember that logs are stored as JSONL. If you notice issues, ensure the metadata type is set correctly to 'message' to avoid parsing session headers as conversation content.
  • Data Privacy: This skill reads local files. Since it processes raw logs, ensure your logs do not contain sensitive credentials or PII before sharing your ~/.openclaw directory with others.
  • Filtering: Use the provided pipeline examples (e.g., piping jq into rg) to isolate specific metadata, such as costs or timestamps, to keep the agent's memory efficient and focused on relevant details.

Metadata

Author@openclaw
Stars289479
Views4
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-openclaw-session-logs": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#logs#history#analysis#recovery#retrieval
Safety Score: 4/5

Flags: file-read, code-execution