OpenClaw Peer Bridge
Design communication between two OpenClaw instances using supported primitives only.
Prefer explicit, auditable flows: webhook delivery, cron delivery, channel routing, or user-mediated relay.
Do not invent peer-to-peer commands or claim native cross-instance session sharing unless it exists in the current deployment.
Core patterns
1. Event push via webhook
Use when one OpenClaw instance needs to notify another system or service immediately.
Pattern:
- 1. Source OpenClaw runs an isolated cron or task.
- Delivery mode is
webhook. - Target side exposes an HTTP endpoint that accepts the event and decides what to do next.
Use for:
- - health checks
- deployment notifications
- audit summaries
- workflow completion callbacks
2. Human-routed messaging bridge
Use when the only guaranteed common surface between two instances is a chat channel.
Pattern:
- 1. Instance A sends a structured message to a human-controlled channel.
- Human or downstream automation forwards or triggers Instance B.
- Keep payloads short, explicit, and idempotent.
Use for:
- - approvals
- escalation paths
- low-frequency handoffs
- cross-org workflows where direct network trust is not available
3. Scheduled relay
Use when exact timing matters more than low latency.
Pattern:
- 1. Source instance schedules a cron job.
- Cron produces either an announcement or webhook.
- Target instance or receiving system processes the scheduled event.
Use for:
- - daily summaries
- recurring audits
- scheduled sync checks
- heartbeat-style supervision
4. Local-to-remote control pattern
Use when a workstation OpenClaw needs to coordinate with a server-side OpenClaw.
Recommended split:
- - local instance handles human interaction, approvals, and dashboards
- remote instance handles long-running jobs, server inspection, and isolated automation
Design rules:
- - keep credentials local to the instance that needs them
- push summaries, not raw secrets
- define ownership of each task clearly
- prefer append-only logs and explicit acknowledgements
Workflow
Step 1: define the bridge objective
State the business outcome first:
- - alerting
- task dispatch
- result return
- approval request
- periodic reporting
Step 2: choose the transport
Choose the smallest sufficient transport:
- - webhook for machine-to-machine notifications
- chat delivery for human-visible handoffs
- cron for scheduled communication
- local files only for same-machine coordination
Step 3: define message contract
Specify:
- - event name
- sender instance
- intended receiver
- timestamp
- payload fields
- retry behavior
- idempotency key if duplicate delivery is possible
Prefer JSON for machine processing and short bullet summaries for human review.
Step 4: define trust boundary
Document:
- - which side is authoritative
- where credentials live
- which actions require approval
- what happens on failure or timeout
Never assume both OpenClaw instances share memory, sessions, or auth state.
Step 5: implement with reversible changes
Prefer:
- - isolated cron jobs
- explicit webhook URLs
- local config edits with backup
- test messages before production use
Step 6: verify end to end
Check:
- - source event fired
- delivery succeeded
- receiver handled duplicate-safe logic
- failure path is visible
- no secrets leaked in logs or chat
Output expectations
When using this skill, produce one of these deliverables:
- - bridge design memo
- message schema
- cron payload definition
- webhook contract
- rollout plan with rollback
- troubleshooting checklist
Guardrails
- - Use only documented OpenClaw commands and delivery modes.
- Do not claim native OpenClaw-to-OpenClaw federation unless the environment explicitly provides it.
- Ask before publishing endpoints, changing firewall rules, or exposing dashboards.
- Prefer fewer, larger writes over chatty loops when integrating with external services.
- Keep communication auditable and easy to reason about.
Quick examples
Example: daily remote server audit to local operator
Design:
- - remote OpenClaw runs a daily isolated cron job
- job performs audit
- delivery posts webhook to an operator-controlled endpoint or announces into a monitored channel
- local OpenClaw summarizes findings for the user
Example: deployment completion handoff
Design:
- - build instance finishes deploy pipeline
- sends webhook with environment, version, result, and log URL
- receiving side creates a human-facing summary and asks for next action if needed
OpenClaw 对等桥接
仅使用支持的基元设计两个 OpenClaw 实例之间的通信。
优先选择明确、可审计的流程:Webhook 投递、定时任务投递、频道路由或用户中介中继。
除非当前部署中存在,否则不要发明对等命令或声称支持原生跨实例会话共享。
核心模式
1. 通过 Webhook 推送事件
当一个 OpenClaw 实例需要立即通知另一个系统或服务时使用。
模式:
- 1. 源 OpenClaw 运行一个独立的定时任务或任务。
- 投递模式为 webhook。
- 目标端暴露一个 HTTP 端点,接受事件并决定下一步操作。
适用于:
2. 人工路由消息桥接
当两个实例之间唯一有保证的公共界面是聊天频道时使用。
模式:
- 1. 实例 A 向人工控制的频道发送结构化消息。
- 人工或下游自动化系统转发或触发实例 B。
- 保持负载简短、明确且幂等。
适用于:
- - 审批
- 升级路径
- 低频交接
- 无法建立直接网络信任的跨组织工作流
3. 定时中继
当精确时间比低延迟更重要时使用。
模式:
- 1. 源实例调度一个定时任务。
- 定时任务生成公告或 Webhook。
- 目标实例或接收系统处理定时事件。
适用于:
4. 本地到远程控制模式
当工作站 OpenClaw 需要与服务器端 OpenClaw 协调时使用。
推荐分工:
- - 本地实例处理人机交互、审批和仪表盘
- 远程实例处理长时间运行的任务、服务器检查和独立自动化
设计规则:
- - 将凭证保留在需要它们的实例本地
- 推送摘要而非原始机密
- 明确每个任务的所有权
- 优先使用追加日志和显式确认
工作流程
第一步:定义桥接目标
首先说明业务成果:
第二步:选择传输方式
选择最小足够的传输方式:
- - Webhook 用于机器到机器通知
- 聊天投递用于人工可见的交接
- 定时任务用于定时通信
- 仅限本地文件用于同机器协调
第三步:定义消息契约
明确说明:
- - 事件名称
- 发送方实例
- 预期接收方
- 时间戳
- 负载字段
- 重试行为
- 如果可能重复投递则需幂等键
机器处理优先使用 JSON,人工审查优先使用简短要点摘要。
第四步:定义信任边界
记录:
- - 哪一方是权威方
- 凭证存放位置
- 哪些操作需要审批
- 失败或超时时的处理方式
永远不要假设两个 OpenClaw 实例共享内存、会话或认证状态。
第五步:使用可逆变更实现
优先选择:
- - 独立的定时任务
- 明确的 Webhook URL
- 带备份的本地配置编辑
- 在生产使用前发送测试消息
第六步:端到端验证
检查:
- - 源事件已触发
- 投递成功
- 接收方处理了重复安全逻辑
- 失败路径可见
- 日志或聊天中未泄露机密
输出预期
使用此技能时,生成以下交付物之一:
- - 桥接设计备忘录
- 消息模式
- 定时任务负载定义
- Webhook 契约
- 含回滚的部署计划
- 故障排查清单
防护措施
- - 仅使用已记录的 OpenClaw 命令和投递模式。
- 除非环境明确提供,否则不要声称支持原生 OpenClaw 到 OpenClaw 联邦。
- 在发布端点、更改防火墙规则或暴露仪表盘前先询问。
- 与外部服务集成时,优先选择更少、更大的写入而非频繁循环。
- 保持通信可审计且易于理解。
快速示例
示例:远程服务器每日审计到本地操作员
设计:
- - 远程 OpenClaw 运行每日独立定时任务
- 任务执行审计
- 投递通过 Webhook 发送到操作员控制的端点,或在监控频道中公告
- 本地 OpenClaw 为用户汇总审计结果
示例:部署完成交接
设计:
- - 构建实例完成部署流水线
- 发送包含环境、版本、结果和日志 URL 的 Webhook
- 接收方创建面向人类的摘要,并在需要时询问下一步操作