Files
research-pi/README.md
T

2.3 KiB

research-pi

Headless research orchestrator for pi-coding-agent.

Spawns a headless Pi orchestrator that delegates to read-only subagents to:

  • Research new topics (--start_research)
  • Onboard existing codebases (--onboarding)
  • Plan new features (--new_feature)

Install

curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/YOUR_REPO/main/install.sh | bash

Requires: node, pnpm, and pi (pi-coding-agent) installed.

Usage

# Research a new topic
research --model kimi-for-coding --start_research \
  --task "native android app using gemma 4 e4b"

# Onboard an existing project
research --model minimax-token-plan/MiniMax-M2.7 --onboarding

# Onboard a specific part of a project
research --model k2p5 --onboarding \
  --task "i6_experiments/user/nikolov/experiments/voxpopuli"

# Plan a new feature
research --model kimi-for-coding --new_feature \
  --task "add a comment section to my react blog"

Outputs

Mode Files written
--start_research PLAN.md, research/web-summary.md, research/paper-summary.md
--onboarding MAP.md, ONBOARDING.md
--new_feature FEATURE.md

Configuration

Create ~/.pi/research/config.json:

{
  "webSearch": {
    "mode": "extension",
    "searxngUrl": "http://192.168.178.58:7777",
    "mcpUrl": "http://sleepy-think:3001/mcp"
  },
  "models": {
    "default": "kimi-for-coding",
    "web-researcher": "k2p5",
    "paper-researcher": "minimax-token-plan/MiniMax-M2.7"
  }
}
  • webSearch.mode: extension (default, ships embedded SearXNG extension), mcp (proxy to MCP server), or skill (raw curl fallback)
  • models.default: fallback if no --model passed
  • models.<agent-name>: per-subagent model override

Architecture

  • bin/research — thin launcher that resolves models, builds the Pi CLI invocation, and streams output
  • extensions/subagent-spawner.ts — registers spawn_subagent tool so the orchestrator can delegate
  • extensions/web-search.ts — SearXNG-based web_search + web_fetch tools
  • extensions/mcp-web-search.ts — MCP-proxy variant
  • agents/orchestrator.md — system prompt for the orchestrator
  • The orchestrator is the only agent with write access. All subagents are strictly read-only.