
Agent Link
io.github.mikusnuzv0.5.1Updated Oct 8, 2026
Bidirectional AI agent collaboration — spawn and communicate with any agent CLI
Overview
Lets an AI coding agent spawn other agent CLIs as subprocesses, exchange questions and answers, and collect their results.
- What it does
- Exposes tools to spawn a named agent CLI (Claude Code, Codex, Gemini, Aider, or a custom command) with a task and optional context such as files, error text, intent, or git diff. spawn_agents runs several agents in parallel and returns a combined summary. reply answers a spawned agent's clarifying question, kill_agent aborts a session, and list_agents and get_status report which CLIs are installed and which sessions are active.
- When to use it
- Useful when a primary coding agent is stuck, wants a second opinion or code review from a different model, or needs to split independent subtasks across several agents. Only the host agent needs this server; the spawned agents are ordinary CLI subprocesses.
- Requirements
- Runs locally over stdio, typically via npx agent-link-mcp. Each agent CLI you want to collaborate with must be installed and authenticated separately (for example claude login, codex login, the Gemini sign-in prompt, or OPENAI_API_KEY/ANTHROPIC_API_KEY for Aider). Custom agents can be defined in ~/.agent-link/config.json, whose path can be overridden with AGENT_LINK_CONFIG.
Installation
In SourceWeft
- Open Agent Link in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 2ea9ef5
Tools
0Version history
1- v0.5.1LatestOct 8, 2026


