← 返回 Skills 市场
ericshpych

agent-link-relay-server

作者 ericshpych · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
96
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-link-relay-server
功能描述
智能体互联技能 - 支持不同电脑上的 OpenClaw 实例和 Agent 通过中转服务器进行安全可靠的通讯。包含中转服务器组件和本地 Agent 组件。
使用说明 (SKILL.md)

Agent Link - 智能体互联

跨设备 OpenClaw 实例和 Agent 的安全可靠通讯解决方案


架构设计

核心组件

组件 部署位置 角色 功能
中转服务器 (Relay Server) 公网服务器 消息中转 接收、验证、转发消息
本地 Agent (Local Agent) 各个电脑 消息收发 连接中转服务器、发送/接收消息

通讯流程

本地 Agent A → 本地 OpenClaw → 中转服务器 → 远程 OpenClaw → 远程 Agent B
     ↑                                                            ↓
     └────────────────────────── 确认回执 ──────────────────────┘

功能特性

✅ 中转服务器功能

  • 消息接收和转发
  • Agent 身份注册和验证
  • 消息签名验证,防止伪造
  • 消息路由分发
  • 连接状态监控

✅ 本地 Agent 功能

  • 连接中转服务器
  • 发送消息给其他 Agent
  • 接收来自其他 Agent 的消息
  • 消息签名和验证
  • 断线自动重连

✅ 安全机制

  • 每个 OpenClaw 实例需要在中转服务器注册
  • 每个 Agent 需要在本地 OpenClaw 注册
  • 消息签名验证(HMAC-SHA256)
  • 中转服务器只做转发,不保存消息内容

安装说明

中转服务器安装

详见 docs/install-relay.md

本地 Agent 安装

详见 docs/install-agent.md


快速开始

1. 安装中转服务器

# 在公网服务器上
cd skills/agent-link/scripts/relay-server
python3 relay_server.py --port 8765 --secret "your-secret-key"

2. 配置本地 Agent

# 在本地电脑上
cd skills/agent-link/scripts/local-agent
python3 setup.py --relay-url "ws://your-relay-server:8765" --secret "your-secret-key"

3. 发送消息

from agent_link import AgentLink

link = AgentLink(agent_id="xiaodingding")
link.send("xiaobaozi", "你好,小包子!")

配置文件

中转服务器配置 (relay-config.json)

{
  "port": 8765,
  "secret": "your-secret-key",
  "registered_instances": [
    {
      "instance_id": "instance-001",
      "name": "晨辉的 MacBook",
      "public_key": "..."
    }
  ]
}

本地 Agent 配置 (agent-link-config.json)

{
  "relay_url": "ws://your-relay-server:8765",
  "secret": "your-secret-key",
  "instance_id": "instance-001",
  "agent_id": "healthguard",
  "auto_reconnect": true
}

API 参考

中转服务器 API

注册实例

POST /api/v1/register
{
  "instance_id": "instance-001",
  "public_key": "...",
  "name": "晨辉的 MacBook"
}

发送消息

POST /api/v1/send
{
  "from": "instance-001/healthguard",
  "to": "instance-002/xiaobaozi",
  "message": "你好,小包子!",
  "signature": "..."
}

本地 Agent API

初始化

link = AgentLink(config_path="agent-link-config.json")

发送消息

link.send(to_agent="xiaobaozi", message="你好!")

接收消息

@link.on_message
def handle_message(from_agent, message):
    print(f"收到来自 {from_agent} 的消息: {message}")

安全说明

  1. 密钥管理

    • 中转服务器和本地 Agent 使用共享密钥
    • 密钥需要安全保存,不要泄露
  2. 消息签名

    • 所有消息使用 HMAC-SHA256 签名
    • 防止消息伪造和篡改
  3. 数据隐私

    • 中转服务器只做消息转发
    • 不保存消息内容
    • 消息传输使用 WSS (WebSocket Secure)

故障排除

中转服务器无法启动

  • 检查端口是否被占用
  • 检查防火墙设置
  • 查看日志文件

本地 Agent 无法连接

  • 检查中转服务器地址是否正确
  • 检查网络连接
  • 检查密钥是否匹配

消息发送失败

  • 检查目标 Agent 是否在线
  • 检查消息签名是否正确
  • 查看中转服务器日志

