
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


