
Agent Link
io.github.mikusnuzv0.5.1更新於 Oct 8, 2026
Bidirectional AI agent collaboration — spawn and communicate with any agent CLI
概覽
讓 AI 編碼代理以子程序方式啟動其他代理 CLI,彼此提問與回答,並收集它們的結果。
- 功能
- 提供工具來啟動指定的代理 CLI(Claude Code、Codex、Gemini、Aider 或自訂命令),並附上任務與可選脈絡,例如檔案、錯誤訊息、意圖或 git diff。spawn_agents 可平行執行多個代理並回傳彙總結果。reply 用來回答被啟動代理的追問,kill_agent 中止工作階段,list_agents 與 get_status 顯示已安裝的 CLI 與進行中的工作階段。
- 適用情境
- 適合主要編碼代理卡住、需要不同模型提供第二意見或程式碼審查,或需要把獨立子任務分給多個代理平行處理時。只需在宿主代理上安裝本伺服器,被啟動的代理只是普通 CLI 子程序。
- 執行需求
- 透過 stdio 在本機執行,通常使用 npx agent-link-mcp。每個要協作的代理 CLI 都需個別安裝並完成驗證(例如 claude login、codex login、Gemini 的登入提示,或為 Aider 設定 OPENAI_API_KEY/ANTHROPIC_API_KEY)。自訂代理可寫入 ~/.agent-link/config.json,路徑可用 AGENT_LINK_CONFIG 覆寫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Agent Link,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
agent-link-mcp
English | 한국어
MCP server for bidirectional AI agent collaboration. Spawn and communicate with any AI coding agent CLI — Claude Code, Codex, Gemini, Aider, and more.
When to Use
- Stuck on a bug? — Your agent tried twice and failed. Let it ask another agent for a fresh perspective.
- Need a second opinion? — Get code review or architectural advice from a different AI model.
- Cross-model strengths — Use Claude for planning, Codex for execution, Gemini for research.
- Parallel work — Spawn multiple agents to tackle independent subtasks simultaneously.
- Rubber duck debugging — Have one agent explain the problem to another and get back a solution.
Use Cases
Get Help When Stuck
Your primary agent keeps failing on the same issue? Ask another agent:
Cross-Agent Code Review
Have another model review your agent's code changes:
Multi-Agent Pipeline
Build a pipeline where agents handle different stages:
Bidirectional Collaboration
Agents can ask questions back. The host answers, and work continues:
Why
AI coding agents get stuck sometimes. Instead of waiting for you, they can ask another agent for help. agent-link-mcp lets any MCP-compatible agent spawn other agent CLIs as collaborators, exchange questions, and get results back — all through standard MCP tools.
- One-side install — only the host agent needs this MCP server. Spawned agents are just CLI subprocesses.
- Bidirectional — the host can ask questions to the spawned agent, and the spawned agent can ask questions back.
- Any agent — works with any CLI that accepts a prompt and returns text. Built-in profiles for Claude, Codex, Gemini, and Aider.
- Multi-agent — spawn multiple agents simultaneously for parallel collaboration.
Prerequisites
agent-link-mcp spawns other AI agents as CLI subprocesses. You need to install and authenticate the agent CLIs you want to collaborate with:
You only need the ones you plan to use. agent-link-mcp auto-detects which CLIs are installed.
Install
Note: Only the agent you're working in needs this MCP server installed. The other agents are spawned as subprocesses — they don't need agent-link-mcp.
Tools
spawn_agent
Spawn an agent and send it a task.
Returns one of:
{ status: "done", agentId: "codex-a1b2c3", result: "..." }— task completed{ status: "waiting_for_reply", agentId: "codex-a1b2c3", question: "..." }— agent needs clarification{ error: "...", agentId: "codex-a1b2c3" }— something went wrong
spawn_agents
Run multiple agents in parallel. Returns all results together.
Returns { summary: { total, succeeded, failed, waiting }, results: [...] }.
reply
Answer a spawned agent's question and continue the conversation.
kill_agent
Abort a running agent session.
list_agents
List available agent CLIs.
get_status
Get active agent sessions.
How It Works
Configuration
Auto-detection
agent-link-mcp automatically detects installed agent CLIs:
Custom agents
Add custom agents via config file at ~/.agent-link/config.json:
Override config path with AGENT_LINK_CONFIG environment variable.
Model Selection
You can specify which model the spawned agent should use via the model parameter:
The model name is passed to the agent CLI via its --model flag. If omitted, the agent uses its default model.
Thinking / Reasoning Depth
Control how deeply the agent reasons with the thinking parameter:
If omitted, the agent uses its default reasoning level.
Timeout
Default timeout is 1 hour (3,600,000ms). You can override per-call:
Conversation Protocol
Spawned agents receive instructions to format their responses:
[QUESTION] ...— needs clarification from the host agent[RESULT] ...— task completed
If the agent doesn't follow the format, the entire output is treated as a result.
License
MIT
來源:README.md,提交 2ea9ef5
工具
0版本歷史
1- v0.5.1最新Oct 8, 2026


