ai-teams
English | 简体中文
ai-teams — Multi-Agent Coding & Cross-Vendor Blind Code Review for Antigravity & Claude Code
Stop letting an AI grade its own homework. Never stall mid-feature on Claude rate limits.
ai-teams is a zero-dependency Model Context Protocol (MCP) server, GEMINI.md rule kit, and multi-agent coding workflow that unites Google Antigravity IDE (agy CLI) with Anthropic Claude Code CLI (claude) into an automated Plan -> Execute -> Cross-Vendor Blind Code Review -> Quota-Failover engineering team. One drop-in command routes planning, unattended coding, independent cross-model review, and interrupted-run recovery across accounts and vendors on macOS, Linux, WSL2 (native shell), and Windows PowerShell — macOS and Linux run natively with no WSL2 required. The same stdlib server is also a universal MCP server: drive it from Antigravity IDE, Claude Code CLI, Cursor, Windsurf, or a plain terminal (setup guide).
What's New in v2.5.2: Fixed headless read-only shell checks in
agy_verify/agy_plan, raised Claude turn budgets (40/25) witherror_max_turnsresume caching, enabled zero-__pycache__MCP startup (python3 -B), and tightened verifier anti-fabrication guardrails — see CHANGELOG.md.
Single-LLM Coding vs. ai-teams
Dimension | Single-LLM coding |
|
Code review | The same model grades its own output, so blind spots survive | Routine edits are audited read-only by Google Gemini ( |
Rate limits | The feature stalls when the subscription hits its 5-hour cap | Account B |
Token & context cost | Every retry reloads the full conversation history | Warm |
Git safety & rollback | Risky checkpoints and hidden commits | Temporary |
Footprint & setup | Multiple packages and orchestration services | 11 tools on the Python 3 standard library (zero |
Related MCP server: wezbridge
Why ai-teams?
Cross-vendor double-blind review, no self-grading: Routine edits are audited read-only by Google Gemini (
agy_verify), while major/high-risk/PR changes runagy_verify+claude_verify(Claude Opus) in parallel under shared read locks.Automatic quota failover with incremental resume: When Claude hits rate limits, 5-hour caps, or outages mid-task,
last_errorplus partial disk edits (Interrupted Run Recovery) let Account B (agy_execute) finish incrementally without spending primary IDE quota.Zero-dependency Python 3 MCP server (11 tools): Built strictly on the standard library (
0pip/npmpackages) and run on the host over stdio to eliminate sandbox prompts, backed by per-workspace RWLock concurrency and full process-tree cancellation.Token-frugal continuity: Warm
--resumesessions, automatic external-edit drift injection, a<= 2 KBL1 workspace brief with L1/L2/L3 progressive state, and zero-LLMclaude_handoffpackets.One-command, non-intrusive drop-in:
init-ai-team.sh/init-ai-team.ps1initialize or upgrade any repository in seconds; wrappers stay in.agents/scripts/, and an idempotent.gitignoreblock keeps.agents/andGEMINI.mdout of project commits.Works with any MCP client: The same zero-dependency
mcp_server.pyruns under Antigravity IDE, Claude Code CLI, Cursor, Windsurf, and generic stdio clients — see docs/universal-mcp.md.
Architecture Overview
flowchart LR
U["Operator (macOS / Linux / WSL2)"] --> A["Desktop App Account A (Neon Planner & Coordinator)"]
A -->|Native Plan Save| P[".agents/plans/*.md"]
A --> M["MCP Server (mcp_server.py, 11 Tools)"]
M -->|Worker Threads + RWLock| CR["Claude Runner (claude_runner.py)"]
M -->|Worker Threads + RWLock| AR["Agy Runner (agy_runner.py)"]
CR -->|Exclusive Write Lock| SC["Claude CLI (claude_execute, Warm --resume)"]
AR -->|Exclusive Write Lock, Tier-2 Fallback| AE["agy CLI Account B (agy_execute: hydrogen-xhigh)"]
AR -->|Shared Read Lock| AV["agy CLI Account B (agy_verify Primary: carbon-high)"]
CR -->|Shared Read Lock| OC["Claude CLI (claude_verify Secondary: opus)"]
AR -.->|Shared Read Lock, On-Demand| AP["agy CLI Account B (agy_plan Offload)"]
AR -.->|STATUS READY Confined Write| P
A -.->|UI / Dual-CLI Outage| CV["Carbon / Hydrogen (Desktop Tier-3 Fallbacks)"]
CR <-->|Temp GIT_INDEX_FILE Trees| G["Workspace & Git Trees (No .git/index Mutated)"]
CR <-->|L1/L2/L3 + last_error + session-index| L[".agents/state/ (Gitignored)"]
AR <-->|agy:workspace + planner:workspace + verify| LAccount A — Desktop App (
Gemini 4 Neon): Native codebase planning (direct chat or/planwriting.agents/plans/*.md), human-in-the-loop alignment, MCP orchestration, double-blind deduplication, and final summaries.Local
claudeCLI (claude_execute*/claude_verify): Primary unattended executor (sonnet-> Sonnet 5.5) on a warm"workspace"session, plus parallel read-onlyclaude_verify(opus-> Opus 5.5) on major/high-risk changes and automatic primary-audit fallback ifagyis unavailable.Account B —
agyCLI (agy_*MCP tools): Primary cross-vendor blind auditor viaagy_verify(gemini-4-carbon-high), Tier-2 fallback executor viaagy_execute(gemini-4-hydrogen-xhigh), and optional on-demandagy_planoffload for huge repository scans.
Deep dive into concurrency, blind-review isolation, and state handling: docs/architecture.md.
How a Task Flows
Plan (Account A): Antigravity Neon clarifies requirements and produces a delta plan or
.agents/plans/<nn>-<topic>.md; huge scans can be offloaded withagy_plan.Execute (Claude):
claude_execute/claude_execute_startimplements the plan unattended on the warm"workspace"session with external-drift injection.Audit (Gemini, optionally + Opus):
agy_verifyaudits every incremental diff read-only; milestones add a parallel, mutually blindclaude_verify.Recover & iterate: On Claude rate limits,
agy_executefinishes from partial disk edits; failed audits loop back throughclaude_executewith at most 3 fix rounds.
30-Second Quick Start
Prerequisites:
Python 3.9+ and Git
Claude Code CLI (
claude) onPATHGoogle Antigravity Desktop App +
agyCLI (native on macOS / Linux / WSL2; no WSL2 needed on macOS or Linux)Windows PowerShell supports the full Claude workflow; standalone wrappers under
.agents/scripts/also run directly from any terminal
Platform | Installer | Claude workflow ( | Account B ( |
macOS / Linux / WSL2 (native shell) |
|
|
|
Windows PowerShell |
|
| Via MCP tools (no PowerShell |
# macOS / Linux / WSL2 — clone the kit, deploy into your project, switch into it, then run zero-cost preflight checks
git clone https://github.com/risingsunabc-byte/ai-teams.git
./ai-teams/scripts/init-ai-team.sh /path/to/your-project
cd /path/to/your-project
./.agents/scripts/claude-exec.sh --healthcheck --workspace .
./.agents/scripts/agy-exec.sh --healthcheck --workspace .# Windows PowerShell — clone the kit, deploy into your project, switch into it, then run the Claude preflight check
git clone https://github.com/risingsunabc-byte/ai-teams.git
.\ai-teams\scripts\init-ai-team.ps1 -TargetDir "C:\path\to\your-project"
cd "C:\path\to\your-project"
.\.agents\scripts\claude-exec.ps1 -Healthcheck -Workspace .For --force in-place upgrades, --no-git-init, standalone CLI usage, exit codes, and the startup checklist, see docs/mcp-tools.md.
Prefer the terminal only? Every capability has a standalone CLI entrypoint under
.agents/scripts/; the Desktop App is optional for audits, execution, and plan offload.
Universal MCP Server (Any Client)
.agents/plugins/claude-executor/mcp_server.py is a newline-delimited JSON-RPC 2.0 MCP stdio server on the Python 3 standard library — no pip installs and no platform lock-in. The key difference from Antigravity's ${PLUGIN_ROOT} config: universal clients point directly at the absolute path of mcp_server.py.
Client | Setup |
Antigravity IDE | Drop-in plugin via |
Claude Code CLI |
|
Cursor |
|
Windsurf / generic MCP clients | Same |
Plain terminal |
|
Full copy-paste configs, low-friction setup combinations (you do not need two Antigravity accounts or WSL2 on macOS/Linux), and the CLAUDE_STRICT_MCP_CONFIG=1 recursion guard: docs/universal-mcp.md.
11 MCP Tools at a Glance
Tool | Purpose |
| Zero-cost Claude preflight: binary, version, |
| Sync small/medium edits ( |
| Asynchronous heavy edits ( |
| Polls any async job from |
| Cancels any Claude or Agy job, kills the full child process tree, releases the RWLock |
| Shared read lock; fresh read-only Opus secondary audit ( |
| Zero-LLM read-only UTF-8 Markdown packet ( |
| Zero-cost Agy preflight: binary, version, |
| On-demand Account B plan offload: shared read lock, warm |
| Primary cross-vendor blind audit: fresh read-only |
| Tier-2 fallback on Claude quota/outage: exclusive write lock, |
Full schemas, defaults, environment overrides, and CLI flags: docs/mcp-tools.md.
Documentation Map
Document | What you'll find |
Runtime concurrency, core mechanisms, routing matrix, relay sequence, Swarm/Teamwork playbooks, guardrails | |
Model routing, all 11 MCP tools, | |
Universal MCP setup for Claude Code, Cursor, Windsurf, and any stdio client | |
Every delivered milestone from v2.0 through v2.5.2 and the planned v2.6+ roadmap | |
Repository layout, design principles, local verification, and high-impact contribution areas | |
简体中文 landing page (this page mirrored) | |
架构与内部机制(中文) | |
MCP 工具、CLI、初始化与验证清单(中文) | |
任意 MCP 客户端接入指南(中文) |
Roadmap & Contributing
With the automated installer builder (scripts/build_installers.py) and cross-platform CI now in place, the #1 open contribution is:
Pluggable external CLI adapters — Codex CLI, Gemini CLI, Aider, or OpenCode runners that consume zero-LLM
claude_handoffpackets natively. If you already use those tools or subscriptions, you are exactly who we are looking for.Windows
agy-exec.ps1parity for Account B workflows beyond the POSIX wrappers.Token/cost summaries across
claudeandagyrendered intoworkspace-brief.md.Pure CLI / single-account examples for running without the Antigravity Desktop App (see docs/universal-mcp.md for the current combinations).
Start with CONTRIBUTING.md, then open an issue at github.com/risingsunabc-byte/ai-teams/issues.
License
Licensed under the Apache License 2.0 — see LICENSE.
Topics: Google Antigravity · Antigravity CLI (agy) · Claude Code CLI · Model Context Protocol (MCP Server) · GEMINI.md · Multi-Agent Coding · Cross-Vendor Code Review · Double-Blind AI Verification · Anthropic Claude (Sonnet / Opus) · Google Gemini · Quota Failover · Universal MCP · macOS / Linux / WSL2 / Windows PowerShell
Available Tools
11 toolsagy_executeA
Execute an approved plan or incrementally continue an interrupted Claude run via Account B local Antigravity CLI (default gemini-4-hydrogen-xhigh). Acquires an exclusive write lock, shares .agents/state/ L1/L2/L3 continuity + Interrupted Run Recovery context, captures git tree checkpoints (pre_run_tree/post_run_tree), and supports async_mode=true.
Inputs: workspace_dir (required), plan, model, effort, +10 more.
agy_healthcheckA
Zero-LLM readiness check for local Antigravity CLI (agy, e.g. Account B). Verifies binary discovery, agy --version, ~/.gemini/antigravity-cli/settings.json, model/effort/sandbox defaults, active jobs, and optional workspace .agents/state status.
Inputs: workspace_dir.
agy_planA
Optional on-demand Account B read-only planning offload via local Antigravity CLI (agy --mode plan) for huge repo scans or conserving Account A quota. Reuses warm planner session (default session_key='planner:workspace') with external drift detection and enforces Line 1 STATUS: READY | NEED_CLARIFICATION | BLOCKED. Only writes optional save_plan_file (strictly under .agents/plans/) from host Python when STATUS: READY and no workspace mutation occurred. Supports async_mode=true.
Inputs: request (required), workspace_dir (required), model, effort, +8 more.
agy_verifyA
Run an independent read-only primary cross-vendor blind audit via local Antigravity CLI (agy --mode plan, default gemini-4-carbon-high) in a fresh context without --resume or executor self-reports. Acquires a shared read lock (runs in parallel with claude_verify for double-blind checks on major changes), checks directory snapshots, enforces VERDICT: PASS|FAIL|BLOCKED, and supports async_mode=true.
Inputs: workspace_dir (required), plan, model, effort, +10 more.
claude_executeA
Synchronous fast path (capped at 165s, strictly under Antigravity's 180s MCP limit) to execute small/medium approved plans unattended via local Claude Code CLI (Sonnet 5.5) with automatic local continuity cache (.agents/state/plan-history.md and session-index.json). Returns BUSY immediately if another job is already running in the same workspace. For large tasks (>2 min, bulk file generation, terraform init, npm install), use claude_execute_start + claude_execute_status instead.
Inputs: workspace_dir (required), plan, model, effort, +11 more.
claude_execute_cancelA
Cancel an active Claude or Agy execution/planning/verification job, terminate its entire child process tree, and release the workspace RWLock slot.
Inputs: job_id (required).
claude_execute_startA
Start a long-running approved plan asynchronously via local Claude Code CLI (Sonnet 5.5) with local continuity cache (.agents/state/plan-history.md and session-index.json) and immediately return a job_id without hitting the 180s MCP timeout. Poll completion with claude_execute_status or stop it with claude_execute_cancel.
Inputs: workspace_dir (required), plan, model, effort, +11 more.
claude_execute_statusA
Long-poll the status or final result of an async job started with claude_execute_start (or agy_plan / agy_execute / agy_verify with async_mode=true). Waits up to wait_seconds (default 30s, max 120s) for completion before returning RUNNING or final result.
Inputs: job_id (required), wait_seconds.
claude_handoffA
Zero-LLM-cost portable handoff packet from local .agents/state (L1 workspace-brief + L2 plan-history + L3 run archives): current checkpoint, active artifact and interface map, open verification issues, git status. Read-only; never creates .agents/state. Use when switching agents or planning a new update.
Inputs: workspace_dir (required), mode, max_bytes, search_query.
claude_healthcheckA
Zero-cost readiness check for local Claude Code CLI. Verifies binary discovery, claude --version, ~/.claude auth directory, model/effort defaults, strict MCP mode, active jobs, timeout/session settings, and optional workspace .agents/state continuity status (including workspace-brief presence and open issues counts) without invoking any LLM.
Inputs: workspace_dir.
claude_verifyA
Run an independent read-only blind audit via local Claude Code CLI (default Opus 5.5, --model opus) in a fresh no-persistence context without executor self-reports. Serves as the parallel secondary double-blind auditor alongside agy_verify for major/milestone/high-risk changes and automatic fallback when agy CLI is unavailable. Blocks write/edit/mutating tools, checks directory snapshots for read_only_violation, audits a turn-scoped or full-workspace git diff plus .agents/state/plan-history.md, and enforces VERDICT: PASS|FAIL|BLOCKED.
Inputs: workspace_dir (required), plan, model, effort, +10 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
The claude_ vs agy_ prefixes cleanly separate the two backends, and within each backend the verbs (healthcheck, execute, verify, plan, handoff) are distinct. The only soft overlaps are claude_execute vs claude_execute_start (sync vs async, explicitly disambiguated by latency guidance) and claude_verify vs agy_verify (intentionally parallel double-blind auditors, per descriptions).
Names consistently use snake_case with a backend prefix (claude_/agy_), producing a readable two-family convention. The minor deviation is structural rather than lexical: Claude exposes an explicit execute_start/execute_status/execute_cancel trio while agy_* folds async into an async_mode flag, and claude_handoff has no agy counterpart.
Eleven tools sit squarely in the well-scoped range, and each maps to a genuine lifecycle stage (healthcheck, plan, execute, poll, cancel, verify, handoff). No tool looks redundant or like padding for the orchestration domain.
The lifecycle is largely covered: readiness checks, execution (sync + async with polling/cancel), independent verification, and a zero-cost handoff packet, with claude_execute_cancel explicitly handling agy jobs too. Minor gaps exist — no planning tool on the Claude side and no job-listing/introspection tool beyond status for a single job_id.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server orchestrating local CLI agents (Claude Code, OpenAI Codex, Google Gemini) for cross-validation, second opinions, and persona-driven prompting.18MIT
- AlicenseNot gradedqualityAmaintenanceZero-dependency MCP server to orchestrate a swarm of Claude Code / Codex sessions across WezTerm panes: any session can discover, spawn, prompt, and read the others via MCP tools. One session becomes the coordinator; crash isolation keeps peers alive; auto-handoff resumes sessions when context fills. Optional Telegram phone control.1MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server for orchestrating a fleet of CLI coding agents in isolated git worktrees. It exposes tools for spawning workers, sending instructions, reviewing diffs, and merging changes, with full terminal visibility.10 npm4MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that bridges Claude Code to Google Antigravity's CLI, enabling Claude to orchestrate Gemini workers in parallel for reading, writing, verifying, and autonomous tasks. It provides tools for single dispatch, parallel fan-out, background jobs, and handles permission, cwd, and shell pitfalls.2MIT