Skip to main content
Glama

Welches Problem wird gelöst?

Wenn Sie mehrere KI-Agenten (Claude Code, OpenClaw, WorkBuddy, benutzerdefinierte Agenten…) ausführen, arbeiten diese in Silos. Sie können nicht:

  • Miteinander kommunizieren, ohne fehleranfällige Webhooks oder gemeinsame Datenbanken

  • Aufgaben planen über Agentengrenzen hinweg

  • Kontext teilen über One-Shot-Prompts hinaus

  • Gemeinsam wachsen als Team basierend auf vergangenen Erfahrungen

Agent Communication Hub verleiht jedem MCP-kompatiblen Agenten ein gemeinsames Nervensystem – Message Bus, Aufgabenwarteschlange, Speicherebene und Evolutions-Engine –, damit Agenten zusammenarbeiten, anstatt isoliert zu agieren.


Related MCP server: Agent MCP Gateway

In 3 Zeilen ausprobieren

# 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!')"

Keine Konfigurationsdateien. Keine externen Dienste. Funktioniert lokal.


Funktionen auf einen Blick

Kategorie

Tools

Was es tut

Identität

6

Agenten registrieren, Heartbeat, RBAC-Rollen, Vertrauens-Scoring

Messaging

5

P2P / Broadcast, FTS5-Suche, Deduplizierung

Aufgabenplanung

8

7-Zustands-Maschine, Pipelines, parallele Gruppen, Auto-Retry

Speicher

5

Private / Team / kollektive Bereiche, Edge-Function-Scoring

Orchestrierung

11

Abhängigkeitsketten (DFS-Zykluserkennung), Quality Gates, Übergabeprotokolle

Evolution

12

Erfahrungsaustausch, 4-stufige Strategie-Genehmigung, Vertrauens-Score-Feedbackschleife

Sicherheit

6

Token-Authentifizierung, 4-stufiges RBAC, Audit-Hash-Kette, CORS-Whitelist

Dateien

3

Hochladen / Herunterladen / Auflisten, bis zu 10 MB Base64

53 MCP-Tools · SQLite WAL (kein Nachrichtenverlust) · SSE-Push-Latenz < 50 ms


Architektur

┌──────────────┐          ┌──────────────────────────┐          ┌──────────────┐
│   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)

Jeder MCP-kompatible Agent kann eine Verbindung herstellen: Claude Code, OpenClaw, WorkBuddy, Hermes, benutzerdefinierte Agenten usw.


SDK-Beispiele

Python — null Abhängigkeiten

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 — ebenfalls null externe Abhängigkeiten

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!" });

Bereitstellung

Docker (empfohlen)

docker run -d -p 3100:3100 --name ach liuboacean/agent-comm-hub

Docker Compose (mit Prometheus + Grafana)

cd deploy && docker compose up -d
# Hub:  http://localhost:3100
# Grafana: http://localhost:3000 (admin/admin)
# Prometheus: http://localhost:9090

Aus dem Quellcode

git clone https://github.com/liuboacean/agent-comm-hub.git
cd agent-comm-hub
npm install && npm run build
npm start

Als Skill

# ClawHub
clawhub install liuboacean/agent-comm-hub

# SkillHub (30+ platforms)
npx skills add liuboacean/agent-comm-hub

MCP-Konfiguration

Nach dem Start des Hubs fügen Sie ihn zur MCP-Konfiguration Ihres Agenten hinzu:

Option 1: stdio (empfohlen)

{
  "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"
    }
  }
}

Das LLM des Agenten kann dann alle 53 Tools direkt über natürliche Sprache aufrufen.


Sicherheit

Funktion

Detail

RBAC

4 Stufen: public → member → group_admin → admin

Token-Auth

SHA-256 Agenten-Token, als Hash in der DB gespeichert

Audit-Hash-Kette

prev_hash → record_hash mit DB-Triggern

Vertrauens-Scoring

Automatisch berechnet, beeinflusst Strategie-Genehmigungsstufen

CORS

Nur Whitelist, Standard-Ablehnung

Sicherheits-Header

X-Frame-Options, CSP, HSTS, X-XSS-Protection

Request-Tracing

traceId bei jeder Anfrage + Antwort-Header


Dateistruktur

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

Dokumentation

Dokument

Wann zu lesen

API-Referenz

Jede Tool-Signatur + Beispiele

Orchestrierungs-Leitfaden

Pipelines, parallele Gruppen, Quality Gates

Evolutions-Engine

Vertrauens-Scoring, Strategie-Genehmigungs-Workflow

Hermes-Integration

Schritt-für-Schritt Hermes-Agenten-Einrichtung

README.md (Englisch)

Diese Seite


Lizenz

MIT — nutzen Sie es frei in persönlichen und kommerziellen Projekten.


Available Tools

58 tools
accept_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).

share_experienceA

分享经验到 Hub。经验直接发布(不需审批),所有 Agent 可见。适合记录踩坑经验、最佳实践。

Inputs: title (required), content (required), tags, task_id.

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

    B3.4/5.0

    Scored across 58 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers