← Back to Skills Marketplace
ericshpych

agent-link-relay-server

by ericshpych · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
96
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install agent-link-relay-server
Description
智能体互联技能 - 支持不同电脑上的 OpenClaw 实例和 Agent 通过中转服务器进行安全可靠的通讯。包含中转服务器组件和本地 Agent 组件。
README (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 通讯
    • 支持消息签名验证
    • 支持断线自动重连
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-link-relay-server
  3. After installation, invoke the skill by name or use /agent-link-relay-server
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
支持通过服务端进行agent之间通讯
Metadata
Slug agent-link-relay-server
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is agent-link-relay-server?

智能体互联技能 - 支持不同电脑上的 OpenClaw 实例和 Agent 通过中转服务器进行安全可靠的通讯。包含中转服务器组件和本地 Agent 组件。 It is an AI Agent Skill for Claude Code / OpenClaw, with 96 downloads so far.

How do I install agent-link-relay-server?

Run "/install agent-link-relay-server" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is agent-link-relay-server free?

Yes, agent-link-relay-server is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does agent-link-relay-server support?

agent-link-relay-server is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created agent-link-relay-server?

It is built and maintained by ericshpych (@ericshpych); the current version is v1.0.0.

💬 Comments