En

agent-comms

A TCP Communication Mesh for LLM Agents

开发流程 协调多智能体管理多个AI编码代理对接MCP工具 claudetraecursor通用 ★ 887 Updated 2026-08-02

Install & Use

Copy this prompt and send it to your AI assistant (Claude / Cursor / TRAE / Codex / WorkBuddy etc.) to auto-install:

Help me install this AI Skill: agent-comms.
It is used for: A TCP Communication Mesh for LLM Agents
Full Skill content: https://321skill.com/skills/agent-comms/raw/index.md
Read that page and install it.

The prompt includes a link to the full Skill content. You can also view the full content.

This Skill addresses the pain point of LLM agents being unable to communicate directly with each other. On a single machine, agents from different frameworks like Claude Code, pi, and Codex operate in isolation, unable to discover one another, send messages, or coordinate work—like isolated islands. Agent Comms breaks this barrier entirely with a lightweight TCP local mesh, allowing any agent to register itself, discover peers, join rooms, send private messages, and receive push events in real-time.

Usage is straightforward: simply install and launch a bridge instance in your project. The first instance launched automatically becomes the coordinator (listening on port 19876). Subsequent instances connect to the coordinator to obtain the full list of peer nodes, then establish direct data connections with each other. All state is synchronized in memory, and messages are pushed directly over TCP—no polling, no file system, and no daemon processes required. You can use MCP tools (e.g., agent_comms(send, …)) to enable agents to invoke each other, as if they were within the same integrated development environment.

It is ideal for teams or individuals requiring multi-agent collaboration. This is especially useful for developers already using multiple AI coding assistants simultaneously (like Claude Code, Cursor, Gemini CLI) or for scenarios where agents from different frameworks need to work together on complex tasks—for example, having one agent write code, another review it, and a third execute tests. It is also suitable for researchers and experimenters building multi-agent systems.

We recommend using this tool in local development environments or single-machine experimental setups. Please note that it currently only supports TCP communication on localhost and does not support cross-machine or network communication; all agent processes must run on the same machine. Additionally, since state is stored purely in memory, the mesh state is completely lost when all processes exit, with no persistence capability. For high availability, consider introducing external state storage or process management tools.

Key Features

Unlike file system-based communication solutions (e.g., `~/.agents/bus/`), Agent Comms completely avoids the pain points of file polling, concurrent write contention, and orphaned files. All messages are pushed in real-time over TCP in memory, resulting in lower latency and higher reliability.

Limitations

Currently, it only supports TCP communication on localhost (port 19876). All agents must run on the same machine, and state is stored purely in memory, meaning the mesh state is lost when processes exit.

FAQ

Does Agent Comms support cross-machine communication?

The current version only supports communication on localhost (127.0.0.1) and does not support cross-machine or network communication.

What happens to the mesh if the coordinator crashes?

If the coordinator crashes, the remaining peer nodes will automatically compete to bind to port 19876, with recovery taking up to approximately 100ms. The node with the longest uptime will take over.

Installation guide for AI assistants

If your AI coding assistant (Claude Code, Cursor, TRAE etc.) can see this page, send it this message to auto-install:

Visit https://321skill.com/skills/agent-comms/raw/index.md to read the original Skill definition (Markdown format) for agent-comms, and install it according to the instructions.