Install
Install with PiG
pig install npm:@maxpaulus/pi-rex-agentsInstall with Pi
pi install npm:@maxpaulus/pi-rex-agentsPackages 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": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.2.2 (README.md). PiG does not review it.
pi-rex-agents
Named pi subagents that run in Rex panes. Each agent is a normal interactive pi, so you can click into its pane and talk to it.
Install
From the repository root, run:
pi install "$PWD"
For agents on another Rex host, install it there too. Update both hosts together so they use the same result handoff format.
Tools (for the master agent)
| Tool | What it does |
|---|---|
agent_spawn | Starts a named agent in a separate interactive terminal and returns at once. Override the layout with split, float, or window. |
agent_send | Types a message into a running agent's pane, or resumes a settled agent with it. |
agent_list | Lists agents and agent definitions. |
Agents in the current session start in named, minimized floating panes by default. Agents on another host or outside the current session default to a separate window.
Pi shows active agents and their status in the Agents row above the input. In fullscreen mode, click an agent to restore and focus its pane. Results and questions arrive automatically.
Agent files
The extension reads one markdown file per agent from agents/ in this package, ~/.pi/agent/agents/, and .pi/agents/ in trusted projects. A later file with the same name wins.
---
name: scout
description: Fast read-only recon
kind: scout # scout = read-only tools + web; worker = every tool
# model: provider/model # optional; defaults to the parent agent's model
thinking: low # optional
tools: read, grep # optional allowlist that replaces the kind's default
---
System prompt and personality.
How it uses Rex
- Spawn:
session.new_split,session.new_layer, orsession.new_windowwithpi --session-id <id>. Remote agents go into api-agentssession on the host. - Status: pi reports OSC 7501 program status. The parent follows
rex eventsforprogram_status_changedandblock_closed. - Child asks parent: the child's
ask_parentopens a pi input dialog, so pi reportsblocked/questionwith the question. The parent answers withrex send+send-key enter. - Settle: when a child settles, it writes its last reply to a handoff file in
~/.pi/agent/rex-agents/and exits. The parent removes the file after the full reply is recorded in its session. Session history stays available for resume. It stays open if the run was aborted or if it still waits on its own subagents. A pane waiting onask_parenthas not settled, so it stays open too. - Resume: start the agent again with the same
--session-id.