
OpenClaw Relay
FreeSeamlessly relay messages to OpenClaw sessions over SSH.
Free · Opens the source repo
What OpenClaw Relay does
OpenClaw Relay is a specialized tool designed for developers and system administrators who need to communicate with OpenClaw sessions efficiently. It provides a straightforward way to relay messages and posts either locally or over SSH, depending on the user's requirements. This flexibility allows for both quick interactions on the same machine and more complex workflows involving remote hosts.
The skill operates through a Python script that facilitates communication with OpenClaw channels. Users can choose between local and SSH transports, making it easy to adapt to different environments. Local transport is ideal for quick, direct interactions, while SSH transport allows for persistent connections to remote agents, enabling users to manage workflows that require asynchronous operations.
For setups like Peter's, where the OpenClaw agent (Molty) resides on a specific machine, the skill simplifies the process of sending messages and receiving replies. Users can quickly check the health of their connection, list known target aliases, and send messages with minimal overhead. The script also supports various commands to manage message delivery, including options for private queries, guaranteed posts, and fire-and-forget async operations.
OpenClaw Relay is particularly useful in environments where multiple agents are in play, and communication needs to be streamlined. By allowing users to define target aliases and manage sessions effectively, it enhances productivity and reduces the friction involved in inter-agent communication.
When to use it
Use OpenClaw Relay when you need to send messages to OpenClaw channels, either locally or via SSH, particularly in setups with multiple agents.
When not to use it
This skill may not be suitable for users who do not work with OpenClaw or those who require a more graphical interface for communication.
What you can build with it
Quick Local Relay
Use OpenClaw Relay to send a quick message to an OpenClaw session on your local machine.
Remote Agent Communication
Relay messages to a remote OpenClaw agent over SSH, maintaining a persistent session for ongoing communication.
Asynchronous Task Management
Queue tasks and manage responses from agents asynchronously, allowing for efficient workflow management.
How to install OpenClaw Relay
View source1. Install with the skills CLI
npx skills add steipete/agent-scripts/openclaw-relay --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by steipeteOpenClaw Relay
Use this when the job is:
- "talk to Molty"
- "relay this into an OpenClaw channel session"
- "use acpx"
- "send this through the gateway via acp"
- "work through a remote OpenClaw bridge over SSH"
One skill. Two transports:
localssh
Default to local for direct telephone-game work from the current OpenClaw checkout. Use ssh when the target agent/session lives on another machine.
For Peter's setup, Molty normally lives on the Mac Studio gateway, reached as steipete@steipete-macstudio.local; avoid the mac-studio SSH alias for one-shot relay work because that alias auto-attaches tmux.
Script path: scripts/openclaw_relay.py
Target aliases file: config/session_aliases.json
Mode Selection
Choose local when:
- the user explicitly says
acpx - the target session is on the current machine
- the goal is quick relay or private ask
Choose ssh when:
- the target agent/session lives on another host
- you want a persistent bridge session
- you need async queue/wait/show flows on a remote machine
Defaults
The script avoids baked-in personal paths. Override with env or flags when needed.
- transport:
local - local repo cwd: current working directory
- local acpx repo:
<cwd>/extensions/acpx - ssh host:
steipete@steipete-macstudio.local - remote repo cwd:
<remote-home>/clawdbot - remote acpx repo:
<remote-home>/Projects/oss/acpx - gateway token file:
<home>/.openclaw/gateway.token - control session name:
codex-bridge - target aliases file:
config/session_aliases.json
Useful env vars:
OPENCLAW_RELAY_TRANSPORTOPENCLAW_RELAY_HOSTOPENCLAW_RELAY_CWDOPENCLAW_RELAY_ACPX_REPOOPENCLAW_RELAY_GATEWAY_URLOPENCLAW_RELAY_GATEWAY_TOKEN_FILEOPENCLAW_RELAY_SESSIONOPENCLAW_RELAY_TARGETS_FILE
Quick Start
Health check:
python3 scripts/openclaw_relay.py doctor
List known target aliases:
python3 scripts/openclaw_relay.py targets
Resolve a target alias:
python3 scripts/openclaw_relay.py resolve --target maintainers
Ask a target session a question privately:
python3 scripts/openclaw_relay.py ask \
--target maintainers \
--message "Summarize the current vibe in this channel."
Force-send text to the resolved target:
python3 scripts/openclaw_relay.py force-send \
--target maintainers \
--text "Deploy is done."
For multiline posts, use --text-file <path> or --text-file - instead of
shell-quoting the message.
Force-send media when the user explicitly wants a channel post:
python3 scripts/openclaw_relay.py force-send \
--transport ssh \
--host steipete@steipete-macstudio.local \
--target maintainers \
--text "Demo video." \
--media /tmp/demo.mp4
Use the persistent control session:
python3 scripts/openclaw_relay.py ensure
python3 scripts/openclaw_relay.py send --message "Reply with exactly OK."
python3 scripts/openclaw_relay.py show
Remote host example:
python3 scripts/openclaw_relay.py doctor --transport ssh --host steipete@steipete-macstudio.local
python3 scripts/openclaw_relay.py send \
--transport ssh \
--host steipete@steipete-macstudio.local \
--message "Reply with exactly OK."
Async Workflow
Queue work and poll the same control session:
python3 scripts/openclaw_relay.py start --message "Work on X and reply when done."
python3 scripts/openclaw_relay.py wait --after-seq <last-seq>
python3 scripts/openclaw_relay.py show
Target Aliases
config/session_aliases.json ships with placeholders. Replace them with real values for your setup.
Example shape:
{
"main": "agent:<agentId>:main",
"maintainers": "agent:<agentId>:discord:channel:<channelId>"
}
Session Rules
Use these rules when choosing a command:
- Want a private reply from a specific session:
ask - Want the target session to decide whether to post:
publish - Want a guaranteed direct post:
force-send - Want blocking continuity with the control brain:
send - Want fire-and-forget async:
start, thenwaitandshow - Want to stop queued work:
cancel
Failure Handling
If relay work fails:
- Run
doctor. - Run
status. - Run
show. - If the control session is wedged, run
cancel, thenensure, then retry.
If route discovery is uncertain:
- Resolve the target first.
- Prefer alias or exact session key.
- Use a tiny probe ask before sending the real payload.
Output Relay
Return the actual assistant text or delivery result, not shell noise.
For relay tasks, report:
- transport used
- target session key
- whether the route probe/resolve succeeded
- final posted or returned result
Frequently asked questions about OpenClaw Relay
Similar skills
Audio Editor
Automate your audio cleaning and editing process.
Watchers
Monitor feeds and APIs for new updates efficiently.
Moderator Actions
A comprehensive toolkit for moderating Civitai content.
Fleet Maintenance
Manage and audit Mac fleets efficiently.
AdGuard Home CLI
Manage AdGuard Home from the command line.
DoorDash Order Playbooks
Manage and automate your DoorDash orders with ease.
