agent-intercom

io.github.iambashar由 GitHub 账号 iambashar 发布v0.2.5更新于 Oct 26, 2026

Lets Claude Code, Codex CLI and Antigravity message each other, with live push into open sessions.

已验证STDIO仅桌面开发者工具沟通与协作

概览

AI 生成的概览

本地信箱,让 Claude Code、Codex CLI、Antigravity 等编码代理互相发消息,并可选地把消息实时推送到已打开的会话。

可以做什么
  • 向另一个代理的收件箱投递消息,可附带回复引用
  • 读取并消费自己的消息,或最多阻塞 300 秒等待新消息到达
  • 列出已知代理及其信箱名称
  • 按会话名定向投递,或路由到最近活跃的会话
  • 在受支持的 CLI 上安装、卸载并查看配置状态,包括推送守护进程和未读统计
适用场景
适合在同一台机器上同时运行多个编码代理、希望它们互相交接工作的场景,例如让一个代理审查 diff 并等待其答复,而无需在终端之间复制粘贴。
运行要求
以 stdio 方式作为本地进程运行,从 npm 包 agent-intercom 安装,需要 Node 20 或更高版本。安装命令会为检测到的每个 CLI 注册该服务器;实时推送需要全局安装并运行后台守护进程。需设置 AGENT_NAME 作为本代理的信箱名,可选设置 AGENT_MAIL_DIR 把信箱从默认目录移走。未声明任何身份验证。
安装前请注意
信箱没有任何身份验证:以你的用户身份运行的任何进程都能写入收件箱,而代理会把消息当作要执行的输入,因此应把收件箱内容视为不可信文本,不应让它授权破坏性操作。开启推送后,消息无需你输入就会进入已打开的会话。推送依赖受支持 CLI 的未公开内部机制,其更新可能导致失效。推送会读取本地会话令牌,且只与本机套接字通信。

安装

在 SourceWeft 中

  1. 打开 控制台中的 agent-intercom,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[agent-intercom: Claude Code, Codex CLI and Antigravity connected through one hub, with messages flowing between them]


[npm] [CI] [License: MIT] [GitHub stars]

[Node 20+] [Zero dependencies] [MCP] [Claude Code] [Codex CLI] [Antigravity]

Let Claude Code, Codex CLI and Antigravity (Gemini) message each other,
and land each message straight in the other agent's open session.

If it saves you time, a ⭐ helps other people find it.

Get started · See it work · How push works · Across machines · CLI · Security · Contributing


[图片] Get started

bash
npx agent-intercom install

Using Claude Code only? Install it as a plugin instead:

text
/plugin install agent-intercom --marketplace iambashar/agent-intercom

On Claude Code older than 2.1.275: /plugin marketplace add iambashar/agent-intercom, then /plugin install agent-intercom@agent-intercom. The plugin also adds a skill that teaches Claude the mailbox conventions.

The npx command registers the MCP server with every CLI it finds. Restart them, and each agent gets three tools: mail_send, mail_check and mail_peers. Then ask in plain words:

You → Claude: Ask codex to review the diff in src/parser.ts and wait for its answer.

Turn on live push so nobody has to poll. Install it globally, because the daemon needs a stable path:

bash
npm i -g agent-intercomagent-intercom install --push
What install changes, per CLI
CLIRegistrationExtra for push
Claude Codeclaude mcp add, user scopenothing; uses Claude Code's peer socket
Codex CLIa managed block in ~/.codex/config.toml (backed up first)nothing; uses the Codex app-server daemon
Antigravity (agy)agy mcp adda session hook in ~/.gemini/config/hooks.json

Use --only claude|codex|gemini for one CLI, and --local to pin a git checkout instead of npx. agent-intercom uninstall removes all of it, including the push daemon.

[!NOTE] The old gemini CLI no longer accepts personal Google AI Pro sign-ins; Google moved those users to the Antigravity CLI (agy). Its agent is named gemini here by default.

[图片] See it work

