AGY Ext Swarm
Integrates with Git repositories to isolate workers in git worktrees and branches, preview merge conflicts with git merge-tree, and merge results via squash, cherry-pick, or merge with abort-on-error.
Runs OpenAI Codex CLI as an external headless worker, using codex exec / exec resume, JSONL output, and sandbox configuration.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
AGY Ext Swarm — External Multi-CLI Agent Swarm Plugin for Antigravity
中文文档 | English
An open-source Antigravity (AGY) plugin that lets Antigravity act as the Coordinator (architect, task splitter, diff reviewer, and merger) while orchestrating external headless coding CLI workers across dsh (DeepSeek Harness), Claude Code (claude), OpenAI Codex (codex), Gemini CLI (gemini), or any custom CLI command over a shared message board.
Key Capabilities
Zero-Setup AI Auto-Delegation (
rules/AGENTS.md): Includes an always-on plugin rule that guides Antigravity to automatically compose and launch CLI squads for multi-module coding, batch tasks, broad research, or cross-review without manual squad setup—while staying out of the way for small single-file edits or when disabled.Pluggable External CLI Providers & One-Click Presets: Auto-detects available CLIs across macOS, Linux, and Windows (
PATH/PATHEXT), with one-click templates for popular coding CLIs (OpenCode, Aider, Qwen Code, Goose) plus inlinecustom_commandorproviders.json.Interactive UI Commander & Settings: Create swarms, launch workers (with
depends_onDAG dependencies), start Multi-CLI Arenas, apply Team Playbook Templates, configure CLI binaries/models/pricing, and preview/merge worktrees directly from the side-pane UI.Deterministic DAG Orchestration (
depends_on): Downstream workers queue asblocked, ignore premature@all/ peer wakes, unlock automatically with upstream diffs & board summaries once dependencies succeed, and fail safely without deadlock if upstream breaks.Zero-Side-Effect Conflict Preview & Safe Merge (
ext_swarm_merge): Usesgit merge-tree --write-treeto detect conflicts without touching the working tree, then merges cleanly viasquash,cherry-pick, ormergewith automatic abort-on-error and optional worktree cleanup.Multi-CLI Arena & Cross-Vendor Auto Review: Race 2+ CLI backends in parallel isolated worktrees (
ext_swarm_arena), compare commits/diff/tokens side by side, and trigger another CLI vendor to perform a read-only audit (ext_swarm_cross_review).Reusable Team Templates (
templates.json): Ships with built-in playbooks (feature-squad,bug-hunt,doc-and-test) merged with global/repotemplates.json.Shared Message Board, Timeouts & Watchdog: Append-only
board.jsonlwith@name,@group,@all,@coordinator,max_hops, hardturn_timeout_seconds, and silencestall_timeout_secondswatchdog.Session Resume & In-Place Switch / Retry: Captures
sessionId/thread_idacross follow-up wakes and lets you retry failed workers or switch theirprovider/modelin place while preserving their existinggit worktreeand branch.Git Worktree Isolation, Colored Diff Drawer & Auto Verify: Parallel writers run in isolated
git worktreebranches (ext-swarm/<swarmId>/<worker>); optionalallowed_fileswhitelists check out-of-scope edits mechanically,auto_verify: truedeterministically runsverify_commandshost-side after each turn, and the Workers tab includes a full colored Git Diff drawer.Unified Token, Cache & Cost Telemetry + Markdown Export: Tracks AGY Main Model and External CLI Workers side-by-side (
cacheRead / (input + cacheRead)), calculates optional estimated costs when model rates are set, and supports exporting full Markdown post-mortem reports (ext_swarm_export) or cleaning up historical swarms (ext_swarm_delete).Bilingual Side-Pane MCP App (
中 / EN): Interactive Board, curved Bezier Graph & Replay scrubber (with DAG edges), Workers Commander + Event/Diff/Merge Drawers, Usage Dashboard, and Settings Center.
Related MCP server: pi-mcp
Supported CLI Providers
Provider ID | CLI Command | Session Resume | Streaming Events | Notes |
|
|
| NDJSON ( | Supports |
|
|
|
| Maps permission presets to |
|
|
| JSONL ( | Runs |
|
|
|
| Runs |
| Any executable | Optional |
| Inline via |
Auto-Detection & providers.json
When default_provider is omitted in ext_swarm_create, AGY Ext Swarm automatically picks:
"defaultProvider"from<repo_root>/.agy-ext-swarm/providers.jsonor${PLUGIN_DATA}/providers.json, if set;Otherwise the first built-in CLI found on
PATH(dsh->claude->codex->gemini);Otherwise the first available custom provider.
Example providers.json:
{
"defaultProvider": "my-agent",
"providers": {
"my-agent": {
"displayName": "My Local Coding CLI",
"command": "my-agent-cli",
"args": ["--cwd", "{{cwd}}", "--model", "{{model}}", "-p", "{{prompt}}"],
"resumeArgs": ["--cwd", "{{cwd}}", "--resume", "{{sessionId}}", "-p", "{{prompt}}"],
"promptMode": "arg",
"outputFormat": "text",
"defaultModel": "default",
"models": ["default", "fast"]
}
}
}Supported template variables in args / resumeArgs:
{{prompt}}, {{model}}, {{cwd}}, {{sessionId}}, {{permissionMode}}, {{workerName}}, {{swarmDir}}, {{gitCommonDir}}, {{boardCli}}.
Installation & Build
The repository ships zero-dependency self-contained runtime bundles (server/dist/index.mjs and server/dist/board.html, requiring no node_modules or pnpm at runtime). Choose any of the following installation methods:
1. For agy CLI Users (Direct Repository Install)
agy plugin install https://github.com/ycuwq/agy-ext-swarm2. For Antigravity Desktop App Users — npx One-Command Install (Recommended, Cross-Platform)
Requires only Node.js >= 20 (no git, pnpm, or agy CLI needed). Automatically copies the self-contained plugin into ~/.gemini/config/plugins/agy-ext-swarm while preserving .data/ across upgrades:
npx -y agy-ext-swarm installUseful management commands:
npx -y agy-ext-swarm status # Inspect install path, version, and bundle health
npx -y agy-ext-swarm install --workspace # Install into ./.agents/plugins for team/repo sharing
npx -y agy-ext-swarm uninstall # Uninstall the global plugin3. GitHub Release One-Liners & Offline Archives (No npm Required)
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/ycuwq/agy-ext-swarm/main/scripts/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/ycuwq/agy-ext-swarm/main/scripts/install.ps1 | iexManual Offline Install: Download
agy-ext-swarm.tar.gzoragy-ext-swarm.zipfrom GitHub Releases and extract theagy-ext-swarm/folder into~/.gemini/config/plugins/(or.agents/plugins/). Nopnpm installstep is needed.
4. From Source (Contributors & Local Development)
git clone https://github.com/ycuwq/agy-ext-swarm.git
cd agy-ext-swarm
node scripts/install.mjs # Symlink/junction from git checkout (--copy for standalone copy, --build to rebuild)Manual build:
cd agy-ext-swarm/server
pnpm install
pnpm buildRequirements: Node.js >= 20, git (>= 2.38 recommended for git merge-tree --write-tree), and at least one CLI provider (dsh, claude, codex, gemini, or a custom command).
Notes on dsh Profile Isolation
If using dsh, never modify ~/.dsh/profiles/desktop (locked by the desktop client). Configure your chosen headless (or custom) profile via dsh (and ensure any desired model catalog entries are populated in ~/.dsh/profiles/<profile>/cordis.patch.yml or configured in the Settings tab / providers.json). Nothing is vendor-hardcoded in agy-ext-swarm; when no profile model is detected or configured, dsh runs with its own CLI defaults.
MCP Tools (40 Total: 18 Model + 22 App-Only)
Model Tools (18)
ext_swarm_providers: Inspect available built-in & custom CLI providers, binary status, active multi-CLI pool (activePool), role routing policy (routingPolicy), and resolveddefaultProvider.ext_swarm_models: Query models for a provider (cordis.patch.ymllastCatalogfordsh, orproviders.jsonconfig for others).ext_swarm_create: Create a swarm anchored atrepo_root(supportsdefault_provider, multi-selectactive_providersworking pool,routing_policywith writer/reader pools &auto_failover,coordinator_conversation_id,turn_timeout_seconds,stall_timeout_seconds).ext_swarm_add: Spawn one worker, a multi-CLI fan-out (providers: [...]withouttasks), or ataskssharded pool rotated acrossproviders/ Swarmrouting_policy(withmodels_by_provider,workspace,permission_mode,allowed_files,verify_commands,auto_verify,depends_onDAG, andarena_group).ext_swarm_post: Post ascoordinatorand wake@mentionedworkers (excludeskilledandblockedworkers).ext_swarm_read: Read board messages aftersince.ext_swarm_status: Inspect workers, diffs,outOfScopeFiles,lastVerifyResults, andcoordinatorUsage.ext_swarm_wait: Wait 1–90s forany_post,mentions_coordinator,all_idle, orworker_done(with blocked-dependency deadlock safety).ext_swarm_update_worker: Switch a waiting/failed worker'sproviderormodeland/or retry in place keeping its worktree intact.ext_swarm_merge: Zero-side-effectgit merge-treeconflict preview (action: "preview") and safe branch merge (action: "apply", modessquash|cherry-pick|merge).ext_swarm_arena: Spawn 2+ CLI providers/models side by side in isolated worktrees on the same task for comparison.ext_swarm_cross_review: Auto-select (or specify) a different CLI vendor to run a read-only code review of a worker's diff/output.ext_swarm_templates: List built-in and custom team playbook templates (from global & repotemplates.json).ext_swarm_apply_template: Instantiate a DAG team playbook (optionally creating a new swarm) with{{goal}}injection.ext_swarm_kill: Terminate worker(s) orall, optionally removing temporary worktrees.ext_swarm_delete: Terminate remaining processes, clean up worktrees/branches, and delete a historical swarm record.ext_swarm_export: Generate a Markdown post-mortem report (workers, token/cache stats, optional costs, diffs, and full board transcript).ext_swarm_open_board: Open the live side-pane / global MCP App UI.
App-Only Tools (22)
app_get_snapshot,app_post_message,app_kill_worker,app_get_worker_log,app_get_worker_diff,app_retry_worker,app_bind_conversation,app_set_ui_prefs,app_get_provider_config,app_save_provider_config,app_test_provider,app_delete_swarm,app_export_swarm,app_preview_merge,app_merge_worker,app_create_swarm,app_add_worker,app_start_arena,app_cross_review,app_get_templates,app_save_template,app_apply_template.
Contributing & Security
See CONTRIBUTING.md and SECURITY.md.
Privacy & Security
Main-model usage telemetry reads local Antigravity
transcript.jsonlfiles in strictly read-only mode and never mutates Antigravity logs or sends telemetry anywhere externally.External CLI workers run locally on your machine under their configured sandbox flags (
read-only,workspace-write,danger-full-access).
Customizing the Side-Pane UI
The UI compiles into a self-contained single-file HTML bundle (server/dist/board.html) from:
server/ui/index.htmlserver/ui/styles.css(uses Antigravity host theme tokens)server/ui/app.ts&server/ui/i18n.ts(zh/endictionaries)
After editing:
cd server && pnpm typecheck && pnpm buildThen refresh/restart agy-ext-swarm_ext_swarm in Antigravity MCP settings (or set EXT_SWARM_APP_HTML during UI iteration).
Tests
cd server
pnpm test:providers # Offline multi-provider, parser, and i18n verification (zero API tokens)
pnpm test:smoke # Live dsh E2E smoke testLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Command center for developers coordinating AI coding agents across projects.
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Hand off work between AI agents in any tool. Start Devin or Cursor cloud and share memory.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables multiple AI coding CLIs (Claude Code, Gemini/Antigravity, Codex, and OpenCode) to collaborate as a coordinated team by routing cross-agent prompts, sharing messages and review tickets, tracking tasks on a shared store, and isolating each agent in its own Git worktree with turn-budget safeguards—all inspectable and steerable from a local web dashboard.MIT
- AlicenseNot gradedqualityBmaintenanceOrchestrates multiple coding agents at once so an MCP client can delegate implementation work while retaining judgment: each agent runs in its own isolated git worktree and branch, claims the files it edits, and communicates via a mailbox and shared board. Supports blocking questions to the orchestrator, Codex-written acceptance tests locked before workers start, scope validation, and reporting on first-pass success.1Apache 2.0
- AlicenseBqualityBmaintenanceRuns headless claude, codex and grok processes as one team from whichever of the three CLIs you work in, letting your session delegate work to other engines in their own sandboxes with modes that assign planner, reviewer, implementer and resolver roles and enforce git merge guards.13MIT
- FlicenseNot gradedqualityAmaintenanceEnables a primary AI coding assistant to delegate work in parallel to multiple specialized AI CLI tools (Gemini, Claude, Codex, Cursor) sharing the same project context, then aggregates their findings into a single synthesized response. Runs locally as an MCP server with zero markup, using existing CLI tools, API keys, and subscriptions across 26+ IDE clients.-