agent-bridge

Documentation

Using agent-bridge from other agent CLIs

The CLI is plain bash and PowerShell, and the skill is an Agent Skills folder, so any agent that can run a shell command can use agent-bridge. Claude Code gets everything from the plugin. For Codex, Gemini (Antigravity, Gemini CLI) and Grok Build, run on each machine, for each CLI you use there:

agent-bridge integrate codex            # also: antigravity, gemini (Gemini CLI), grok
agent-bridge integrate codex --dry-run  # what it would do
agent-bridge integrate --status         # what's set up, for every CLI
agent-bridge integrate codex --uninstall

It does four things, each idempotent:

  1. agent-bridge on PATH, through install-cli, so it keeps working across plugin updates.

  2. The skill, linked into the CLI's skills folder (through the same link, so it follows updates; copied on Windows, where you run integrate again after an update):

    CLI Skills folder
    Codex ~/.agents/skills
    Antigravity ~/.gemini/config/skills
    Gemini CLI ~/.gemini/skills
    Grok Build ~/.grok/skills
  3. The slash commands, each as a skill that runs only when asked for by name (agent-bridge-offload, agent-bridge-handoff, ...); for Gemini CLI, TOML commands /agent-bridge:<name> instead.

  4. The activity hooks, where the CLI's hook format is known, so the monitor shows that CLI's sessions next to Claude Code's:

    CLI Hooks Then
    Codex ~/.codex/hooks.json: each tool call, each prompt, the end of a turn (idle), a request for your approval (waiting), the session's start and end trust them in Codex's /hooks; run integrate codex again after an update of agent-bridge that adds hooks
    Gemini CLI ~/.gemini/settings.json
    Grok Build ~/.grok/hooks/agent-bridge.json trust them with /hooks-trust
    Antigravity none yet (its hook format isn't settled) what it does on peers still shows

JSON files are merged, with a backup of each the first time (<file>.agent-bridge.bak), and never replaced when they don't parse. --uninstall removes only what integrate made.

Notes per CLI

New mail reaches them too. These CLIs have no monitor or channel, so the hooks also add a pull before each prompt (hook pull: Codex's and Grok's UserPromptSubmit, Gemini CLI's BeforeAgent). When a message, or a project log entry, came since that session was last told, the agent gets the same line Claude Code gets at a session's start (how many wait, how many are urgent or for this session) as the hook's additionalContext; otherwise nothing. Run integrate <cli> again after updating agent-bridge to add it.

Messages and tasks work the same between any two agents: a task created by Claude Code on the laptop can be taken by Codex on the build machine.

Edit this page on GitHub →