omp packages

@efrence/pi-agy-supervisor0.1.0

Supervise Antigravity (agy) workers from Pi — spawn, steer, approve and trace independent ACP coding agents from a live TUI roster

efrence Published 1 day ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-agy-acp-supervisor

Run a fleet of independent coding workers from inside Pi. @efrence/pi-agy-supervisor turns your Pi session into a supervisor that delegates implementation work to Antigravity harness workers (agy acp) over the Agent Client Protocol — then watches them live, answers their permission requests, steers them mid-flight, and wakes itself up the moment any of them needs attention.

You keep talking to Pi. The workers do the long-running work in isolated processes and workspaces. Nothing they do ever floods your supervisor's context — you see exactly what you ask for, when you ask for it.

What you get

  • Delegate in natural language — tell Pi what you want built; it spawns workers with self-contained prompts and the right model for each job.
  • A live mission-control TUI — a persistent roster under your editor, plus an interactive viewer per worker: activity stream, steering composer, cancellation, and one-key permission answers.
  • Real permission control — workers ask before they act. Approve or decline from the viewer (p), or let the supervisor handle it; switch a worker to an autonomous mode mid-flight over the ACP control plane, without queueing or interrupting its turn.
  • Event-driven supervision — the supervisor is woken by infrastructure, not polling: terminal events and permission requests wake it immediately, meaningful progress wakes it throttled, a heartbeat covers silence. It never sleep-waits on your workers.
  • Crash-proof operations — every event lands in a local JSONL journal before anything else. Restart Pi and live workers are reconciled; dead sessions stop cluttering your roster.
  • Optional Langfuse tracing — OTLP export with bounded queues, backoff, disk checkpoints, and redaction. Strictly telemetry: never in the control path.

Live UI inside Pi

Command What it does
/agy-workers interactive overlay with the live roster
/agy-worker <workerId> opens a worker's activity viewer

A persistent widget under the editor summarizes the roster. In the viewer: steering composer (s), cancellation (x), permission and question actions (p, Enter approves, d declines), scroll with freeze (j/k, g/G). Full key and flow guide in docs/how-to-use-agy-workers.md.

How it works

Five ideas carry the architecture:

  1. Pi is the supervisor. The primary model lives in Pi and receives only compact notifications or details it explicitly requests.
  2. Antigravity remains the worker runtime. We do not reimplement its agent loop, tools, permissions, or authentication.
  3. The local journal is the operational source of truth. Append-only JSONL per project; Langfuse is history and telemetry, never the live control path.
  4. Detailed activity never enters the supervisor context automatically. worker_activity is explicit, paginated, and bounded.
  5. No hidden mutation of the user environment. Worker settings are materialized per worker; worktrees are created deterministically and never auto-deleted.

The monorepo is organized with explicit domain-driven design — bounded contexts, aggregates, and layered adapters are documented in docs/domain-driven-design.md and docs/architecture.md. Persistence and reconciliation internals live in docs/persistence-recovery.md.

Langfuse export is OTLP/HTTP (/api/public/otel/v1/traces) because Langfuse Cloud retired the v3 ingestion API on 2026-11-16; it is disabled by default — activation in docs/how-to-use-agy-workers.md.

Basic supervisor usage

You rarely call anything directly — you talk to Pi, and Pi uses these tools:

Tool Purpose
worker_spawn create or enqueue a worker and return workerId quickly
worker_list compact roster without transcripts
worker_status state, capabilities, and open requests
worker_result final result, or state if still active
worker_activity bounded local events; enters context only when requested
worker_steer send an additional instruction to the ACP session
worker_cancel cancel the current turn
worker_respond answer an open permission or elicitation
worker_set_mode switch a live worker's permission mode (control plane)
worker_trace bounded summary of the worker Langfuse trace (API v2)
langfuse_export_status exporter health: queue, drops, failures, checkpoints

A bundled Pi skill (supervise-agy-worker) teaches the supervisor the operational discipline out of the box: self-contained prompts, valid model ids, no sleep-polling, steering semantics, and when to use each tool.

