aibridge

Let your coding agent drive the other AIs on your machine. Cross-provider agent-to-agent delegation — plan, implement, review, red-team, and generate images across Grok, Gemini, Codex & Claude through the CLIs you already have. No API keys.

skills.sh npm node license

Works in Claude Code, Cursor, Codex, Gemini CLI, OpenCode, and 70+ other agents via the skills CLI.


Your agent is one model, from one provider. Your machine probably has several more sitting behind CLIs you already use — grok, agy (Antigravity), codex, claude. aibridge turns them into seats your agent can drive: a planner that studies your repo, an implementer that edits it and runs your real tests, a reviewer from a different model family that cross-checks the diff against the plan, concurrent one-shot delegates — and capabilities your agent's own provider may not offer at all, like real image generation (Codex, Antigravity, or Grok seats).

Install

One step — install the skill into your agent(s):

npx skills add ycmjason/aibridge

That's it. The skill runs the CLI on demand via npx -y @aibridge/cli — nothing else to install. Ask your agent to "use aibridge", or try it yourself:

npx -y @aibridge/cli subagent --model xai-grok/grok-4.6 "summarize the architecture of this repo"

Want the aibridge command on your PATH for manual use? npm i -g @aibridge/cli (optional).

Commands

Command Use when
aibridge plan --model xai-grok/grok-4.6 --out plan.md "<task>" You want a delegate model to study the repo and expand a task into a detailed, reviewable plan file before any code is written
aibridge implement --model google-antigravity/gemini-3.7-flash <plan.md> You have an approved plan file and want it executed in place — with your project's real typecheck and tests run until green
aibridge review --model xai-grok/grok-4.6 --out review.md [--plan <plan.md>] You want a different model to pressure-test a diff against the plan contract, where over-reach is a finding. --base <ref> reviews any commit range, not just the working tree. On a clean tree it reviews the plan itself
aibridge subagent --model xai-grok/grok-4.6 "<task>" A self-contained task deserves a concurrent delegate, a cross-model second opinion, or a red-team pass
aibridge image-gen --model openai-codex/gpt-5.6-sol --out out.png "<prompt>" You need a real raster image — on a Codex, Antigravity, or Grok seat, with render verification
aibridge models [--json] You need the exact facts for every registered model seat (accepted efforts, image format, pinned model ID)
aibridge quota Two-second check of every backend's remaining quota before you pipeline work
aibridge runs Inspect or watch past delegation runs (~/.aibridge/runs)

The three verbs compose into an orchestrator-driven loop your agent stays in charge of:

aibridge plan --model xai-grok/grok-4.6 --out plan.md "add rate limiting to the API"   # delegate writes plan.md
# → your agent reads, edits, approves the plan
aibridge implement --model google-antigravity/gemini-3.7-flash plan.md                 # another model executes it, runs your gates
aibridge review --model xai-grok/grok-4.6 --out review.md --plan plan.md               # a third seat cross-checks the diff

Plan files — not their contents — travel between stages, so the loop is nearly free on your agent's context.

How it works

  • The skill carries judgment; the CLI owns execution. The skill teaches your agent prompt-craft, seat selection, and when to gate; the CLI deterministically drives the backing CLIs, captures their output, verifies results (a "generated image" under 100 KB is a code-drawn fake, an empty answer is a quota death), and logs every run.
  • Seats stay cross-model by default. Grok plans and reviews, Gemini implements — a model never reviews its own diff, and independent eyes catch what shared blind spots miss.
  • No API keys. Delegation runs on the backing CLIs' existing logins, each spending its own quota. (The skill treats a backend that shares your agent's own quota pool as a last resort.)
  • Models are canonical slugs: <vendor>-<cli>/<model>[-<effort>] — e.g. xai-grok/grok-4.6, google-antigravity/gemini-3.7-flash, openai-codex/gpt-5.6-sol-high, anthropic-claude/opus-5. No aliases — not short ones, and not moving vendor aliases like opus: every seat pins an exact model version. aibridge <command> --help lists every seat.

Tell your agent when to reach for it

aibridge doesn't decide when to delegate — your agent does, and left alone it will mostly keep the work for itself. Put the routing rule in whatever instructions file your agent already reads at the start of every session (AGENTS.md, CLAUDE.md, .cursorrules, …). Something like:

## Delegation gate — decide before you implement

The moment a task becomes implementation you could fully specify, say the call out
loud — **solo** or **aibridge** — plus one line of why. Delegating is the default.
Stay solo only when the edit is smaller than the spec would be, or the work needs
live judgment, your own session's tools, or tight back-and-forth. Never default to
solo silently.

Route by size and risk:

- tiny → solo
- clearly specified and self-contained → `aibridge subagent`
- large or risky → `aibridge plan` → read and approve the plan file →
  `aibridge implement` → `aibridge review`

Delegated work is yours to verify: re-run the real gates before trusting a diff.
Prefer a reviewer from a different model family than whoever implemented.

Tune the seats and thresholds to your own quotas. The value is that the decision is explicit and made before the work starts, rather than rationalised afterwards.

Requirements

  • Node ≥ 24.11
  • The backing CLIs you want to use, on PATH and authed: grok, agy (Antigravity), codex, claude — any subset works; commands fail fast with install hints for missing ones.

Packages

Everything is published under the @aibridge scope: @aibridge/cli (the command), @aibridge/proc (spawn/capture), and one driver per backing CLI — @aibridge/driver-agy, @aibridge/driver-grok, @aibridge/driver-codex, @aibridge/driver-claude — reusable if you want to drive a single CLI from your own code.

Security

aibridge executes real delegation — that's the product, and security scanners rightly notice: backing CLIs read/write files and run shell in tools mode, at the same trust level as the agent you already run. Nothing gains more access than you granted your agent and those CLIs when you installed them. Task content goes to the delegate's provider (use --no-tools for untrusted input — reasoning only, no file/shell access). All packages publish from this public repo via OIDC with SLSA provenance, with no install-time scripts.

Contributing & development

Dev docs, architecture, and the working agreements for coding agents live in AGENTS.md; design history in docs/. Quick loop:

pnpm install
pnpm check && pnpm typecheck && pnpm test
node packages/cli/src/cli.ts --help

License

MIT © Jason Yu