tools / agent-pi

Turn Pi into a governed multi-agent platform.

Agent Pi extends Mario Zechner's Pi with orchestration modes, specialist teams, browser viewers, security governance, and Web Chat — pure configuration, no forks, no patches.

CLI extension suite v2.1.0 MIT 240 stars on GitHub

The problem

A great single-agent coding CLI handles one human's requests. But once you move to multi-agent orchestration — spawning specialist teams, governing sub-agents, orchestrating workflows — you need a way to extend the CLI without forking it or replacing it entirely. The solution should be configuration-driven, testable, and inspectable.

What Agent Pi does

Agent Pi is an extension suite that transforms Pi into a multi-agent orchestration platform. You define teams and workflows in YAML, load extensions via TypeScript (with a zero-build jiti loader), and launch them with Shift+Tab modes: PLAN, SPEC, TEAM, CHAIN, PIPELINE, INVESTIGATE, DEBUG, IMPLEMENT, GOAL. External agents — Claude Code, Codex, Cursor, Commander — connect through Agent Pi's native tooling and read/write the same task store you see in your terminal.

Agent Pi v2 adds governed sub-agent execution: sub-agents run with explicit runtime capabilities (isolated auth, sandboxed roots, fenced memory), capability-based security instead of prompt-based control, and an agent evaluation lab that separates success (task done) from exit code (0 or 1).

What makes it different

  • Pure configuration. No forks, no patches — extend Pi entirely through YAML orchestration and TypeScript extensions loaded at runtime via jiti (zero build step).
  • Specialist teams. Define teams of agents (separate Claude Code and Codex sessions, for example) and orchestrate them in parallel or chained workflows.
  • Browser viewers. Plan approval UI (reorder, inline-edit steps), completion reports (per-file diffs, rollback), and spec wizard for 4 frameworks (Context-OS, Kiro/EARS, OpenSpec, SpecKit) — all in the browser, fall back to Commander's native viewer.
  • Governed sub-agents. v2 enforces runtime capabilities: sub-agents get explicit write roots, isolated credentials, no ambient PATH, fenced memory namespaces. Capability-based security, not prompt-based.
  • Security guard. Blocks rm -rf, sudo, credential theft, and prompt injection; includes a /secure sweep command to audit agent logs for vulnerability.
  • Web Chat. Control Pi from your phone or colleague's laptop via LAN with Cloudflare quick-tunnel: QR-code pairing, PIN auth, zero setup.

Install

Agent Pi is distributed as a git-based package. Use the installer or Pi's package manager:

pi install git:github.com/ruizrica/agent-pi

Agent Pi extends Pi by Mario Zechner. If you haven't installed Pi yet, start there; Agent Pi works as a drop-in extension once Pi is running.