Requirements

  • Pi 1.7.x with a configured provider for the supervisor model
  • Antigravity CLI agy 1.5.x
  • git (for isolated worktree workspaces)

For development from source: Node.js >=22.19.0 and pnpm 10.x.

Load the extension in Pi

pi install npm:@efrence/pi-agy-supervisor    # from npm — all projects

From a source checkout instead:

pi install ./packages/pi-extension -l    # project-local (this repo, requires trust approval)
pi install ./packages/pi-extension       # global (all projects)

The repo .pi/settings.json is already wired — open Pi inside the repo, approve trust, and the extension loads on its own. Use /reload after code edits. Quick check inside Pi: > what worker_* tools do you have available?

Pi also needs its own provider configured for the supervisor model, independent of worker auth — see docs/configuration.md for endpoint examples.

Authentication and endpoints

Workers authenticate through official agy mechanisms — nothing custom:

  • Google/Gemini Enterprise login, Gemini API key, Application Default Credentials;
  • or any Gemini-compatible endpoint via GOOGLE_GEMINI_BASE_URL.

For endpoint setups, the extension reads dotenv files so you never export keys per shell:

# ~/.pi-agy-fusion/env  (chmod 600, never commit)
GEMINI_API_KEY=<your-api-key>
GOOGLE_GEMINI_BASE_URL=http://127.0.0.1:8317

<project>/.pi-agy-fusion/env overrides per project; shell exports win over files; values are never journaled. Do not append /v1beta to the base URL. Note that GEMINI_API_KEY alone is not enough — agy also requires modelProvider: "gemini" in settings, which the extension injects by default into an isolated per-worker --gemini-dir (mode 0600), leaving your global config untouched.

Details in docs/configuration.md and docs/antigravity-acp.md.

Worker models: fixed ids

agy acp accepts only 8 fixed model ids (gemini-4-neon, gemini-4-carbon, gemini-4-hydrogen, gemini-4-argon, gemini-3.8/3.7/3.6-flash, gemini-3.1-pro) — they are hardcoded in the Antigravity binary and cannot be extended. Treat them as labels rather than specific models: what actually executes behind each label depends on the Gemini-compatible endpoint agy is pointed at and how that endpoint resolves model names. The supervisor picks the label per worker with worker_spawn's model parameter; omit it to use the harness default.

If you place a proxy in front of your model providers, verify how it handles aliased or unknown model names before relying on them — behavior varies, and some proxies replace a model's public name when an alias is configured. docs/configuration.md has configuration examples.

Known limitations

Verified against the real harness (evidence in docs/capability-matrix.md):

  • permissions and elicitation flow end-to-end with real models;
  • steering is accepted mid-turn but with queue semantics — it does not interrupt generation in progress;
  • multi-worker concurrency, same-process and cross-process.

With negative or missing evidence:

  • no reliable context continuity after cross-process session/resume — resume is accepted, but the worker does not recall the original turn; treat it as a fresh session;
  • complex tool calling and large-context behavior depend on the upstream model behind each alias.

Documentation

Document Topic
docs/how-to-use-agy-workers.md daily practical guide: commands, keys, flow, caveats
docs/configuration.md supported configuration and endpoint examples
docs/architecture.md overall architecture and control/data flow
docs/domain-driven-design.md bounded contexts, aggregates, layers, and ubiquitous language
docs/antigravity-acp.md ACP, lifecycle, auth, models, and limitations
docs/worker-lifecycle.md states, steering, cancellation, permissions, and questions
docs/persistence-recovery.md JSONL journal, snapshots, replay, and reconciliation
docs/pi-extension.md tools, notifications, context isolation, and use in Pi
docs/workspaces.md directory policy and git worktrees
docs/security.md secrets, redaction, permissions, workspaces, and risks
docs/capability-matrix.md supported and unverified capabilities, with evidence
docs/validation.md commands, test strategy, and probes
docs/troubleshooting.md diagnosis of common errors
docs/langfuse-roadmap.md Langfuse integration design (implemented via OTLP)

License

MIT