@peeraponw/pi-moa

Second-opinion command for pi: ask every configured model in parallel, optionally aggregated.

Packages

Package details

extension

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

$ pi install npm:@peeraponw/pi-moa
Package
@peeraponw/pi-moa
Version
0.2.0
Published
Sep 28, 2026
Downloads
228/mo · 9/wk
Author
peeraponw
License
MIT
Types
extension
Size
38.6 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/moa/index.js"
  ]
}

Security note

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

README

pi-moa

Second-opinion command for pi. /moa <prompt> asks every configured model the same question in parallel and shows each answer labeled with its model. An optional aggregator can merge the answers into one final take.

What it does

  • /moa <prompt> fans out to all configured models in parallel.
  • Each model sees the session's user and assistant text, without tool schemas or tool results, plus your prompt as the final message.
  • Every answer renders as its own labeled section. A failed model renders as an error section, so the others still show.
  • When an aggregator is configured, it receives the same conversation with the opinions appended in a tagged block, and its merged answer renders last.
  • Output is display only. Nothing is injected into the session transcript, and no provider or model is registered or switched.
  • Config is read on each invocation, so edits take effect without a reload.

Install

pi install npm:@peeraponw/pi-moa

Or try without installing:

pi -e npm:@peeraponw/pi-moa

You can also install straight from GitHub:

pi install git:github.com/peeraponw/pi-moa

Configure

Run:

/moa setup

Pick global or project, then edit the JSON in the editor. The default config uses zai/glm-5.2:xhigh and openai-codex/gpt-5.5:xhigh with no aggregator:

{
  "models": [
    { "name": "glm-5.2", "provider": "zai", "model": "glm-5.2", "thinking": "xhigh" },
    { "name": "gpt-5.5", "provider": "openai-codex", "model": "gpt-5.5", "thinking": "xhigh" }
  ]
}

Schema:

  • models (required, at least one entry). Each entry:
    • name (optional): label shown in the output.
    • provider, model (required): model reference, as in /model.
    • thinking (optional): off, minimal, low, medium, high, xhigh, max.
    • maxTokens, temperature (optional).
  • aggregator (optional): same shape as a model entry, minus name. Its answer renders as the final section. Set it to null in a project config to remove a global aggregator.

Config files:

  • global: ~/.pi/agent/moa.json
  • project override: .pi/moa.json, read only when the project is trusted

A project models array replaces the global one wholesale. Project-level aggregator replaces or removes the global aggregator.

Configs from older versions with presets fail validation with an error that names the new schema.

Use

/moa is this migration plan sound?
/moa list
/moa setup
/moa help

/moa <prompt> needs your configured providers to have working auth, the same as running them as your session model.

Reserved words

Prompts whose first word is setup, list, or help are treated as those commands, so such a prompt needs rephrasing.