📜

session-logs

Search and analyze your complete conversation history in session JSONL files using jq and ripgrep.

автор: OpenClawv1.0.0
Coding Agents & IDEsProductivityOpen SourceAutomationCLISelf-HostedDeveloper Tool
Подключение к ВМ...
Подключение к ВМ...
npx clawhub@latest install session-logs
20Текущие установки
v1.0.0Версия

Требования

jqrg

session-logs gives your AI agent the ability to search and analyze its own conversation history stored in session JSONL files. When a user references a prior chat, asks what was discussed before, or needs context from a parent conversation, this skill lets the agent dig into historical transcripts directly.It uses jq for structured JSON querying and rg (ripgrep) for fast full-text search, enabling everything from keyword lookups to cost summaries across all past sessions.

Принцип работы

Session logs are stored as append-only JSONL files at ~/.openclaw/agents//sessions/. Each file contains one JSON object per line, representing messages with roles (user, assistant, toolResult), timestamps, content, and cost metadata.The skill reads the sessions.json index to map session keys to file IDs.It uses jq to filter and extract structured data — such as messages by role, tool usage, or per-session cost.It uses rg (ripgrep) for fast full-text search across one or all session files.Results are returned to the agent for summarization and response to the user.

Ключевые возможности

Full Conversation Search — Search across all past sessions for any keyword or phrase using ripgrep.Role-Filtered Extraction — Pull only user messages, assistant responses, or tool results from any session.Cost Analysis — Calculate total cost per session or generate a daily cost summary across all sessions.Session Listing & Discovery — List all sessions sorted by date and file size; find sessions from a specific day.Tool Usage Breakdown — See which tools were called most frequently in any given session.Message & Token Counting — Get message counts, role breakdowns, and timestamps for any session.Deleted Session Awareness — Deleted sessions are retained with a .deleted. suffix and remain queryable.

Требования

jq — Required for parsing and querying JSONL session files. Must be available on PATH.rg (ripgrep) — Required for fast full-text search across session files. Must be available on PATH.No API keys or external services are required. All data is read from local files on disk.

Сценарии использования

Recall Prior Conversations — A user asks "what did we discuss last Tuesday?" — the agent finds and summarizes the relevant session.Track Spending — Generate a daily or per-session cost breakdown to understand AI usage costs over time.Audit Tool Usage — Review which tools the agent called most frequently across a session for debugging or optimization.Cross-Session Keyword Search — Find every session where a specific topic, name, or phrase was mentioned.

Как установить

1
Run in your terminal
npx clawhub@latest install session-logs
or
2
Click the Install button at the top of this page for one-click setup

Часто задаваемые вопросы

Отзывы

0 отзывов

Войдите, чтобы написать отзыв

Отзывов пока нет. Будьте первым, кто поделится своим опытом!