← Back to Skills Marketplace
451
Downloads
0
Stars
2
Active Installs
2
Versions
Install in OpenClaw
/install agent-communication
Description
支持Agent间消息传递、广播、状态同步和共享工作空间,提高多Agent团队协作效率并解决通信超时问题。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-communication - After installation, invoke the skill by name or use
/agent-communication - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is Agent Communication?
支持Agent间消息传递、广播、状态同步和共享工作空间,提高多Agent团队协作效率并解决通信超时问题。 It is an AI Agent Skill for Claude Code / OpenClaw, with 451 downloads so far.
How do I install Agent Communication?
Run "/install agent-communication" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Communication free?
Yes, Agent Communication is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Agent Communication support?
Agent Communication is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Communication?
It is built and maintained by DFshmily (@dfshmily); the current version is v0.1.1.
More Skills