pi-agy-subagent

extensionmaintained

Delegate coding tasks to the Google Antigravity CLI (agy) as an external pi sub-agent — headless runs with live progress, workspace diffstat, conversation memory, per-cwd locking and output truncation.

by — · v0.3.0 · published 3w ago

$ pi install npm:pi-agy-subagent
downloads/mo
172
stars
0
last push
3w ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

No downloads in the last 12 weeks.

README

pi-agy-subagent

npm license

Delegate coding tasks to the Google Antigravity CLI (agy) as an external sub-agent for pi — the coding agent. Unofficial, independent project; not affiliated with Google.

agy runs headless in a working directory: it plans, reads and edits files and runs commands autonomously, streaming progress back into pi's TUI, then returns a structured final result.

Install

pi install npm:pi-agy-subagent
# or directly from GitHub
pi install github:AChiabodo/pi-agy-subagent

Requirements: agy on PATH (or AGY_BIN env var) and an authenticated session (run agy interactively once, or configure headless auth with GEMINI_API_KEY).

Tools

ToolPurpose
agy_runDelegate a self-contained coding task; live progress, workspace diffstat, conversation chaining (conversationId / continueLast)
agy_doctorDiagnose local setup: binary/version, CLI settings, auth hints (never throws)
agy_models / agy_agentsList model slugs / custom agents
agy_historyList conversations recorded in the current pi session

Highlights

  • Live progress: DONE steps always surfaced (tool calls + output preview), ACTIVE steps and response streaming throttled, heartbeat guarantees feedback during long silent steps.
  • Workspace diffstat: workspace: 3 file(s) changed, +42 -7 (…) in every result (read-only git, silent fallback outside repos) — trust but verify, no extra commands.
  • Conversation memory: every run records conversationId + cwd; continueLast resumes the most recent conversation for the same working directory (reliable across branch/fork).
  • Per-cwd locking: concurrent runs on the same workspace are serialized (fail-fast by default, queue mode configurable) — no file clobbering.
  • Output policy: outputMode: "tail" keeps the model-facing response within pi's truncation limits (50 KiB / 2000 lines) and saves the full text to a file; structured_output never truncated.
  • Project config: .pi/antigravity.json for defaults (model/effort/timeout), security guardrails (double opt-in for skipPermissions, hard timeout cap) and streaming tuning.
  • Diagnostics: agy_doctor reports binary/version/settings/auth with actionable hints.

Documentation

Full documentation (in Italian): .pi/extensions/agy-subagent/README.md — tool parameters, configuration reference, troubleshooting, development setup.

Development

npm install
npm run check   # typecheck + lint + 101 tests
AGY_SMOKE=1 npx vitest run test/smoke.agy.test.ts   # end-to-end with the real CLI (spends tokens)

License

MIT