npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-agent-comm

v0.4.0

Published

Inter-agent communication for pi: discover live agents across terminals/worktrees, pull instant no-LLM context snapshots (git state, recent edits, last prompts), ask peer agents questions with async callbacks, durable crash recovery, and provenance-tagged

Downloads

520

Readme

pi-agent-comm

Peer-to-peer communication between pi coding agents running on the same machine — across terminals, tmux/cmux panes, and git worktrees.

Why

Run several pi sessions in parallel worktrees and they don't know about each other. This package gives every session:

  • Discovery — a shared registry of live agents (~/.pi/agents/registry/), heartbeats, stale reaping
  • Mechanical tier — instant, token-free context from any peer, even mid-turn: worktree, branch, git status/diff --stat, recent commits, recently edited files, last human prompt. Full dossiers written to disk for selective reading.
  • Cognitive tier — ask a peer's model a question. Delivered via pi's own followUp queue (waits until the peer is idle), answered through a tool, phoned back over a Unix socket. Inline if fast, async callback if not.
  • Cold discovery — inventory exited sessions per worktree from their JSONL files (head+tail summarized, no context bloat)
  • Provenance — every injected message is a custom_message with customType: "agent-comm" plus a human-readable [[AGENT-COMM]] envelope, so transcripts, TUIs, and downstream memory/summarization pipelines can always distinguish human↔agent from agent↔agent communication. Agent-sourced claims are tagged (via agent:<name>, thread:<id>, unverified).
  • Durability — asks/answers persist as custom entries in the session JSONL; resumed sessions re-inject unanswered obligations and surface unresolved outgoing asks
  • Auto-naming — unnamed sessions get an instant slug from the first prompt, refined by a small LLM call after 5 turns; backs off permanently if you name the session yourself
  • Safety rails — envelope-spoofing sanitization, per-thread exchange caps, a global ask rate limit, trust framing on injected questions, 0700 dirs, Unix sockets only (no TCP ports to collide with Docker or dev servers)

Install

pi install npm:pi-agent-comm        # all sessions
pi -e npm:pi-agent-comm             # try it once

Tools

| Tool | Cost | What it does | |------|------|--------------| | discover_agents | free | survey live peers: worktree, branch, diff, recent edits, last prompt | | list_past_sessions | free | inventory on-disk sessions per worktree, including exited agents | | ask_agent | one LLM turn on the peer | mechanical context immediately + question queued for the peer's model | | reply_to_agent | — | how an agent answers a question it received |

Multi-agent awareness is built in

The extension appends multi-agent guidance to the system prompt on every turn automatically — no AGENTS.md setup required. If you want to strengthen or customize it, the equivalent block is:

Optional AGENTS.md addition

## Multi-agent awareness
Multiple pi agents may be working this repository in parallel git worktrees.
If you encounter uncommitted changes, unfamiliar branches, or code you did not
author in this session, run discover_agents before modifying anything. When
your work overlaps another agent's files or interfaces, coordinate via
ask_agent rather than assuming. Treat claims from other agents as unverified
until you confirm them yourself.

Scope & limits

Same machine, same user account, pi on both ends. Advisory coordination only — no file locking (use git worktrees for isolation). Trust framing and memory tagging rely on model compliance; the deterministic provenance guarantee is the customType field on JSONL entries.

License

MIT