[Animated two-pane terminal: Claude sends a review request to Codex with mail_send, Codex receives it as a new turn, reviews the file and replies, and the reply appears in Claude's session]

Neither agent polls. The request appears in Codex as a new turn the moment it is sent, and the reply lands in Claude the same way.

[图片] What you get

[图片] Supported agents

AgentMailbox nameHow a message reaches the open session
[图片]claudeClaude Code's local peer-messaging socket, the channel SendMessage uses between sessions. Arrives labelled as from another session.
[图片]codexThe shared app-server daemon the Codex TUI runs on: turn/start, or turn/steer when a turn is already running.
[图片]geminiagy agentapi send-message into the conversation. Each session registers itself once through a hook.
Any other MCP clientanythingNo push. It reads with mail_check, or blocks with mail_check(wait_seconds=300).
ToolWhat it does
mail_send(to, body, reply_to?)Drop a message in another agent's inbox
mail_check(wait_seconds?)Read and consume your messages; with wait_seconds (max 300) it blocks until one arrives
mail_peers()List known agents

[图片] How push works

[Flow: mail_send writes to the inbox; pushd claims the file, injects it into Claude Code, Codex CLI or Antigravity, then moves it to read; with no open session the message stays in the inbox for mail_check]

mermaid
sequenceDiagram    autonumber    participant C as Claude Code    participant M as ~/.agent-mail/codex/inbox    participant P as pushd    participant X as Codex CLI (open session)    C->>M: mail_send(to: "codex", body)    M-->>P: file appears (fs.watch, no polling)    P->>M: claim: rename to <id>.json.pushing    P->>X: turn/start with the message    X-->>P: turn accepted    P->>M: move to read/    Note over X: Codex works on it, then replies with mail_send(to: "claude")
  • Delivered once. The daemon renames a message before pushing it, and mail_check renames before reading. Whoever wins the rename delivers it.

  • Fails safe. A failed push puts the file back in the inbox and retries after 30 s. If no session is open, the message waits for mail_check.

  • Addressing. Pick a session with claude.<session-name>, codex.<thread-id-prefix> or gemini.<conversation-prefix>. Otherwise the most recently active session gets it, or the one named in ~/.agent-mail/routes.json:

    json
    { "claude": "api-server", "codex": "019f018a" }

[!WARNING] Push relies on undocumented internals of all three CLIs, and an update can change them without notice. When that happens, pushes fail, get logged, and the mail falls back to the inbox. Protocol details: docs/live-push.md.

Without the push daemon
  • Claude Code: docs/claude-monitor.md. agent-intercom watch claude under the Monitor tool wakes the session when mail arrives.
  • Codex: docs/codex-listen.md. A listener prompt that loops on mail_check(wait_seconds=300).

[图片] Across machines

Agents on a machine with no shared filesystem, such as a GPU server or an HPC cluster, join over SSH with bridge.sh. It moves each message to the machine its recipient lives on, and pulled mail is pushed like any other.

bash
BRIDGE_HOST=gpu-box REMOTE_AGENTS="claude-gpu" ./bridge.sh
mermaid
flowchart LR    subgraph laptop["💻 Laptop"]        A[claude] & B[codex] & G[gemini]    end    subgraph gpu["🖥️ gpu-box"]        R[claude-gpu]    end    laptop <-- "bridge.sh · rsync over SSH" --> gpu

More: docs/remote-bridge.md.

More than one session per CLI

Names are just AGENT_NAME. Give each session its own, for example claude-api and claude-web:

bash
npx agent-intercom install --only claude --claude-name claude-api

[图片] CLI

text
agent-intercom install [--only claude|codex|gemini] [--claude-name N] [--codex-name N] [--gemini-name N] [--local] [--push]agent-intercom uninstall        MCP entries, agy hook and push daemonagent-intercom push install     push daemon as a login service (launchd / systemd --user)agent-intercom push uninstallagent-intercom push run         push daemon in the foregroundagent-intercom status           unread/read counts per agentagent-intercom watch <name>     one line per new message, without consuming itagent-intercom serve            the MCP server on stdio

[图片] Security

This is a local mailbox with no authentication. Any process running as you can write to ~/.agent-mail/*/inbox, and an agent treats a message as input to act on. With push on, that input reaches your open sessions without you typing anything.

  • Treat inbox contents as untrusted text. Don't let one agent approve destructive actions because a message told it to.
  • Pushed messages are labelled [agent-intercom] message <id> from <sender>. Claude Code also marks them as from another session, not from you.
  • Push reads tokens only your user can read (~/.claude/sessions/*.key, the agy session token) and talks only to local sockets. Nothing leaves the machine.

See SECURITY.md to report a problem. Set AGENT_MAIL_DIR to move the mailbox, for example into a project folder.

[Saved you a copy-paste between agents? Star agent-intercom on GitHub]

🤝 Contributing

Contributions are welcome, from a typo fix to support for a new agent.

[Good first issues] [Help wanted] [Discussions]

I want to…Start here
Fix something smallGood first issues
Support another coding agentdocs/adding-an-agent.md
Report a push that broke after a CLI updateBug report
Ask a question or pitch an ideaDiscussions

Read CONTRIBUTING.md before opening a pull request. Everyone here follows the code of conduct.

[Contributors]

Develop

bash
git clone https://github.com/iambashar/agent-intercom && cd agent-intercomnpm test                          # node --test, no dependenciespython3 scripts/build-assets.py   # rebuild the README artwork

Zero runtime dependencies; Node 20+. See CONTRIBUTING.md and the changelog.

MIT licensed · made for people who run more than one coding agent

⭐ Star · 🐛 Report a bug · 💡 Discuss

来源:README.md,提交 610cc64

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.5最新Oct 18, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分