Agent-Comm-Hub
どのような問題を解決しますか?
複数のAIエージェント(Claude Code、OpenClaw、WorkBuddy、カスタムエージェントなど)を実行する場合、それらはサイロ化して動作します。そのため、以下のようなことができません:
壊れやすいWebhookや共有データベースなしで相互に通信する
エージェントの境界を越えてタスクをスケジュールする
ワンショットプロンプトを超えてコンテキストを共有する
過去の経験に基づいてチームとして共に進化する
Agent Communication Hubは、すべてのMCP互換エージェントに共通の神経系(メッセージバス、タスクキュー、メモリレイヤー、進化エンジン)を提供し、エージェントが孤立するのではなく協力できるようにします。
Related MCP server: Agent MCP Gateway
3行で試す
# 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!')"設定ファイルは不要。外部サービスも不要。ローカルで動作します。
特徴の概要
カテゴリ | ツール数 | 機能 |
ID管理 | 6 | エージェント登録、ハートビート、RBACロール、信頼スコアリング |
メッセージング | 5 | P2P / ブロードキャスト、FTS5検索、重複排除 |
タスクスケジューリング | 8 | 7状態マシン、パイプライン、並列グループ、自動リトライ |
メモリ | 5 | プライベート / チーム / 全体スコープ、エッジ関数スコアリング |
オーケストレーション | 11 | 依存関係チェーン(DFSサイクル検出)、品質ゲート、ハンドオーバープロトコル |
進化 | 12 | 経験共有、4段階の戦略承認、信頼スコアフィードバックループ |
セキュリティ | 6 | トークン認証、4レベルRBAC、監査ハッシュチェーン、CORSホワイトリスト |
ファイル | 3 | アップロード / ダウンロード / リスト、最大10MBのBase64 |
53個のMCPツール · SQLite WAL(メッセージ損失ゼロ) · SSEプッシュ遅延 < 50ms
アーキテクチャ
┌──────────────┐ ┌──────────────────────────┐ ┌──────────────┐
│ 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)Claude Code、OpenClaw、WorkBuddy、Hermes、カスタムエージェントなど、MCP互換エージェントであれば何でも接続可能です。
SDKの例
Python — 依存関係ゼロ
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 connectionTypeScript — こちらも外部依存関係ゼロ
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!" });デプロイメント
Docker (推奨)
docker run -d -p 3100:3100 --name ach liuboacean/agent-comm-hubDocker Compose (Prometheus + Grafanaを含む)
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
npm startスキルとして追加
# ClawHub
clawhub install liuboacean/agent-comm-hub
# SkillHub (30+ platforms)
npx skills add liuboacean/agent-comm-hubMCP設定
Hubを起動した後、エージェントのMCP設定に追加してください:
オプション1: stdio (推奨)
{
"mcpServers": {
"agent-comm-hub": {
"command": "node",
"args": ["<hub-install-path>/stdio.js"],
"env": {
"HUB_KEY": "your-connection-key"
}
}
}
}オプション2: HTTP + SSE
{
"mcpServers": {
"agent-comm-hub": {
"url": "http://localhost:3100/mcp"
}
}
}エージェントのLLMは、自然言語を通じて53個のツールすべてを直接呼び出すことができます。
セキュリティ
機能 | 詳細 |
RBAC | 4レベル: public → member → group_admin → admin |
トークン認証 | SHA-256エージェントトークン、DBにハッシュとして保存 |
監査ハッシュチェーン | DBトリガーによる |
信頼スコアリング | 自動計算され、戦略承認ティアに影響 |
CORS | ホワイトリストのみ、デフォルトで拒否 |
セキュリティヘッダー | X-Frame-Options, CSP, HSTS, X-XSS-Protection |
リクエスト追跡 | すべてのリクエストとレスポンスヘッダーにtraceIdを付与 |
ファイル構造
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ドキュメント
ドキュメント | 読むタイミング |
すべてのツールのシグネチャと例 | |
パイプライン、並列グループ、品質ゲート | |
信頼スコアリング、戦略承認ワークフロー | |
Hermesエージェントのステップバイステップ設定 | |
このページ |
ライセンス
MIT — 個人プロジェクトおよび商用プロジェクトで自由に使用できます。
Available Tools
58 toolsaccept_handoffA
接受任务交接。只有被请求的 target Agent 可以调用。接受后任务 assigned_to 转移到当前 Agent。
Inputs: task_id (required).
acknowledge_messageA
标记消息为已处理(acknowledged)。调用此工具后该消息不会再出现在未处理消息列表中。Hermes 处理完 WorkBuddy 发来的消息并回复后,必须调用此工具。
Inputs: agent_id (required), message_id (required).
activate_agentA
激活一个已注册的 Agent(registered/suspended → active)。已激活再激活幂等。
Inputs: agent_id (required).
add_dependencyA
添加任务依赖关系。下游任务必须等上游任务完成后才能开始。自动进行环检测。添加后下游任务自动进入等待状态。
Inputs: upstream_id (required), downstream_id (required), dep_type.
add_quality_gateA
在 Pipeline 中添加质量门。质量门在指定 order_index 之后阻塞后续任务,直到评估通过。criteria 为 JSON 格式的检查规则。
Inputs: criteria (required), gate_name (required), after_order (required), pipeline_id (required).
add_task_to_pipelineA
将任务添加到 Pipeline。指定任务在 Pipeline 中的顺序。不传 order_index 则自动追加到末尾。
Inputs: task_id (required), pipeline_id (required), order_index.
apply_strategyA
采纳一个已审批的策略。记录到策略应用记录中,apply_count 自增。
Inputs: strategy_id (required), context.
approve_strategyA
审批策略(approve/reject)。仅 admin 可调用。审批后通过 SSE 通知提议者。
Inputs: action (required), reason (required), strategy_id (required).
archive_dataA
手动触发数据归档。将指定天数之前的记录从主表移入归档表,以减少主表体积。可归档 messages(默认 30 天前)或 audit_log(默认 90 天前)。仅 admin 可调用。
Inputs: type (required), days, vacuum.
assign_taskC
将任务分配给另一个 Agent。对方收到 task_assigned 事件后会自主开始执行,无需人工确认。
Inputs: to (required), from (required), description (required), context, +1 more.
batch_acknowledge_messagesA
批量确认消息为已处理。可按 agent_id 和时间范围筛选,将匹配的未确认消息全部标记为 acknowledged。用于清理消息积压。
Inputs: agent_id (required), after, limit, before, +2 more.
broadcast_messageA
向多个 Agent 广播消息,适用于任务协调、状态同步、紧急通知。
Inputs: from (required), content (required), agent_ids (required), metadata.
check_consumedA
查询某资源是否已被当前 Agent 处理过。在处理 WorkBuddy 发来的文件或信号前,先调用此工具检查,已处理的直接跳过。
Inputs: agent_id (required), resource (required).
check_veto_windowA
检查策略的否决窗口状态。处于 48h 否决窗口内的策略,如果负面反馈超过正面反馈的 50%,可被 admin 撤回。
Inputs: strategy_id (required).
create_parallel_groupA
将多个任务标记为并行组。同一并行组内的任务可以同时执行,无需等待其他任务完成。适用于无依赖关系的同层任务。
Inputs: task_ids (required).
create_pipelineA
创建一个新的 Pipeline(任务流水线)。Pipeline 是任务的有序容器,可添加质量门进行阶段性质量检查。
Inputs: name (required), description.
deactivate_agentA
挂起一个活跃 Agent(active → suspended)。已挂起再挂起幂等。
Inputs: agent_id (required).
delete_memoryA
删除一条记忆。仅能删除自己的私有记忆(admin 可删除任何记忆)。
Inputs: memory_id (required).
download_fileB
下载附件,返回 Base64 编码的文件内容。
Inputs: attachment_id (required).
evaluate_quality_gateA
评估质量门(通过/失败)。质量门失败时,Pipeline 中阻塞的后续任务自动进入 waiting 状态。
Inputs: status (required), gate_id (required), result.
feedback_strategyB
对策略提供反馈(正面/负面/中性)。每个 Agent 对每个策略只能反馈一次(防刷)。
Inputs: feedback (required), strategy_id (required), applied, comment.
generate_inviteA
生成新 Agent 邀请码。仅 admin 可调用。邀请码默认 24 小时后过期。
Inputs: role, expires_in_hours.
get_db_statsA
获取数据库统计信息。包括各表行数、数据库文件大小、WAL 大小、最后归档时间等。仅 admin 可调用。
Inputs: no named parameters.
get_evolution_statusA
查看 Evolution Engine 进化指标统计。包含经验数、策略数、审批率、贡献者排名等。
Inputs: no named parameters.
get_online_agentsA
查询当前通过 SSE 在线连接的 Agent 列表,分配任务前可先确认对方在线。
Inputs: no named parameters.
get_pipelineA
查询 Pipeline 状态和进度。返回 Pipeline 信息、关联任务列表及各状态统计。
Inputs: pipeline_id (required).
get_task_dependenciesA
查询任务的上下游依赖关系。返回依赖图,包含每个关联任务的状态和依赖类型。
Inputs: task_id (required).
get_task_statusA
查询任务的当前状态、进度和执行结果。
Inputs: task_id (required).
heartbeatA
上报 Agent 心跳,维持在线状态并累积信任分。Agent 上线后应每 30 秒调用一次。超过 90 秒无心跳将自动标记为离线。连续在线心跳每 3 次自动增加 1 点 trust_score(上限 100)。
Inputs: agent_id (required).
list_attachmentsB
列出消息的所有附件列表。
Inputs: message_id (required).
list_memoriesA
列出可访问的记忆列表。按创建时间倒序排列。可按 scope 筛选。
Inputs: limit, scope, offset.
list_pipelinesB
列出所有 Pipeline。支持按状态筛选,按创建时间倒序排列。
Inputs: limit, status.
list_strategiesB
查询策略/经验列表。支持按状态、分类、提议者筛选。
Inputs: limit, status, category, proposer_id.
mark_consumedA
记录 Agent 已处理某个资源(文件路径或信号 ID)。处理完 WorkBuddy 发来的任何文件或信号后必须调用,防止下次重复处理。
Inputs: action (required), agent_id (required), resource (required), notes, +1 more.
pause_pipelineA
暂停一个活跃 Pipeline(active → paused)。已暂停再暂停幂等。
Inputs: pipeline_id (required).
propose_strategyA
提议一个策略。策略需 admin 审批后才能被其他 Agent 搜索和采纳。Hub 会自动判定敏感级别。
Inputs: title (required), content (required), category (required), task_id.
propose_strategy_tieredB
提议策略(分级审批)。Hub 自动判定审批等级:auto(自动通过+72h观察窗口)、peer(同行审批)、admin(管理员审批)、super(高风险,需人工审批)。返回判定等级和审批状态。
Inputs: title (required), content (required), category (required), task_id.
query_agentsB
查询已注册的 Agent 列表。支持按状态、角色筛选。
Inputs: role, status, capability.
recalculate_trust_scoresA
手动触发信任评分重算。基于多因子自动计算:verified capabilities (+3)、approved strategies (+2)、positive feedback (+1)、negative feedback (-2)、rejected applications (-3)、revoked tokens (-10)。不传 agent_id 则重算全部。仅 admin 可调用。
Inputs: agent_id.
recall_memoryA
通过关键词全文搜索召回记忆。搜索范围包括自己的私有记忆、组内共享记忆和全局记忆。使用 FTS5 引擎,支持多关键词、短语搜索。
Inputs: query (required), limit, scope.
register_agentA
注册新 Agent 到 Hub。需要有效的邀请码。注册成功返回 agent_id 和 api_token(仅显示一次)。
Inputs: name (required), invite_code (required), capabilities.
reject_handoffA
拒绝任务交接。只有被请求的 target Agent 可以调用。拒绝后交接请求取消。
Inputs: task_id (required), reason.
remove_dependencyA
删除任务依赖关系。删除后自动检查下游任务是否可以开始执行。
Inputs: upstream_id (required), downstream_id (required).
request_handoffB
请求任务交接。将任务转交给另一个 Agent。目标 Agent 需要调用 accept_handoff 或 reject_handoff。只有负责人或创建者可以发起交接。
Inputs: task_id (required), target_agent_id (required).
resume_pipelineA
恢复一个暂停的 Pipeline(paused → active)。已激活再恢复幂等。
Inputs: pipeline_id (required).
revoke_tokenA
吊销 API Token,使其立即失效。仅 admin 可调用。
Inputs: token_id (required).
score_applied_strategiesA
自动评分已采纳策略:将 7 天前采纳但仍为 neutral 反馈的策略降为 negative。应定期调用。
Inputs: no named parameters.
search_memoriesB
全文搜索记忆内容。使用 FTS5 引擎,支持多关键词、短语搜索。可按可见范围和标签筛选。
Inputs: query (required), tags, limit, scope, +1 more.
search_messagesA
全文搜索消息内容。支持按 Agent ID 筛选。使用 SQL LIKE 模糊匹配(暂无 FTS5 索引)。
Inputs: query (required), limit, agent_id.
search_strategiesA
通过关键词全文搜索策略和经验。仅返回已审批(approved)的策略。
Inputs: query (required), limit, category.
send_messageA
向另一个 Agent 发送即时消息。对方在线时实时送达(<50ms),离线时持久化存储,上线后自动补发。
Inputs: to (required), from (required), content (required), type, +1 more.
set_agent_roleA
设置 Agent 角色(admin/member/group_admin)。group_admin 需指定 managed_group_id,仅能管理该 parallel_group 内成员的任务。仅 admin 可调用。
Inputs: role (required), agent_id (required), managed_group_id.
set_trust_scoreA
调整 Agent 信任分(-100 到 +100 的增量)。信任分影响 collective 记忆搜索排序,高信任 Agent 的记忆排名靠前。仅 admin 可调用。
Inputs: delta (required), agent_id (required).
store_memoryA
存储一条记忆到 Hub。支持 private(仅自己可见)、group(组内可见)、collective(全局可见)三种范围。存储后可通过 recall_memory 全文搜索召回。
Inputs: content (required), tags, scope, title, +1 more.
update_task_statusA
更新任务执行状态,自动实时通知发起方。支持中途汇报进度(in_progress + progress)。
Inputs: status (required), task_id (required), agent_id (required), result, +1 more.
upload_fileB
上传文件附件并关联到消息。文件以 Base64 编码传入,服务端解码后存储到本地磁盘。
Inputs: filename (required), message_id (required), content_base64 (required), mime_type.
veto_strategyA
撤回处于否决窗口内的策略(admin only)。仅在负面反馈超过正面反馈 50% 时可用。
Inputs: reason (required), strategy_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 58 tools
Many tools have distinct purposes (e.g., propose_strategy vs share_experience, store_memory vs recall_memory), but there is notable overlap between search_memories and recall_memory (both are FTS5 full-text search), and between get_task_status and update_task_status (one is status query, one is status update but names are close). Also, propose_strategy and propose_strategy_tiered are nearly identical in purpose, differing only in approval process, which could cause confusion despite descriptions clarifying slightly.
Most tool names follow a clear verb_noun pattern (e.g., accept_handoff, get_task_status, create_pipeline, activate_agent). There are minor deviations: 'check_consumed' vs 'mark_consumed' are consistent, but 'get_db_stats' is a bit non-standard (could be 'get_database_stats'), and 'score_applied_strategies' mixes an adjective into the noun phrase. However, the overall consistency is high.
58 tools is far beyond the typical 3-15 range. The server covers a wide domain (agent management, messaging, memory, strategies, tasks, pipelines, attachments, admin), but the count is excessive and likely overwhelms an agent's tool selection. Many tools are variants (e.g., 5 pipeline-related tools) that could be consolidated, but 58 is still a heavy load.
The tool set covers the core lifecycle for all its domains: agent registration/activation/deactivation, messaging with ack processing, memory CRUD and search, strategy proposal/approval/feedback, task assignment/status/dependencies, pipeline creation/management, and file attachments. Minor gaps exist: no direct way to delete a message, no audit log query, and no tool to explicitly list consumed resources (only check_consumed for a specific one), but agents can work around these.
Maintenance
Related MCP Connectors
Messaging network for AI agents: talk to other people's agents over MCP. Free forever.
Free social platform for AI agents — boards with tool-call receipts; MCP server + REST API.
MCP-first toolbox for agents: KV storage, auth, queue, and utility tools. Free in early access.
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables deployment of autonomous AI agents with memory and tool execution capabilities through a WebSocket-based MCP protocol. Provides production-ready infrastructure with REST API access, persistent state management, and extensible function registry for building self-hosted AI systems.-
- AlicenseAqualityDmaintenanceProvides per-Subagent MCP controls to any coding agent or client across all your MCPs and prevents context window waste. Loads only 3 tools instead of all your MCP Server's tool definitions. Agents discover tools on-demand, only when needed and only the servers and tools they are allowed.489 PyPI42MIT
- AlicenseNot gradedqualityBmaintenanceOpen-source MCP server for collaborative AI agents, providing a shared mailbox, identity model, and notification fabric.3Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to share knowledge, coordinate tasks, and maintain persistent memory across distributed infrastructure with secure vaults and 130+ MCP tools.7MIT