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

@0xkobold/pi-orchestration

v0.3.0

Published

Agnostic subagent orchestration for pi-coding-agent. Supports single, chain, parallel, and fork execution modes with depth limiting and worktree isolation.

Readme

pi-orchestration

Agnostic subagent orchestration for pi-coding-agent

A TypeScript package for orchestrating multi-agent workflows with depth limiting, worktree isolation, and model flexibility.

Features

  • Single Execution: Spawn a single typed agent with a task
  • Chain Execution: Execute agents in sequence, passing output between steps
  • Parallel Execution: Execute multiple agents concurrently with limits
  • Fork Execution: Share parent's context for efficiency

Agent Types

| Type | Emoji | Purpose | Depth Limit | |------|-------|---------|-------------| | scout | 🔍 | Fast reconnaissance | 0 | | specialist | 🧠 | Domain expert | 1 | | worker | ⚒️ | Implementation | 1 | | reviewer | 👁️ | Quality validation | 0 | | coordinator | 🎯 | Task orchestration | ∞ |

Model Flexibility

pi-orchestration inherits the parent agent's model registry and selects the best model for each agent type:

// "auto" = use parent's ctx.modelRegistry (default)
{ agent: "worker", model: "auto" }

// Explicit model
{ agent: "worker", model: "ollama/qwen2.5-coder:14b" }

// Use parent's current model
{ agent: "reviewer", model: "inherit" }

Supported Providers

  • ollama/* - Local or cloud Ollama models
  • claude/* - Anthropic Claude
  • anthropic/* - Alias for claude/
  • Any custom provider registered via pi-coding-agent

Installation

npm install @0xkobold/pi-orchestration

Usage

Single Execution

import { orchestrate } from "@0xkobold/pi-orchestration";

const result = await orchestrate({
  agent: "worker",
  task: "Implement user authentication",
}, ctx);

console.log(result.content);

Chain Execution

const result = await orchestrate({
  chain: [
    { agent: "scout", task: "Analyze the codebase structure" },
    { agent: "planner", task: "Create implementation plan" },
    { agent: "worker", task: "Implement the feature" },
    { agent: "reviewer", task: "Review the changes" },
  ],
}, ctx);

Parallel Execution

const result = await orchestrate({
  parallel: [
    { agent: "scout", task: "Audit frontend security" },
    { agent: "scout", task: "Audit backend security" },
    { agent: "scout", task: "Audit infrastructure" },
  ],
}, ctx);

With Options

const result = await orchestrate({
  agent: "worker",
  task: "Refactor authentication module",
  cwd: "/path/to/project",
  timeout: 60000,        // 60 second timeout
  maxOutput: 5000,       // 5000 character max output
  isolation: {
    type: "worktree",
    diffOnComplete: true,
    autoApply: false,
  },
  model: "ollama/qwen2.5-coder:14b",
}, ctx);

API

orchestrate(options, ctx)

Main orchestration function.

Options:

  • agent - Agent type for single execution
  • task - Task description
  • chain - Array of steps for chain execution
  • parallel - Array of tasks for parallel execution
  • cwd - Working directory
  • timeout - Timeout in milliseconds
  • maxOutput - Maximum output length
  • isolation - Isolation configuration
  • model - Model override
  • context - Context mode: fresh, fork, or inherit

Returns: OrchestrateResult | ChainResult | ParallelResult

Tools

  • orchestrate - Main orchestration tool (single, chain, parallel execution)
  • orchestrate_status - Check engine status and pi CLI availability

Architecture

src/
├── core/           # Types and agent definitions
├── utils/          # Model selection, depth tracking, templates
├── modes/          # Single, chain, parallel, fork execution
├── execution/      # Main orchestration engine
└── tools/          # pi-coding-agent skill definitions

License

MIT