session-logs

Search and analyze past conversation logs in JSONL format using jq and rg.

19.0k|5.6k|Updated Jul 9, 2024
One-click install
npx skills add https://github.com/elizaOS/eliza --skill session-logs-elizaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-logs
Source: https://github.com/elizaOS/eliza/tree/main/packages/skills/skills/session-logs
Command: npx skills add https://github.com/elizaOS/eliza --skill session-logs-elizaos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, rg, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows you to search and analyze your past conversation history stored in session JSONL files, enabling you to recall information from older or parent conversations.

Core Features & Use Cases

  • Session Log Access: Locate and access conversation transcripts stored in ~/.otto/agents/<agentId>/sessions/.
  • Data Analysis: Utilize jq and rg to filter, extract, and analyze messages, costs, and usage patterns within sessions.
  • Use Case: When a user asks about a decision made in a previous, unrelated chat, you can use this skill to quickly find that conversation and extract the relevant details.

Quick Start

Use the session-logs skill to search for sessions containing the keyword "budget".

Frequently Asked Questions about session-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search past conversation logs for a specific keyword?

You can search past conversation logs by using `rg` to locate specific keywords across JSONL session files, then use `jq` to extract and filter the matching message content, cost data, or usage patterns from those historical interactions.

What is the best way to extract historical context from previous agent interactions?

The best way to extract historical context from previous agent interactions is parsing the JSONL session files stored in `~/.otto/agents/<agentId>/sessions/` with `jq` to filter and retrieve specific message content and usage patterns.

Do I need jq and rg installed to analyze session data?

Yes, you need both `jq` and `rg` installed to analyze session data, as `rg` handles rapid keyword searching across session files while `jq` parses and extracts the structured JSONL data from those conversation logs.

Can I retrieve cost data and usage patterns from older chat sessions?

Yes, you can retrieve cost data and usage patterns from older chat sessions by running `jq` queries against the JSONL session files stored in your agent's sessions directory to filter and extract the specific historical metrics you need.

How do I find a decision made in a previous unrelated chat?

To find a decision made in a previous unrelated chat, search your stored JSONL conversation logs using `rg` with keywords related to that decision, then use `jq` to extract and display the relevant message content from the matching session.

What are the limitations of searching conversation history with jq?

A key limitation is that searching conversation history with `jq` and `rg` is restricted to session data stored locally in `~/.otto/agents/<agentId>/sessions/`, meaning it cannot access conversations from other platforms or sessions not saved in this JSONL directory.