Calling other Agents from a different LLM
๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง๐—œ๐—ก๐—š ๐—–๐—Ÿ๐—”๐—จ๐——๐—˜ ๐—”๐—ก๐—— ๐—š๐—˜๐— ๐—œ๐—ก๐—œ ๐—”๐—š๐—˜๐—ก๐—ง๐—ฆ (๐—•๐—œ๐——๐—œ๐—ฅ๐—˜๐—–๐—ง๐—œ๐—ข๐—ก๐—”๐—Ÿ ๐—ข๐—ฅ๐—–๐—›๐—˜๐—ฆ๐—ง๐—ฅ๐—”๐—ง๐—œ๐—ข๐—ก)
Yesโ€”an agent running on ๐‚๐ฅ๐š๐ฎ๐๐ž can directly invoke an agent running on ๐†๐ž๐ฆ๐ข๐ง๐ข, and vice versa. Because an "agent" is simply an orchestration loop calling an LLM API or CLI, one agent can expose the other as a ๐ญ๐จ๐จ๐ฅ, ๐Œ๐‚๐ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ, or ๐ฌ๐ฎ๐›-๐ฉ๐ซ๐จ๐œ๐ž๐ฌ๐ฌ.
๐…๐จ๐ฎ๐ซ ๐–๐š๐ฒ๐ฌ ๐ญ๐จ ๐‚๐จ๐ง๐ง๐ž๐œ๐ญ ๐‚๐ฅ๐š๐ฎ๐๐ž ๐š๐ง๐ ๐†๐ž๐ฆ๐ข๐ง๐ข ๐€๐ ๐ž๐ง๐ญ๐ฌ
| Method | Best For | How It Works |
| :--- | :--- | :--- |
| ๐Ÿ. ๐“๐จ๐จ๐ฅ / ๐…๐ฎ๐ง๐œ๐ญ๐ข๐จ๐ง ๐‚๐š๐ฅ๐ฅ๐ข๐ง๐  (๐€๐๐ˆ-๐ญ๐จ-๐€๐๐ˆ) | Custom code, Python/Node workflows, or backend services | Give your primary agent (e.g., Claude via the Anthropic SDK) a tool like `ask๐‘”๐‘’๐‘š๐‘–๐‘›๐‘–agent(prompt, context)`. When Claude calls that tool, your code runs a Gemini API request (`@google/genai` or `google-genai`)โ€”or a full Gemini sub-agentโ€”and passes the result back to Claude. |
| ๐Ÿ. ๐Œ๐‚๐ ๐’๐ž๐ซ๐ฏ๐ž๐ซ ๐–๐ซ๐š๐ฉ๐ฉ๐ž๐ซ (๐Œ๐จ๐๐ž๐ฅ ๐‚๐จ๐ง๐ญ๐ž๐ฑ๐ญ ๐๐ซ๐จ๐ญ๐จ๐œ๐จ๐ฅ) | ๐†๐จ๐จ๐ ๐ฅ๐ž ๐€๐ง๐ญ๐ข๐ ๐ซ๐š๐ฏ๐ข๐ญ๐ฒ, ๐•๐’ ๐‚๐จ๐๐ž / ๐‚๐ฅ๐ข๐ง๐ž, ๐‚๐ฅ๐š๐ฎ๐๐ž ๐‚๐จ๐๐ž, or ๐†๐ž๐ฆ๐ข๐ง๐ข ๐‚๐‹๐ˆ | Wrap either agent as a local or remote ๐Œ๐‚๐ ๐ฌ๐ž๐ซ๐ฏ๐ž๐ซ (or use a Gemini MCP bridge). Your Claude agent treats Gemini just like any other MCP toolโ€”calling it for second opinions, multimodal video/audio analysis, or large-context tasksโ€”and Gemini can call a Claude MCP tool the exact same way. |
| ๐Ÿ‘. ๐’๐ก๐ž๐ฅ๐ฅ / ๐‚๐‹๐ˆ ๐’๐ฎ๐›-๐€๐ ๐ž๐ง๐ญ ๐„๐ฑ๐ž๐œ๐ฎ๐ญ๐ข๐จ๐ง | Coding agents in terminal/IDE workflows | Install both ๐†๐ž๐ฆ๐ข๐ง๐ข ๐‚๐‹๐ˆ (or Google's `gemini-api` CLI) and ๐‚๐ฅ๐š๐ฎ๐๐ž ๐‚๐จ๐๐ž on your system. A Claude agent can execute a shell command (`gemini-api generate ...` or `gemini -p "..."`) to delegate a task and read the JSON/text output, and Gemini CLI can shell out to `claude -p "..."` in reverse. |
| ๐Ÿ’. ๐’๐ก๐š๐ซ๐ž๐ ๐’๐ญ๐š๐ญ๐ž / ๐Œ๐ž๐ฌ๐ฌ๐š๐ ๐ž ๐๐ฎ๐ฌ (๐€๐ฌ๐ฒ๐ง๐œ ๐‡๐š๐ง๐๐จ๐Ÿ๐Ÿ๐ฌ) | Long-running background agents across different machines or containers | Have both agents read and write tasks to a shared queueโ€”such as a ๐‚๐ฅ๐จ๐ฎ๐ ๐…๐ข๐ซ๐ž๐ฌ๐ญ๐จ๐ซ๐ž collection (like a state-tracker plugin) or an MCP message boardโ€”where Claude posts a handoff document and a Gemini worker picks it up, processes it, and writes back the response. |
๐๐ซ๐š๐œ๐ญ๐ข๐œ๐š๐ฅ ๐๐š๐ข๐ซ๐ข๐ง๐  ๐๐š๐ญ๐ญ๐ž๐ซ๐ง๐ฌ
๐‚๐ฅ๐š๐ฎ๐๐ž ๐š๐ฌ ๐Ž๐ซ๐œ๐ก๐ž๐ฌ๐ญ๐ซ๐š๐ญ๐จ๐ซ -> ๐†๐ž๐ฆ๐ข๐ง๐ข ๐š๐ฌ ๐’๐ฉ๐ž๐œ๐ข๐š๐ฅ๐ข๐ฌ๐ญ: ๐ถ๐‘™๐‘Ž๐‘ข๐‘‘๐‘’ ๐‘๐‘™๐‘Ž๐‘›๐‘  ๐‘Ž ๐‘ ๐‘œ๐‘“๐‘ก๐‘ค๐‘Ž๐‘Ÿ๐‘’ ๐‘โ„Ž๐‘Ž๐‘›๐‘”๐‘’ ๐‘œ๐‘Ÿ ๐‘‘๐‘Ÿ๐‘Ž๐‘“๐‘ก๐‘  ๐‘๐‘œ๐‘๐‘ฆ, ๐‘กโ„Ž๐‘’๐‘› ๐‘๐‘Ž๐‘™๐‘™๐‘  ๐‘Ž ๐บ๐‘’๐‘š๐‘–๐‘›๐‘– ๐‘ ๐‘ข๐‘-๐‘Ž๐‘”๐‘’๐‘›๐‘ก ๐‘ก๐‘œ ๐‘Ž๐‘›๐‘Ž๐‘™๐‘ฆ๐‘ง๐‘’ ๐‘Ž ๐‘™๐‘œ๐‘›๐‘” ๐‘ฃ๐‘–๐‘‘๐‘’๐‘œ, ๐‘–๐‘›๐‘ ๐‘๐‘’๐‘๐‘ก ๐‘ ๐‘๐‘Ÿ๐‘’๐‘’๐‘›๐‘ โ„Ž๐‘œ๐‘ก๐‘ , ๐‘œ๐‘Ÿ ๐‘–๐‘›๐‘”๐‘’๐‘ ๐‘ก ๐‘Ž ๐‘š๐‘Ž๐‘ ๐‘ ๐‘–๐‘ฃ๐‘’ ๐‘๐‘œ๐‘‘๐‘’๐‘๐‘Ž๐‘ ๐‘’/๐‘™๐‘œ๐‘” ๐‘“๐‘–๐‘™๐‘’.
๐†๐ž๐ฆ๐ข๐ง๐ข ๐š๐ฌ ๐Ž๐ซ๐œ๐ก๐ž๐ฌ๐ญ๐ซ๐š๐ญ๐จ๐ซ -> ๐‚๐ฅ๐š๐ฎ๐๐ž ๐š๐ฌ ๐’๐ฉ๐ž๐œ๐ข๐š๐ฅ๐ข๐ฌ๐ญ: Gemini handles multimodal intake or large-context research, then calls a Claude sub-agent to review code diffs or refactor complex logic.
1
2 comments
Gerald Haygood
4
Calling other Agents from a different LLM
ChatGPT Users
skool.com/chatgpt
A home for entrepreneurs who use ChatGPT to discuss, discover, and connect with others using this incredible AI technology. โญ๏ธ Invite your friends โญ๏ธ
Leaderboard (30-day)
Powered by