Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
claude-pi logo

claude-pi

claude-pi

OtherClaude Codeby Courtney Andrew Richardson

Summary

Delegate tasks from Claude Code to Pi agents using cost-appropriate models. Includes session-start model discovery, 7 MCP tools for agent orchestration, and a skill for delegation strategy.

Install to Claude Code

/plugin install claude-pi@claude-pi

Run in Claude Code. Add the marketplace first with /plugin marketplace add crichalchemist/agent-pi if you haven't already.

README.md

claude-pi

A Claude Code plugin that turns Pi into a multi-agent orchestration layer. Run diverse agentic workflows by coordinating a fleet of AI models — Gemini, GPT-4, Claude Haiku, and others — in parallel, outside your context window.

What it does

Claude orchestrates. Pi executes.

When Claude identifies a subtask that is independent, parallelizable, or better suited to a different model, it can delegate that work to a Pi agent and continue reasoning in the main session. Agents run concurrently across providers, each chosen for what it's best at — not just what's cheapest.

At every session start, the plugin discovers your available Pi models and reports them before any user interaction. Claude uses those models throughout the session without any manual configuration.

If you have the superpowers plugin installed, the plugin detects it and surfaces a dedicated skill for routing superpowers workflow roles — spec reviewers, code quality reviewers, parallel investigation agents — to the appropriate Pi model.

Prerequisites

Configure Pi auth once before installing the plugin:

pi auth

Or set provider environment variables directly:

export ANTHROPIC_API_KEY=sk-ant-...
export GEMINI_API_KEY=AIza...
export OPENAI_API_KEY=sk-...

Installation

claude /plugin install github:crichalchemist/agent-pi

No build step required — compiled files are included in the repository.

The plugin patches ~/.claude/CLAUDE.md to instruct Claude to lead with Pi for multi-agent workflows, and writes .mcp.json in the current project directory to register the MCP server.

How it works

Session-start model notification

When a Claude Code session opens, the plugin runs a one-shot script that queries Pi for available models and delivers a notification before any user interaction:

[pi-models] Available: gemini-2.5-pro (frontier), gemini-2.0-flash (fast), gpt-4o (balanced) — default: google/gemini-2.5-pro — use pi_list_models to refresh

Claude reads this notification and routes tasks to the appropriate tier.

| Tier | Examples | Best for | |------|----------|---------| | fast | gemini-2.0-flash, claude-haiku-4-5, gpt-4o-mini | Formatting, boilerplate, retrieval, mechanical transforms | | balanced | gpt-4o, claude-sonnet-4-6, o3-mini | Standard coding, analysis, review, research | | frontier | gemini-2.5-pro, claude-opus-4-7, o3 | Novel reasoning, architecture, security review, state-of-the-art tasks |

MCP tools

The plugin registers seven tools on the pi MCP server:

| Tool | Description | |------|-------------| | pi_list_models | Refresh available models mid-session | | pi_run_task | Run a task and wait for the result (blocking) | | pi_spawn_agent | Spawn an agent and return a session ID immediately | | pi_steer_agent | Send a mid-task steering message (delivered after current turn finishes) | | pi_followup_agent | Queue a non-interruptive message (delivered only after agent finishes all work) | | pi_poll_agent | Check status and partial output of a spawned agent | | pi_get_result | Wait for a spawned agent to finish and return output | | pi_terminate_agent | Abort a running agent |

Parallel orchestration pattern

The primary pattern for multi-agent work:

pi_spawn_agent × N  →  pi_poll_agent loop  →  pi_get_result × N  →  synthesize

Spawn N agents with independent, self-contained prompts. Poll for progress and steer if needed. Collect results and synthesize in the main session.

Skills

The plugin ships two skills:

skills/orchestrate/SKILL.md — guides Claude on when to delegate, which model tier to choose, and how to use the parallel-spawn pattern. Invoke with /claude-pi:orchestrate.

skills/superpowers/SKILL.md — routes superpowers workflow roles to Pi. Spec compliance reviewers, code quality reviewers, and parallel investigation agents are read-only and context-independent — ideal for Pi. Implementer subagents that need Edit/Bash stay on the Agent tool. Invoke with /claude-pi:superpowers.

Status line

The plugin adds a live status line to Claude Code showing running and recently completed Pi agents:

● 2 running  ✓ 3 done

Development

npm install
npm test          # 80 unit tests
npm run build     # compile src/ → bin/

Tests use vitest. The Pi SDK is never imported in tests — all external dependencies are injectable.

License

MIT

Related plugins

Browse all →