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

avtc-pi-subagent

v1.0.4

Published

A subagent tool supporting context compaction and nested subagents — user-customizable models (with round-robin) and tool policies, extensible via hooks.

Readme

avtc-pi-subagent

A subagent tool supporting context compaction and nested subagents — user-customizable models (with round-robin) and tool policies, extensible via hooks.

Parallel Nested Compact View

Features

  • Isolated context — each subagent runs in its own session with its own tools, system prompt, model, and skills.
  • Three dispatch modes — single, parallel (concurrent), chain (sequential with {previous} hand-off).
  • Overridable cwd — dispatch a subagent into a specific directory (e.g. a feature worktree) instead of the main repo.
  • Fork mode — fork a subagent from the parent's session to reuse its prompt cache (see Fork mode).
  • Model routing — per-call override, per-agent config by name or glob with round-robin rotation, and pluggable resolvers (see CONFIGURATION.md).
  • Skills — agents declare skills: in frontmatter; resolved and injected at dispatch; extra skill paths registerable.
  • Tool policy — control which tools each subagent can use, per agent or by glob: add, block, or whitelist tools, with reusable named tool sets and $all (see CONFIGURATION.md).
  • Agent visibility — hide agents from announcements or disable them entirely via config globs (hidden-agents, disabled-agents).
  • Concurrency & timeouts — parallel limit, subagent timeout, inactivity timeout, and a nesting-depth cap to bound recursion.
  • Orphan-safe — subagents self-terminate if the parent process dies.
  • Extensible — other extensions integrate via the pi-subagent:ready event (model resolvers, prompt transformers, agent/skill paths).

Defining agents

Agents are markdown files (YAML frontmatter + system prompt body) in ~/.pi/agent/agents/. Frontmatter fields: name, description, tools, model, skills, extensions, hide-from-agents-list.

hide-from-agents-list: true omits the agent from the subagent tool's "Available agents" list. The agent stays fully usable when called by name (by a user, skill, or other agent).

Fork mode

A -fork suffix marks a subagent as forked: it copies the parent's session system prompt and conversation history, so the prefill cache works. Set via the PI_SUBAGENT_FORK_MODE env var:

  • fork — every subagent runs forked.
  • new+fork — each subagent runs twice in parallel: a fresh copy and a forked copy.
  • (unset) — every subagent runs as a fresh session (default).

Spawn mode

Controls how subagent child processes run. Set via the /subagent:settings Spawn mode dropdown:

  • JSON — each subagent runs as a single-shot process: it receives the task, runs to completion, and exits.
  • RPC — each subagent runs as a long-lived process that the parent talks to over a request/response protocol. A long-running subagent that compacts its own context keeps going on its own (and the parent can recover it if compaction is cancelled), so long tasks run without stalling or aborting as the conversation grows. This is the default.

Configuration

  • Operational settings (timeout, concurrency, depth, spawn mode) — edit via /subagent:settings.
  • Model overrides (which model each subagent uses) — see CONFIGURATION.md.
  • Tool policy (which tools each subagent can use: add / block / only, named sets, hide/disable agents) — see CONFIGURATION.md.

Extensibility

Building an extension that integrates with subagents (model resolvers, prompt transformers, agent/skill paths, env hooks)? See EXTENSIBILITY.md.

Tools

| Tool | Description | |---|---| | subagent | Delegate a task to a specialized agent (single / parallel / chain modes) |

Commands

| Command | Description | |---|---| | /subagent:settings | Open the settings UI (concurrency, timeouts, max depth, spawn mode) |

Installation

pi install npm:avtc-pi-subagent

Full suite

Check out the full suite of related extensions, avtc-pi — deterministic feature development, subagent delegation, working-memory, behavioral learning, parallel-work guardrails, durable decisions, notifications, and more.

Developed with Z.ai — get 10% off your subscription via this referral link.

License

MIT