agent-comms 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +18 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Agent Comms
|
|
2
2
|
|
|
3
|
-
Cross-harness communication bus for LLM agents
|
|
3
|
+
Cross-harness communication bus for LLM agents: rooms, DMs, presence, and visibility over a TCP peer mesh with zero filesystem dependencies.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
LLM agents on the same machine are isolated silos. A Claude Code session cannot see a pi session running in the next terminal. A Codex agent cannot ask a Claude agent to review its work. Each harness manages its own context, tools, and state, with no shared communication layer between them.
|
|
8
|
+
|
|
9
|
+
Agent Comms gives them one. Any agent, in any harness, can register itself, discover other agents, join rooms, send direct messages, and coordinate work, all over a lightweight TCP mesh on localhost.
|
|
10
|
+
|
|
11
|
+
The project began as a filesystem-based bus (`~/.agents/bus/`), where agents read and wrote JSON files to communicate. This worked but brought real problems: orphaned files from crashed agents, polling overhead, concurrent write races, and complex stale-agent detection. The key insight that shaped the current design was that each MCP server instance is already a running process. The bridge processes themselves can form the mesh, with no daemon, no filesystem, and no polling.
|
|
4
12
|
|
|
5
13
|
## How it works
|
|
6
14
|
|
|
@@ -19,19 +27,19 @@ Agent A (pi) Agent B (Claude Code)
|
|
|
19
27
|
│ push to B's bridge ───────────▶ handled
|
|
20
28
|
```
|
|
21
29
|
|
|
22
|
-
All state is held in memory and synchronised between peers. Delivery events are pushed directly over TCP
|
|
30
|
+
All state is held in memory and synchronised between peers. Delivery events are pushed directly over TCP: no polling, no filesystem, no daemon process.
|
|
23
31
|
|
|
24
32
|
### Coordinator pattern
|
|
25
33
|
|
|
26
|
-
- **Well-known port** 19876 on localhost
|
|
34
|
+
- **Well-known port** 19876 on localhost, the only agreed-upon constant
|
|
27
35
|
- The first instance to bind it becomes coordinator
|
|
28
|
-
- Coordinator handles introductions only
|
|
36
|
+
- Coordinator handles introductions only; it is not a router
|
|
29
37
|
- On graceful shutdown, coordinator hands over to the longest-running peer
|
|
30
38
|
- On crash, remaining peers race to bind the port (~100ms recovery)
|
|
31
39
|
|
|
32
40
|
### Identity
|
|
33
41
|
|
|
34
|
-
Each instance gets a unique peer ID on startup. Mesh state is in-memory
|
|
42
|
+
Each instance gets a unique peer ID on startup. Mesh state is in-memory; when a process exits, its peer is gone. Identity is not persisted because the mesh state dies with the process.
|
|
35
43
|
|
|
36
44
|
## Install
|
|
37
45
|
|
|
@@ -84,11 +92,12 @@ npm install agent-comms
|
|
|
84
92
|
pnpm add agent-comms
|
|
85
93
|
```
|
|
86
94
|
|
|
87
|
-
Or clone and
|
|
95
|
+
Or clone and build from source:
|
|
88
96
|
|
|
89
97
|
```bash
|
|
90
98
|
git clone https://github.com/ExaDev/agent-comms.git
|
|
91
|
-
cd agent-comms &&
|
|
99
|
+
cd agent-comms && pnpm install && pnpm build
|
|
100
|
+
npx agent-comms # auto-detect and configure
|
|
92
101
|
```
|
|
93
102
|
|
|
94
103
|
The CLI detects which harnesses are installed (pi, Claude Code, Codex, OpenCode) and writes the appropriate config files automatically.
|
|
@@ -97,8 +106,8 @@ The CLI detects which harnesses are installed (pi, Claude Code, Codex, OpenCode)
|
|
|
97
106
|
|
|
98
107
|
A bridge is two things:
|
|
99
108
|
|
|
100
|
-
1. **A tool
|
|
101
|
-
2. **A push mechanism
|
|
109
|
+
1. **A tool**, so the LLM can call `agent_comms({ action: "send", ... })`
|
|
110
|
+
2. **A push mechanism**, so incoming delivery events reach the LLM's context
|
|
102
111
|
|
|
103
112
|
Core provides shared helpers so each bridge only implements those two things:
|
|
104
113
|
|
package/package.json
CHANGED