agent-bridge
A bridge between coding agents — expose each agent's CLI as a spawnable
sub-agent tool. Today it ships an MCP server (the agent-bridge-mcp binary,
under cmd/agent-bridge-mcp) with bidirectional
Claude ↔ Antigravity delegation plus an OpenAI Codex sub-agent.
(Formerly agy-mcp / agy-gemini.)
A tiny MCP server that bridges coding agents,
exposing each as a spawnable sub-agent tool. One binary registers three sub-agent
tools plus a list_agents discovery tool and a parallel_agents fan-out tool:
antigravity_agent — shells out to the Antigravity CLI (agy --print <task>),
i.e. spawns an Antigravity (Gemini) sub-agent. Intended to be called from a Claude session.
claude_agent — shells out to the Claude CLI (claude --print <task>),
i.e. spawns a Claude sub-agent. Intended to be called from an Antigravity session.
codex_agent — shells out to the OpenAI Codex CLI (codex exec <task>),
i.e. spawns a Codex sub-agent. Callable from any parent session.
list_agents — read-only discovery: reports which backends are installed (and,
on request, authed or able to serve a request), so a caller can pick its sub-agent
set before fanning out. Takes no task — it inspects the host, it doesn't spawn an agent.
parallel_agents — runs several sub-agent spawns concurrently in one call and
returns all their results. Needed because MCP host clients (Claude Code, Codex,
Antigravity) dispatch individual tool calls serially, so issuing N separate
sub-agent calls runs them back-to-back; parallel_agents fans them out as goroutines
inside this server, so wall-clock ≈ the slowest job, not the sum.
A parent agent calls a tool with a self-contained task; this server shells out to
the corresponding CLI, lets the child agent perform it, and returns the child's
full output. In effect each tool is a spawned sub-agent callable from inside
another agent's session.
All three tools share one backend adapter, so the run / timeout / truncation /
result header / context-cancel / loop-guard behavior is identical; they differ
only in which CLI they invoke and which CLI-specific flags they support. Adding a
CLI agent is a single entry in the in-code backend registry, not new code.
Tool: antigravity_agent
Spawns an Antigravity agent (Google's agy CLI), which runs Gemini models.
| Param | Type | Default | Notes |
|---|
task | string (required) | — | The complete, self-contained task/prompt for the agent. |
add_dirs | string[] | — | Directories to add to the agent's workspace (absolute paths). Repeated as --add-dir. |
working_dir | string | server cwd | Directory the agent runs in (sets cmd.Dir). |
timeout_seconds | number | 300 (max 1800) | Maps to agy --print-timeout. |
model | string | CLI default | Optional; --model <model> when non-empty. agy has no family alias and bakes effort into the model name (e.g. Gemini 3.1 Pro (High)) — list current names with agy models. No separate effort param. |
tier | string | — | Optional reviewer tier deep/fast; the server resolves it to a model by matching agy models output at runtime (deep → a *Pro* (High) entry, fast → *Flash* (Medium)), cached. An explicit model overrides it. |
mode | string | reason | Access tier: reason (no permission-bypass flag; but agy has no tool-disable flag and does not gate writes, so a reason agent with a writable working_dir can still read and edit files unattended — use a throwaway working_dir to keep it off your files; omitting working_dir is not a guard (agy then runs in the bridge server's own cwd, often your project tree), and --sandbox does not confine writes) · act (edit files in working_dir + run commands via --dangerously-skip-permissions, unattended). No read tier for antigravity_agent. |
sandbox | bool | false | Enable agy's sandbox terminal restrictions (--sandbox). Note: despite the name this does not confine the agent's file edits — a write under --sandbox still lands in working_dir (verified), so it is not a "don't touch my files" guard; use a throwaway working_dir for that. Antigravity-only — claude_agent has no sandbox param. |
Tool: claude_agent
Spawns a Claude agent via the claude CLI. This is the reverse direction:
intended to be called from an Antigravity session so it can delegate to Claude.
It mirrors antigravity_agent's semantics. Note: every run shells out to the
claude CLI and therefore consumes Claude credits — even reason-only runs.