@mjfuertesf/pi-ask-pi

Run isolated Pi subagents from Pi via the AskPi tool

Packages

Package details

extension

Install @mjfuertesf/pi-ask-pi from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@mjfuertesf/pi-ask-pi
Package
@mjfuertesf/pi-ask-pi
Version
0.1.4
Published
May 31, 2026
Downloads
621/mo · 330/wk
Author
mjfuertesf
License
MIT
Types
extension
Size
359.9 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ],
  "image": "https://gitlab.com/mjfuertesf/pi-ask-pi/-/raw/main/assets/screenshots/askpi-demo-1.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-ask-pi

Run isolated Pi subagents from Pi with the AskPi tool.

pi-ask-pi is a Pi extension for local development workflows. It registers an AskPi tool that launches a fresh pi --print subprocess, passes it an isolated prompt, and returns the subagent output to the parent Pi session.

Install

pi install git:gitlab.com/mjfuertesf/pi-ask-pi
pi install npm:@mjfuertesf/pi-ask-pi

Repo: https://gitlab.com/mjfuertesf/pi-ask-pi

Usage

After installing, Pi exposes an AskPi tool with:

  • prompt — task or question for the isolated subagent
  • model — optional model override; defaults to the parent model
  • timeout — optional timeout in milliseconds

Example:

Use AskPi to review this implementation plan for edge cases.

Demo

AskPi demo 1

AskPi demo 2

What it does

  • registers the AskPi tool
  • always runs a fresh raw pi --print subprocess as an isolated subagent
  • defaults to the parent model when model is omitted
  • returns the subagent's inline output directly
  • accepts an optional timeout in milliseconds

Development

npm install
npm test

npm test runs:

tsx --test ./*.test.ts