更新日志

  • 1.0.0 (2026-04-04)
    • 初始版本发布
    • 支持中转服务器和本地 Agent 通讯
    • 支持消息签名验证
    • 支持断线自动重连
安全使用建议
What to check before installing/using this skill: - Metadata mismatch: The registry metadata claims the 'openclaw' binary is required; the relay server code itself does not call OpenClaw. Confirm whether the server really needs OpenClaw present (it likely does not). Ask the publisher to correct requires.bins. - Missing local-agent code: SKILL.md and README reference scripts/local-agent (client code) but those files are not bundled. Without the client code you cannot complete the advertised workflow. Request the missing files or source before deploying. - Signature verification looks broken: The server verifies a registration signature using a message that embeds the server's current timestamp (datetime.now()), which clients cannot deterministically reproduce. This will likely prevent legitimate clients from registering. Ask the author to explain or fix the signing protocol (use a client-provided nonce/timestamp or canonicalized payload instead). - TLS is not enforced: The docs recommend WSS but the server serves plain WebSocket. For any public deployment, run the service behind TLS (reverse proxy, nginx, or provide TLS in code) and restrict access with firewall rules. - Secrets and keys: The system relies on a shared secret; do not reuse the same secret across many systems, rotate it, and avoid committing it to version control. Consider per-instance keys or public-key authentication if you need stronger separation. - Run in a controlled environment first: Because the package is incomplete and has protocol bugs, test it in an isolated VM or container. Review and, if necessary, correct the signature logic and add TLS before exposing to the internet. If the author supplies the missing client code, corrects the requires.bins metadata (removing the unnecessary 'openclaw' requirement), and fixes the registration signature scheme, the package would become much more coherent and could be re-evaluated as benign.
功能分析
Type: OpenClaw Skill Name: agent-link-relay-server Version: 1.0.0 The skill bundle provides a legitimate relay server for inter-agent communication using WebSockets and HMAC-SHA256 for message authentication. The implementation in `relay_server.py` is consistent with the documentation in `SKILL.md` and `README.md`, focusing on message routing, instance registration, and signature verification without any indicators of data exfiltration, unauthorized execution, or malicious intent.
能力评估
Purpose & Capability
The code and documentation match the stated purpose (a relay server for cross-device Agent messaging). However the declared required binaries are inconsistent and partially disproportionate: the metadata requires the 'openclaw' binary even though the relay server code does not call or need OpenClaw. The requires.bins also redundantly lists both 'python' and 'python3' while anyBins duplicates them — this metadata is incoherent and should be corrected.
Instruction Scope
SKILL.md instructs running both server and local-agent components, but the distribution omits the local-agent code referenced in the docs (scripts/local-agent/* files are described but not present). The server's documented registration/signature flow appears brittle: the server verifies a register signature using a message string that embeds the server's current timestamp slice (datetime.now()), which clients cannot reliably reproduce, making registration likely to fail. The README recommends WSS, but the included RelayServer runs an unencrypted websockets. The instructions ask you to use WSS for production but do not supply TLS setup guidance or enforce TLS in the code.
Install Mechanism
No automated install spec is provided (instruction-only). That limits hidden installation behavior. The only runtime dependency called out is the websockets Python package; the docs instruct to pip install it. No remote downloads or extracts are present in the skill bundle.
Credentials
The skill declares no required environment variables (good), but the required-binaries list includes 'openclaw' which is unrelated to running the relay server and is disproportionate. The binary requirements metadata should be fixed to avoid granting misleading permissions/assumptions about the runtime environment.
Persistence & Privilege
The skill does not request always:true or other special platform privileges. It is user-invocable and does not attempt to modify other skills or persistent platform policies.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-link-relay-server
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-link-relay-server 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
支持通过服务端进行agent之间通讯
元数据
Slug agent-link-relay-server
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

agent-link-relay-server 是什么?

智能体互联技能 - 支持不同电脑上的 OpenClaw 实例和 Agent 通过中转服务器进行安全可靠的通讯。包含中转服务器组件和本地 Agent 组件。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 96 次。

如何安装 agent-link-relay-server?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-link-relay-server」即可一键安装,无需额外配置。

agent-link-relay-server 是免费的吗?

是的,agent-link-relay-server 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

agent-link-relay-server 支持哪些平台?

agent-link-relay-server 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 agent-link-relay-server?

由 ericshpych(@ericshpych)开发并维护,当前版本 v1.0.0。

💬 留言讨论