Production-grade multi-agent communication infrastructure
Real-time messaging Β· Task scheduling Β· Shared memory Β· Evolution engine
Built on MCP + SSE protocol Β· 56 tools Β· Zero external dependencies
AI Agents (Claude Code, OpenClaw, WorkBuddy, etc.) are naturally isolated:
Agent Communication Hub provides a shared neural center for every MCP-compatible Agent β message bus, task queue, memory layer, and evolution engine.
# 1. Start the Hub (Docker, recommended)
docker run -d -p 3100:3100 --name ach ghcr.io/liuboacean/agent-comm-hub:v2.5.1
# 2. Register an Agent
python3 -c "
from hub_client import SynergyHubClient
hub = SynergyHubClient('http://localhost:3100')
result = hub.register(invite_code='INVITE-001', name='my-agent')
print(f'Token: {result[\"api_token\"]}')
hub.set_token(result['api_token'])
"
# 3. Send a Message
python3 -c "
from hub_client import SynergyHubClient
hub = SynergyHubClient('http://localhost:3100')
hub.set_token('your-api-token')
hub.send_message(to='other-agent', content='Hello, Agent!')
"
Zero config. Zero external services. Ready locally.
| Category | Tools | Description |
|---|---|---|
| π Identity | 6 | Registration, heartbeat, RBAC, trust scoring |
| π¬ Messaging | 5 | P2P / broadcast, FTS5 full-text search, dedup |
| π Task Scheduling | 8 | 7-state machine, Pipeline, parallel groups, retry |
| π§ Shared Memory | 5 | private / team / collective scopes |
| π Orchestration | 11 | Dependency chains (DFS cycle detection), quality gates, handoff |
| π Evolution Engine | 12 | Experience sharing, 4-tier strategy approval, feedback loop |
| π‘οΈ Security & Audit | 6 | Token auth, 4-level RBAC, audit hash chain, CORS whitelist |
| π File Transfer | 3 | Upload / download / list, Base64 10MB limit |
| π§ High Availability | 3 | DB split auto-detection + merge + watchdog self-heal |
56 MCP tools Β· SQLite WAL (zero message loss) Β· SSE push latency < 50ms
| Metric | Value |
|---|---|
| MCP tools | 56 |
| Python SDK methods | 68 |
| TypeScript SDK methods | 35 |
| Unit tests | 159 β |
| Database tables | 32 |
| External dependencies | 0 |
| SSE push latency | < 50ms |
| Deployment | Docker / npm / SkillHub |
ββββββββββββββββ ββββββββββββββββββββββββββββ ββββββββββββββββ
β Agent A βSSE β Agent Communication βSSE β Agent B β
β (Claude Code)βββββΊβ Hub v2.5 βββββΊβ (WorkBuddy) β
β βMCP β localhost:3100 βMCP β β
βββββββββββββββββββββΊβ ββββββΊββββββββββββββββ
β ββββββββββββββββββββββ β
β β Identity / RBAC β β
β β Message / Broadcastβ β
β β Task Scheduler β β
β β Memory (3 scopes) β β
β β Evolution Engine β β
β β Orchestrator β β
β ββββββββββ¬ββββββββββββ β
βββββββββββββΌβββββββββββββββ
β
SQLite (WAL)
Any MCP-compatible agent can connect: Claude Code, OpenClaw, WorkBuddy, custom agents, and more.
from hub_client import SynergyHubClient
hub = SynergyHubClient(
hub_url="http://localhost:3100",
agent_id="my-agent"
)
hub.set_token("your-api-token")
# Send a message
hub.send_message(to="other-agent", content="Task complete, handing over.")
# Store shared memory
hub.store_memory(
content="User prefers JSON responses",
scope="collective"
)
# Create a task
task = hub.create_task(
title="Review PR #42",
assignee="claude-code",
priority=2
)
# Share experience
hub.share_experience(
title="DB lock timeout fix",
content="...",
category="fix"
)
# Real-time SSE listener (blocking)
hub.on_message = lambda msg: print(f"Received: {msg}")
hub.connect_sse()
import { AgentClient } from "./client-sdk/agent-client.js";
const client = new AgentClient({
agentId: "my-agent",
hubUrl: "http://localhost:3100",
token: "your-api-token",
onMessage: async (msg) => { /* handle message */ },
onTaskAssigned: async (task) => { /* handle task */ },
});
await client.start();
await client.sendMessage({ to: "other-agent", content: "Done!" });
docker run -d -p 3100:3100 --name ach ghcr.io/liuboacean/agent-comm-hub:v2.5.1
cd deploy/
docker compose up -d
# Hub: http://localhost:3100
# Grafana: http://localhost:3000 (admin/admin)
# Prometheus: http://localhost:9090
git clone https://github.com/liuboacean/agent-comm-hub.git
cd agent-comm-hub
npm install
npm run build
# Development (hot reload)
npm run dev
# Production
npm start
This project depends on the native module better-sqlite3, which is compiled against Node 22 (NODE_MODULE_VERSION 127). Therefore:
dist/src/server.js or dist/src/stdio.js) MUST be started with Node 22. If you use Node 24 (or higher), it will immediately throw ERR_DLOPEN_FAILED due to ABI mismatch and crash on startup β it will not run at all.skipped). The engines.node declaration of >=24 in package.json is a legacy CI declaration that conflicts with the actual runtime constraint β please follow Node 22 as stated in this section.nvm use 22), or hard-code the absolute path to the Node 22 binary in your startup script / MCP configuration.{
"mcpServers": {
"agent-comm-hub": {
"command": "/path/to/node22/bin/node",
"args": ["dist/src/stdio.js"],
"env": {
"HUB_AUTH_TOKEN": "your-connection-key",
"DB_PATH": "/path/to/comm_hub.db"
}
}
}
}
β οΈ You MUST start with the Node 22 binary (e.g. the absolute path
/path/to/node22/bin/node), not Node 24. The native modulebetter-sqlite3is compiled against Node 22 (NODE_MODULE_VERSION 127), so launchingdist/src/stdio.js/dist/src/server.jswith Node 24 will immediately crash withERR_DLOPEN_FAILEDdue to ABI mismatch.
{
"mcpServers": {
"agent-comm-hub": {
"url": "http://localhost:3100/mcp"
}
}
}
| Feature | Description |
|---|---|
| RBAC | 4 levels: public β member β group_admin β admin |
| Token Auth | SHA-256 hashed storage, raw token never persisted |
| Audit Hash Chain | prev_hash β record_hash, DB triggers ensure integrity |
| Trust Scoring | Automatic, influences strategy approval tier |
| CORS | Whitelist-based, denied by default |
| Security Headers | X-Frame-Options, CSP, HSTS, X-XSS-Protection |
| Request Tracing | Every request gets traceId + response header |
agent-comm-hub/
βββ src/ # Hub server (TypeScript)
β βββ server.ts # Express + SSE + MCP entry point
β βββ stdio.ts # stdio MCP entry point
β βββ db.ts # SQLite WAL schema & queries
β βββ identity.ts # Registration, heartbeat, RBAC
β βββ memory.ts # 3-scope memory + FTS5
β βββ task.ts # 7-state task scheduler
β βββ orchestrator.ts # Dependency chains, pipelines
β βββ evolution.ts # Strategy engine, trust scoring
β βββ security.ts # Auth, token, RBAC, audit
βββ client-sdk/
β βββ hub_client.py # Python SDK (zero deps, 68 methods)
β βββ agent-client.ts # TypeScript SDK (35 public methods)
β βββ package.json # npm publish config
βββ deploy/
β βββ docker-compose.yml # Prometheus + Grafana
β βββ prometheus.yml # Metrics collection
βββ docs/
β βββ API_REFERENCE.md # All 56 tool signatures
β βββ advanced-orchestration-guide.md
β βββ evolution-engine-guide.md
β βββ hermes-integration-guide.md
β βββ README_EN.md # This file
β βββ hub-db-split-three-layer-protection.md
βββ scripts/ # Install, test, migration
βββ tests/ # Unit & integration tests
βββ .github/workflows/
βββ ci.yml # CI pipeline
βββ docker.yml # Docker build & publish
| Document | Description |
|---|---|
| API Reference | All 56 tool signatures + examples |
| Orchestration Guide | Pipelines, parallel groups, quality gates |
| Evolution Engine | Trust scoring, strategy approval flow |
| Hermes Integration | Step-by-step Hermes Agent setup |
| DB Split Protection | Auto-detection, merge, watchdog |
See CONTRIBUTING.md for details.
MIT β Free for personal and commercial use.
Built with the MCP protocol + SSE. No external services. No vendor lock-in.