← Catalog

@ai-devkit/pi-session-tracker

Pi extension that tracks active sessions by PID in a shared JSON registry (~/.pi/agent/sessions.json)

Package

Install

Install with PiG

pig install npm:@ai-devkit/pi-session-tracker

Install with Pi

pi install npm:@ai-devkit/pi-session-tracker
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.1 (README.md). PiG does not review it.

@ai-devkit/pi-session-tracker

A Pi extension that tracks all active Pi sessions in a shared JSON registry at ~/.pi/agent/sessions.json.

What it does

  • On session start — registers { pid: sessionFilePath } in the registry
  • On session shutdown — removes the pid from the registry

The registry always reflects currently-running Pi sessions:

{
  "12345": "/Users/you/.pi/sessions/abc123.jsonl",
  "67890": "/Users/you/.pi/sessions/def456.jsonl"
}

Install

pi install npm:@ai-devkit/pi-session-tracker

Or try it without installing:

pi -e npm:@ai-devkit/pi-session-tracker

Registry location

~/.pi/agent/sessions.json

The directory is created automatically if it does not exist.

Use cases

  • Multi-agent orchestration — discover and communicate with other running Pi processes
  • Session dashboards — know which session files are actively in use
  • Tooling integrations — external scripts that need to find the current Pi session file