pi-subagentura
Public Pi package that adds in-process sub-agents via the SDK
Package details
Install pi-subagentura from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-subagentura- Package
pi-subagentura- Version
1.0.3- Published
- Apr 28, 2026
- Downloads
- 423/mo · 166/wk
- Author
- lmn451
- License
- MIT
- Types
- extension
- Size
- 21.9 KB
- Dependencies
- 0 dependencies · 5 peers
Pi manifest JSON
{
"extensions": [
"./subagent.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-subagentura
Note: The
docs/folder is managed by thepi-docspackage.
A public Pi package that adds two in-process sub-agent tools:
subagent_with_context— spawn a sub-agent that inherits the full conversation historysubagent_isolated— spawn a sub-agent with a fresh, empty context window
The sub-agents run inside the current Pi process, stream live progress back to the UI, and inherit the active model by default.
Why use it?
- Delegate focused side-tasks without leaving the current session
- Compare context-aware vs isolated reasoning
- Keep tool feedback lightweight with live status updates
- Avoid subprocess overhead for sub-agent execution

Installation
Install globally:
pi install npm:pi-subagentura
Install for just the current project:
pi install -l npm:pi-subagentura
Try it for a single run without installing:
pi -e npm:pi-subagentura
You can also install directly from GitHub:
pi install git:github.com/lmn451/pi-subagentura
Tools
subagent_with_context
Starts a sub-agent with the current conversation history included in its prompt.
Parameters:
task— required task for the sub-agentpersona— optional system-style personamodel— optional model override likeanthropic/claude-sonnet-4-5cwd— optional working directory override
Best for:
- review tasks that depend on prior discussion
- continuing a line of reasoning in parallel
- focused implementation or research using the current context
subagent_isolated
Starts a sub-agent with no inherited conversation history.
Parameters:
task— required task for the sub-agentpersona— optional system-style personamodel— optional model override likeanthropic/claude-sonnet-4-5cwd— optional working directory override
Best for:
- second opinions
- clean-room summaries
- avoiding context contamination from the parent session
Example prompts
- “Use a sub-agent to review this change and list risks.”
- “Use an isolated sub-agent to propose a README outline for this repo.”
- “Spawn a context-aware sub-agent to continue debugging while we keep planning here.”
Development
This repo uses Bun for local development.
bun install
bun test
bun run pack:check
Contributing
Contributions are welcome. See CONTRIBUTING.md.