openagent-bridge (formerly claude-gemini-bridge): Gemini research inside Claude Code and Codex
· Updated
openagent-bridge (formerly claude-gemini-bridge) lets Claude Code and the Codex CLI delegate research to Gemini and get back Markdown with cited sources.
TL;DR: openagent-bridge is an MIT-licensed plugin for Claude Code and the Codex CLI that hands research to an external agent CLI, Google Gemini (stable) or Google Antigravity (experimental), and brings back Markdown with source links. Until v0.6.0 it was called claude-gemini-bridge, and the old GitHub URL redirects. In Claude Code: /plugin marketplace add mrlong0129/openagent-bridge, then /plugin install bridge@openagent-bridge.
The problem it solves
Claude Code and Codex are excellent at writing code and reasoning across a repository. Research-heavy work is different: pulling market context, competitor data, regulatory notes, or fresh Amazon category trends needs a long context window and search grounding, so the answer reflects what is true now rather than what was true at a training cutoff.
Gemini has those strengths. But switching to a separate Gemini session breaks flow, and the research rarely makes it back into the coding session. The bridge lets the agent you are already in delegate the question and bring the answer back into the same terminal.
How it pairs with Codex
codex = depth × code. bridge = breadth × knowledge.
Use Codex to rescue a stuck implementation, debug deeply, or get a second-pass review; its output is code changes. Use the bridge for research, knowledge-base augmentation, and industry questions; its output is structured Markdown with source links.
Install
Claude Code:
/plugin marketplace add mrlong0129/openagent-bridge
/plugin install bridge@openagent-bridgeThat adds two slash commands: /gemini (Gemini backend) and /antigravity (experimental). Codex CLI:
codex plugin marketplace add mrlong0129/openagent-bridgeThen enable [plugins."bridge@openagent-bridge"] with enabled = true in ~/.codex/config.toml. The bridge-research skill activates from a natural-language request. The Gemini backend needs the Gemini CLI, authenticated once:
npm install -g @google/gemini-cli
gemini # first run triggers authThree modes
ask: quick Q&A with sources, printed to stdout.research: deep research written to./gemini-research/{domain}/. It reads the docs already in your project as a baseline and only adds what is new.augment: reads an existing Markdown file and writes<file>.augmented.mdwith outdated content, gaps, new angles, and ready-to-merge paragraphs.
/gemini Amazon SP 广告最近有哪些算法变化
/gemini 研究跨境电商 AI Agent 赛道现状 --domain business
/gemini 把这份文档更新一下 --file docs/amazon.mdHow it works
Both plugins share one dispatcher, scripts/bridge.mjs. It parses arguments, applies OPENAGENT_BRIDGE_* defaults, loads the backend adapter, builds a mode-specific prompt, and runs the backend CLI with a hard timeout (180 seconds for ask and augment, 420 seconds for research) that kills the whole process group. --plan prints the resolved prompt and command without running it.
The prompts are tuned for research: every non-trivial claim needs a source URL; if the model does not know, it is told to say "unknown"; domain terms such as ACOS, ASIN, ROAS, BSR, and AMC stay in English; a Chinese task gets a Chinese reply and an English task an English one. It was built with cross-border e-commerce and Amazon workflows in mind, and prompts.mjs can be forked for another domain.
When to use it
- You are working in Claude Code or Codex and need research, a knowledge-base update, or an industry answer with citations, without leaving the session.
- You keep project docs and want new research to be a delta on top of them, not a repeat.
- For code changes, use Codex itself. For an open-ended chat with Gemini, the Gemini CLI on its own is enough. The bridge is for delegating from inside an agent session.
Limits
The Antigravity backend is experimental and may fail in surprising ways. First-time authentication opens a browser, so authenticate in a normal terminal before running the plugin inside a sandbox. For headless or CI use, set GEMINI_API_KEY (Gemini only; Antigravity has no headless API-key auth yet). Requires Node.js 18 or later. The project changelog also warns that Antigravity's own agy --sandbox flag does not enforce a sandbox.
Migrating from claude-gemini-bridge
The old mrlong0129/claude-gemini-bridge repository redirects. The plugin is now bridge instead of gemini: remove the old marketplace with /plugin marketplace remove claude-gemini-bridge, add mrlong0129/openagent-bridge, and install bridge@openagent-bridge. /gemini still works, and the old GEMINI_BRIDGE_* environment variables are honored as deprecated aliases. For agents that read the web rather than research it, see agent-web-fetch. For drafting social posts from Claude Code, see YominPost.
FAQ
What is openagent-bridge?
openagent-bridge is an MIT-licensed plugin for Claude Code and the Codex CLI. It delegates research to Google Gemini (stable) or Google Antigravity (experimental) and returns Markdown with source links, in three modes: ask, research, and augment. It was previously called claude-gemini-bridge.
How do I use Gemini from inside Claude Code?
Install the plugin with /plugin marketplace add mrlong0129/openagent-bridge and /plugin install bridge@openagent-bridge, install the Gemini CLI with npm install -g @google/gemini-cli, and run gemini once to sign in. Then use /gemini <question> in Claude Code.
Does openagent-bridge work with the Codex CLI?
Yes. Run codex plugin marketplace add mrlong0129/openagent-bridge and enable bridge@openagent-bridge in ~/.codex/config.toml. The bridge-research skill then activates when you ask Codex for research in plain language. Claude Code and Codex share the same dispatcher script.
What happened to claude-gemini-bridge?
It was renamed to openagent-bridge in v0.6.0, when Antigravity was added as a second backend. The old GitHub URL redirects, /gemini still works, and the old GEMINI_BRIDGE_* environment variables are still honored. Reinstall as bridge@openagent-bridge to get updates.
Do I need a Gemini API key?
Not for interactive use: the Gemini CLI signs in through a browser on its first run. For headless or CI use, set GEMINI_API_KEY. The Antigravity backend does not support headless API-key authentication yet.