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])"'