← 返回 Skills 市场
451
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install agent-communication
功能描述
支持Agent间消息传递、广播、状态同步和共享工作空间,提高多Agent团队协作效率并解决通信超时问题。
使用说明 (SKILL.md)
Agent Communication Skill
一个通用的 Agent 间沟通技能,基于 WebSocket 实现实时双向通信,解决多 Agent 团队协作中的沟通问题。
技术架构
🚀 WebSocket 实时通信
┌─────────────────────────────────────────────────────┐
│ WebSocket 消息代理架构 │
├─────────────────────────────────────────────────────┤
│ │
│ Agent A ◄────► WebSocket ◄────► Agent B │
│ Server │
│ Agent C ◄──────────────────────► Agent D │
│ │
│ ✅ 实时双向通信 │
│ ✅ 无需轮询 │
│ ✅ 延迟 \x3C50ms │
│ ✅ 离线消息队列 │
└─────────────────────────────────────────────────────┘
核心功能
- 🚀 WebSocket 实时通信 - 高性能双向通信
- 📨 消息传递 - Agent 之间快速发送消息
- 📢 广播消息 - 一次发送给多个 Agent
- 🗂️ 共享工作空间 - 文件驱动的协作
- 🟢 状态同步 - Agent 在线状态检测
- 💾 离线消息 - 离线 Agent 自动排队
安装
# 安装依赖
pip install websockets
# 通过 ClawHub 安装
openclaw skill install agent-communication
使用方法
1. 启动消息代理(WebSocket 服务器)
python3 scripts/broker.py
2. 发送消息
# WebSocket 模式(优先)
python3 scripts/send.py --from pm --to dev --message "开始开发"
# 文件模式(回退)
python3 scripts/send.py --from pm --to dev --message "开始开发" --file
3. Agent 客户端连接
import asyncio
from websocket_client import AgentClient
async def main():
client = AgentClient("pm", "ws://localhost:8765")
# 连接并监听
async def handle_message(msg):
print(f"收到消息: {msg}")
await client.run(handle_message)
asyncio.run(main())
性能指标
| 指标 | 文件方案 | WebSocket 方案 |
|---|---|---|
| 延迟 | 500ms | \x3C50ms |
| 实时性 | 轮询 | 即时 |
| CPU 占用 | 中 | 低 |
| 离线支持 | ✅ | ✅ |
文件结构
agent-communication/
├── scripts/
│ ├── broker.py # WebSocket 消息代理
│ ├── websocket_client.py # Agent 客户端
│ ├── send.py # 发送消息(智能选择)
│ ├── broadcast.py # 广播消息
│ ├── status.py # 状态管理
│ └── workspace.py # 共享工作空间
├── data/
│ ├── messages/ # 消息存储
│ ├── status/ # Agent 状态
│ └── workspace/ # 共享数据
└── templates/
└── config.json # 配置文件
解决的问题
| 问题 | 解决方案 |
|---|---|
| sessions_send 超时 | WebSocket 实时通信 |
| Agent 无法直接沟通 | 消息代理转发 |
| 团队协作效率低 | 即时消息传递 |
版本
- 版本: 2.0.0
- 更新: WebSocket 实时通信
- 作者: momoflowers_bot
安全使用建议
This skill appears to do what it says: a local WebSocket broker and client tools that keep messages on disk. Before installing or running: (1) run it in a trusted or isolated network or change the broker HOST from 0.0.0.0 to 127.0.0.1 if you do not want it reachable externally; (2) review and control access to the skill's data/ directory (message, status, workspace files are stored there); (3) install the 'websockets' dependency in a virtualenv to avoid affecting system Python; (4) be aware test_websocket.py uses an absolute '/root/.openclaw/...' path which may need adjustment in your environment; (5) note minor metadata/version inconsistencies in README/_meta vs registry metadata (harmless but worth checking the publisher). If you need the broker accessible beyond the host, place it behind appropriate network controls (firewall, auth proxy) — otherwise bind to localhost.
功能分析
Type: OpenClaw Skill
Name: agent-communication
Version: 0.1.1
The skill bundle contains multiple path traversal vulnerabilities across `scripts/broker.py`, `scripts/send.py`, `scripts/status.py`, and `scripts/workspace.py`. These scripts use user-controlled inputs (such as `agent_id`, `to`, and `key`) directly in file path constructions without sanitization. This allows a malicious agent to read, write, or delete arbitrary files on the system by injecting path traversal sequences (e.g., `../`) into these inputs, potentially leading to information disclosure, arbitrary code execution, or denial of service. While there is no clear evidence of intentional malicious behavior, these critical vulnerabilities make the skill suspicious.
能力评估
Purpose & Capability
The name/description (Agent communication via WebSocket) align with the included scripts (broker, websocket_client, send, broadcast, status, workspace). No unrelated binaries, credentials, or external services are required by the code.
Instruction Scope
SKILL.md and scripts instruct running a local WebSocket server and clients and saving messages to a local data/ directory. The broker binds to 0.0.0.0:8765 (all interfaces) which is expected for a messaging service but can expose the service to the network — consider binding to localhost or adding firewall rules. Test scripts include a hard-coded sys.path insert pointing at an absolute '/root/.openclaw/...' path (test_websocket.py), which is an environment-specific assumption but not evidence of malicious behavior.
Install Mechanism
No install spec is embedded; runtime instructions ask to pip install the single dependency 'websockets'. This is low-risk and proportionate to the code's needs. There is no downloading of arbitrary archives or remote executables.
Credentials
The skill requests no environment variables or credentials. The code does not read secrets or external config; it only reads/writes local files under its data/ directory and templates/config.json. This is proportionate to its functionality.
Persistence & Privilege
The skill is not always-included and does not request elevated platform privileges. It writes only to its own data/ directory and does not modify other skills or global agent configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agent-communication - 安装完成后,直接呼叫该 Skill 的名称或使用
/agent-communication触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
Major update: Adds WebSocket-based real-time communication and enhanced agent interaction.
- Introduced WebSocket server (broker) for low-latency, bidirectional agent messaging.
- Added new scripts: broker.py, websocket_client.py, and test_websocket.py.
- send.py now intelligently chooses between WebSocket and file-based messaging.
- Improved documentation outlining real-time features, offline support, and example code for integration.
- Updated file structure to include new real-time communication components.
v0.1.0
- Initial release of the Agent Communication Skill.
- Enables direct message passing and broadcast between agents.
- Supports a shared workspace for file-driven collaboration.
- Provides agent online status detection and state sync.
- Addresses messaging timeout issues and boosts team collaboration efficiency.
元数据
常见问题
Agent Communication 是什么?
支持Agent间消息传递、广播、状态同步和共享工作空间,提高多Agent团队协作效率并解决通信超时问题。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 451 次。
如何安装 Agent Communication?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-communication」即可一键安装,无需额外配置。
Agent Communication 是免费的吗?
是的,Agent Communication 完全免费(开源免费),可自由下载、安装和使用。
Agent Communication 支持哪些平台?
Agent Communication 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agent Communication?
由 DFshmily(@dfshmily)开发并维护,当前版本 v0.1.1。
推荐 Skills