pi-agy-subagent
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.
Package details
Install pi-agy-subagent from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-agy-subagent- Package
pi-agy-subagent- Version
0.3.0- Published
- Sep 1, 2026
- Downloads
- 130/mo · 130/wk
- Author
- achiabodo
- License
- MIT
- Types
- extension
- Size
- 94 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
".pi/extensions/agy-subagent/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-agy-subagent
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
| Tool | Purpose |
|---|---|
agy_run |
Delegate a self-contained coding task; live progress, workspace diffstat, conversation chaining (conversationId / continueLast) |
agy_doctor |
Diagnose local setup: binary/version, CLI settings, auth hints (never throws) |
agy_models / agy_agents |
List model slugs / custom agents |
agy_history |
List 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;continueLastresumes 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_outputnever truncated. - Project config:
.pi/antigravity.jsonfor defaults (model/effort/timeout), security guardrails (double opt-in forskipPermissions, hard timeout cap) and streaming tuning. - Diagnostics:
agy_doctorreports 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)