pi-session-reader

Read Pi agent session JSONL files to monitor activity and conversation history.

4|1|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/louis030195/bigbrother --skill pi-session-reader
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-session-reader
Source: https://github.com/louis030195/bigbrother/tree/main/.pi/skills/pi-session-reader
Command: npx skills add https://github.com/louis030195/bigbrother --skill pi-session-reader

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Read Pi agent sessions to monitor what other agents are doing and understand their conversation history.

Core Features & Use Cases

  • Monitor ongoing Pi agent activity and quickly determine busy/idle status.
  • Retrieve recent conversations for audit or debugging.
  • Quick status checks across multiple projects by inspecting session files.

Quick Start

Find the latest session for a project: ls -t ~/.pi/agent/sessions/--Users-louisbeaumont-Documents-screenpipe--/*.jsonl | head -1

Check agent status from the latest session: SESSION=$(ls -t ~/.pi/agent/sessions/--Users-louisbeaumont-Documents-screenpipe--/*.jsonl | head -1) tail -1 "$SESSION" | jq '{role: .message.role, stopReason: .message.stopReason}'

Read recent conversations: SESSION=$(ls -t ~/.pi/agent/sessions/--Users-louisbeaumont-Documents-screenpipe--/*.jsonl | head -1) tail -30 "$SESSION" | jq -r 'select(.type=="message") | "(.message.role): (.message.content | if type=="array" then (.[0].text // .[0].type) else . end | tostring | .[0:150])"'

Frequently Asked Questions about pi-session-reader

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

FAQPage Schema
How do I monitor Pi agent activity and check if an agent is busy or idle?

You can monitor Pi agent activity by locating the latest JSONL session file and using jq to parse the final message, extracting the role and stopReason fields to determine whether the agent is currently busy or idle.

How do I read Pi agent session history for debugging and auditing?

Read Pi agent session history by using the tail command on the JSONL session file and piping the output through jq to filter message types and extract conversational roles along with their text content for audit or debugging review.

What's the best way to check agent status across multiple projects from session files?

Check agent status across projects by listing JSONL session files sorted by modification time within each project directory, then extracting the stopReason from the latest file to quickly assess busy or idle states.

How does parsing JSONL session files with jq expose agent conversation data?

Parsing JSONL session files with jq filters message entries by type and extracts structured fields like role, content arrays, and stopReason, converting raw session logs into readable conversation histories and status indicators.

Can I retrieve recent conversation history from a Pi agent session without reading the entire file?

Yes, you can retrieve recent conversation history by using the tail command with a line count on the JSONL session file, then piping only those last lines through jq to extract and format the message roles and content snippets.

Does this approach to monitoring agent sessions require any external dependencies?

Monitoring agent sessions requires only standard command-line utilities like ls, tail, and jq to locate and parse JSONL files, needing no external libraries or frameworks to review Pi agent activity and status.