@pi-plugins/subagent
Minimal subagent tool extension for pi-agent: delegate a task to a fresh headless pi instance.
Package details
Install @pi-plugins/subagent from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@pi-plugins/subagent- Package
@pi-plugins/subagent- Version
0.1.7- Published
- Jul 23, 2026
- Downloads
- 962/mo · 67/wk
- Author
- kedom1337
- License
- MIT
- Types
- extension
- Size
- 58.7 KB
- Dependencies
- 2 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./dist/index.mjs"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@pi-plugins/subagent
A minimal subagent tool for pi-agent: delegate a task to a fresh, headless pi instance with an isolated context window.
No agent presets, no orchestration modes — just a subagent tool that spawns another
instance of the running pi harness (pi --mode json -p --no-session) and returns its
final response. Child processes inherit the parent environment with
PI_CACHE_RETENTION=short, so they keep pi's standard provider cache retention
instead of inheriting a process-wide or OAuth-plugin extended setting.
Install
pi install npm:@pi-plugins/subagent
For a one-off run without adding it to settings:
pi -e npm:@pi-plugins/subagent
For local development, load it straight from this directory:
pi -e ./plugins/subagent
Tool parameters
| Parameter | Required | Description |
|---|---|---|
description |
yes | A short (3-5 word) description of the task |
prompt |
yes | The task for the agent to perform |
model |
no | Model override for this agent (passed to pi --model) |
cwd |
no | Working directory for the agent process (defaults to the parent's cwd) |