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

@e9n/pi-subagent

v0.1.0

Published

Parallel task delegation for pi — spawn isolated subagents for single, parallel, and chain execution

Readme

@e9n/pi-subagent

Parallel task delegation extension for pi. Spawn isolated pi subprocesses for single, parallel, chain, orchestrator, and pool-based agent workflows.

Features

  • Single — delegate one task to a named agent subprocess
  • Parallel — run multiple independent tasks concurrently; results stream back as they complete
  • Chain — pipeline tasks where each step receives the previous output via {previous}
  • Orchestrator — hierarchical agent trees where agents spawn and message each other autonomously
  • Pool — long-lived agents with persistent context; send follow-up messages without losing state
  • Agent discovery — reads agent definitions from ~/.pi/agent/agents/*.md and .pi/agents/*.md
  • Extension isolation — subagents run with --no-extensions by default; whitelist only what's needed
  • System prompt injection — injects available agents and usage patterns into the LLM context automatically
  • Bundled skill — includes skill definitions for agent orchestration patterns

Setup

Add to ~/.pi/agent/settings.json or .pi/settings.json:

{
  "pi-subagent": {
    "maxConcurrent": 4,
    "maxTotal": 8,
    "timeoutMs": 600000,
    "model": null,
    "extensions": [],
    "blockedExtensions": []
  }
}

| Key | Default | Description | |-----|---------|-------------| | maxConcurrent | 4 | Max subagents running in parallel | | maxTotal | 8 | Max total subagents per session | | timeoutMs | 600000 | Subprocess timeout in ms (10 min) | | model | null | Model override for all subagents (null = use default) | | extensions | [] | Extension paths whitelisted for all subagents | | blockedExtensions | [see below] | Extensions subagents can never load. Default: pi-webserver, pi-cron, pi-heartbeat, pi-channels, pi-web-dashboard, pi-telemetry. pi-subagent is always blocked. |

Tool: subagent

Delegate tasks to isolated pi subprocesses. Choose a mode by supplying the matching parameter.

Modes

| Mode | How to invoke | Description | |------|---------------|-------------| | Single | { agent, task } | Run one agent on one task | | Parallel | { tasks: [{agent, task}, …] } | Run multiple tasks concurrently | | Chain | { chain: [{agent, task}, …] } | Pipeline — each step gets {previous} output | | Orchestrator | { orchestrator: {agent, task} } | Root agent spawns and manages sub-agents autonomously | | Pool: spawn | { action: "spawn", id, agent, task } | Start a persistent agent | | Pool: send | { action: "send", id, message } | Send a follow-up message to a pool agent | | Pool: list | { action: "list" } | List all active pool agents | | Pool: kill | { action: "kill", id } | Kill a pool agent and its children | | Pool: kill-all | { action: "kill-all" } | Tear down entire pool |

Key Parameters

| Parameter | Type | Description | |-----------|------|-------------| | agent | string | Agent name (from discovered .md definitions) | | task | string | Task prompt for the subagent | | model | string | Model override for this invocation | | thinking | string | Thinking budget: off, minimal, low, medium, high, xhigh | | extensions | string[] | Extra extension paths to whitelist for this invocation | | noTools | boolean | Run without file/bash tools | | agentScope | string | Agent discovery scope: user, project, or both |

Events

| Event | Payload | Description | |-------|---------|-------------| | subagent:start | { agent, task, trackingId } | Fired when a subprocess is spawned | | subagent:complete | { agent, trackingId, status, tokens, cost, durationMs } | Fired when a subprocess finishes |

Install

pi install npm:@e9n/pi-subagent

License

MIT