Agent-Comm-Hub
Build production-grade multi-agent communication infrastructure in minutes. Real-time messaging, task scheduling, shared memory, and trust-based evolution — all via MCP + SSE.
README
<p align="center"> <img src="https://img.shields.io/badge/Node.js-18+-green?logo=node.js" alt="Node.js 18+"> <img src="https://img.shields.io/badge/Python-3.9+-blue?logo=python" alt="Python 3.9+"> <img src="https://img.shields.io/badge/MCP_Protocol-1.0-orange?logo=robot" alt="MCP Protocol"> <img src="https://img.shields.io/badge/License-MIT-yellow" alt="MIT License"> <img src="https://img.shields.io/badge/TypeScript-SDK-blue?logo=typescript" alt="TypeScript SDK"> <img src="https://img.shields.io/badge/Python_SDK-Zero_Dependencies-brightgreen?logo=python" alt="Zero Dependencies"> <a href="demo/index.html"><img src="https://img.shields.io/badge/Live_Demo-7f77dd?logo=github" alt="Live Demo"></a> </p>
<h1 align="center">Agent Communication Hub</h1>
<p align="center"> Build production-grade <strong>multi-agent communication infrastructure</strong> in minutes.<br> Real-time messaging, task scheduling, shared memory, and trust-based evolution — all via MCP + SSE. </p>
<p align="center"> <a href="#readme">English</a> | <a href="docs/README_CN.md">中文</a> </p>
What problem does it solve?
When you run multiple AI agents (Claude Code, OpenClaw, WorkBuddy, custom agents…), they operate in silos. They can't:
- Talk to each other without brittle webhooks or shared databases
- Schedule tasks across agent boundaries
- Share context beyond one-shot prompts
- Evolve together as a team based on past experience
Agent Communication Hub gives every MCP-compatible agent a shared nervous system — message bus, task queue, memory layer, and evolution engine — so agents collaborate instead of isolation.
Try it in 3 lines
# 1. Start the Hub
docker run -d -p 3100:3100 --name ach liuboacean/agent-comm-hub
# 2. Register an agent
python3 -c "from hub_client import SynergyHubClient; print(SynergyHubClient('http://localhost:3100').register('YOUR_INVITE_CODE'))"
# 3. Send a message
python3 -c "from hub_client import SynergyHubClient; c=SynergyHubClient('http://localhost:3100'); c.set_token('YOUR_TOKEN'); c.send_message(to='other-agent', content='Hello!')"
No config files. No external services. Works locally.
Features at a glance
| Category | Tools | What it does |
|---|---|---|
| Identity | 6 | Register agents, heartbeat, RBAC roles, trust scoring |
| Messaging | 5 | P2P / broadcast, FTS5 search, deduplication |
| Task Scheduling | 8 | 7-state machine, pipelines, parallel groups, auto-retry |
| Memory | 5 | private / team / collective scopes, edge function scoring |
| Orchestration | 11 | Dependency chains (DFS cycle detection), quality gates, handover protocols |
| Evolution | 12 | Experience sharing, 4-tier strategy approval, trust-score feedback loop |
| Security | 6 | Token auth, 4-level RBAC, audit hash chain, CORS whitelist |
| Files | 3 | Upload / download / list, up to 10MB Base64 |
53 MCP tools · SQLite WAL (zero message loss) · SSE push latency < 50ms
Architecture
┌──────────────┐ ┌──────────────────────────┐ ┌──────────────┐
│ Agent A │ SSE │ Agent Communication │ SSE │ Agent B │
│ (Claude Code)│◄────────►│ Hub v2.4 │◄────────►│ (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, Hermes, custom agents, etc.
SDK Examples
Python — zero dependencies
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="workbuddy", content="Task completed, handing over.")
# Store shared memory
hub.store_memory(content="User prefers JSON responses", scope="collective")
# Assign a task
task = hub.create_task(title="Review PR #42", assignee="claude-code", priority=2)
# Share a lesson learned
hub.share_experience(title="DB lock timeout fix", content="...", category="debug")
# Stream incoming events
hub.on_message = lambda msg: print(f"Received: {msg}")
hub.connect_sse() # blocks — long-lived SSE connection
TypeScript — also zero external deps
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 */ },
onTaskAssigned: async (task) => { /* handle */ },
});
await client.start();
await client.sendMessage({ to: "workbuddy", content: "Done!" });
Deployment
Docker (recommended)
docker run -d -p 3100:3100 --name ach liuboacean/agent-comm-hub
Docker Compose (with Prometheus + Grafana)
cd deploy && docker compose up -d
# Hub: http://localhost:3100
# Grafana: http://localhost:3000 (admin/admin)
# Prometheus: http://localhost:9090
From source
git clone https://github.com/liuboacean/agent-comm-hub.git
cd agent-comm-hub
npm install && npm run build
npm start
As a Skill
# ClawHub
clawhub install liuboacean/agent-comm-hub
# SkillHub (30+ platforms)
npx skills add liuboacean/agent-comm-hub
MCP Configuration
After starting the Hub, add it to your agent's MCP config:
Option 1: stdio (recommended)
{
"mcpServers": {
"agent-comm-hub": {
"command": "node",
"args": ["<hub-install-path>/stdio.js"],
"env": {
"HUB_KEY": "your-connection-key"
}
}
}
}
Option 2: HTTP + SSE
{
"mcpServers": {
"agent-comm-hub": {
"url": "http://localhost:3100/mcp"
}
}
}
The agent's LLM can then call all 53 tools directly via natural language.
Security
| Feature | Detail |
|---|---|
| RBAC | 4 levels: public → member → group_admin → admin |
| Token auth | SHA-256 agent tokens, stored as hash in DB |
| Audit hash chain | prev_hash → record_hash with DB triggers |
| Trust scoring | Auto-calculated, affects strategy approval tiers |
| CORS | Whitelist-only, default deny |
| Security headers | X-Frame-Options, CSP, HSTS, X-XSS-Protection |
| Request tracing | traceId on every request + response header |
File Structure
agent-comm-hub/
├── src/ # Hub server source (TypeScript)
│ ├── server.ts # Express + SSE + MCP entry point
│ ├── db.ts # SQLite WAL schema + queries
│ ├── identity.ts # Registration, heartbeat, RBAC
│ ├── memory.ts # 3-scope memory with 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)
├── deploy/
│ ├── docker-compose.yml # Prometheus + Grafana observability
│ └── prometheus.yml # Metrics scraping config
├── docs/
│ ├── API_REFERENCE.md # 53 tools complete reference
│ ├── advanced-orchestration-guide.md
│ ├── evolution-engine-guide.md
│ └── hermes-integration-guide.md
├── scripts/
│ ├── install.sh # Hub server install script
│ └── test-e2e.sh # End-to-end test suite
└── tests/ # Integration + unit tests
Documentation
| Doc | When to read |
|---|---|
| API Reference | Every tool signature + examples |
| Orchestration Guide | Pipelines, parallel groups, quality gates |
| Evolution Engine | Trust scoring, strategy approval workflow |
| Hermes Integration | Step-by-step Hermes agent setup |
| README.md (English) | This page |
License
MIT — use it freely in personal and commercial projects.
<p align="center"> <em>Built with the MCP protocol + SSE. No external services. No vendor lock-in.</em> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。