agentleFS
Codename-11Codename-11/hermes-relay/relay_server/SKILL.md

relay-server

Skill432 starsChanged 4 months agoMITView on GitHub

Setup and run the Hermes-Relay server for Android chat support, terminal, bridge, and related relay features.

  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run this from the hermes-android/ repo root, or wherever relay_server/ is located.

    line 27
  2. Distinctive:

    All settings via environment variables:

    line 70
  3. Very specific:

    TLS errors: Use --no-ssl for local dev.

    line 113
  4. Very specific:

    Can't reach from phone: Ensure port 8767 is open in firewall.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hermes-Relay Server

Setup and run the Hermes-Relay Server for the Hermes-Relay Android app.

What It Is

A lightweight Python WSS server that bridges the Hermes-Relay Android app to server-side features that need persistent bidirectional communication: terminal (remote shell via tmux) and bridge (agent-driven phone control). Chat does not use the relay — it rides the standard upstream Hermes surfaces (the dashboard /api/ws gateway, with API-server SSE as fallback).

When You Need It

  • Chat only? You do NOT need the relay server. The app uses the standard upstream Hermes surfaces — the dashboard gateway (:9119) preferred, the API server (:8642) as fallback.
  • Terminal or Bridge? You need the relay server running on the same machine as hermes-agent.

Quick Setup

One-liner (pip)

pip install aiohttp pyyaml && python -m relay_server --no-ssl

Run this from the hermes-android/ repo root, or wherever relay_server/ is located.

As a Hermes plugin + relay

# 1. Install and enable the native Hermes plugin
hermes plugins install Codename-11/hermes-relay/plugin --enable

# 2. Install relay dependencies
pip install -r relay_server/requirements.txt

# 3. Start the relay server
python -m relay_server --no-ssl --log-level INFO

Docker

docker run -d --name hermes-relay \
  --network host \
  -v ~/.hermes:/home/relay/.hermes:ro \
  ghcr.io/codename-11/hermes-relay:latest

Or build locally:

docker build -t hermes-relay relay_server/
docker run -d --name hermes-relay --network host -v ~/.hermes:/home/relay/.hermes:ro hermes-relay

Systemd service (persistent)

sudo cp relay_server/hermes-relay.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now hermes-relay

Edit the service file first to set User= and WorkingDirectory= to match your setup.

Configuration

All settings via environment variables:

VariableDefaultDescription
RELAY_HOST0.0.0.0Bind address
RELAY_PORT8767Listen port
RELAY_SSL_CERT(none)Path to TLS certificate
RELAY_SSL_KEY(none)Path to TLS private key
RELAY_WEBAPI_URLhttp://localhost:8642Hermes API Server URL
RELAY_HERMES_CONFIG~/.hermes/config.yamlPath to hermes config (for profile loading)
RELAY_LOG_LEVELINFOLogging level

CLI Options

python -m relay_server [OPTIONS]

  --port PORT        Override listen port (default: 8767)
  --no-ssl           Disable TLS (dev only — use for localhost)
  --log-level LEVEL  Set logging level (DEBUG, INFO, WARNING, ERROR)
  --config PATH      Path to hermes config.yaml

Architecture

Phone (HTTP/SSE) --> Hermes API Server (:8642)   [chat — direct, no relay]
Phone (WSS)      --> Relay Server (:8767)         [terminal, bridge]

The relay authenticates phones via a 6-character pairing code, then issues a 30-day session token. All communication uses typed envelope messages multiplexed over a single WebSocket connection.

Verify It Works

curl http://localhost:8767/health
# {"status": "ok", "version": "0.4.0", "channels": ["chat", "terminal", "bridge"]}

Troubleshooting

  • Connection refused: Is the relay running? Check systemctl status hermes-relay or docker logs hermes-relay
  • Auth failures: Pairing codes expire after 10 minutes. Generate a new one.
  • TLS errors: Use --no-ssl for local dev. For production, set RELAY_SSL_CERT and RELAY_SSL_KEY.
  • Can't reach from phone: Ensure port 8767 is open in firewall. Use ss -tlnp | grep 8767 to verify listening.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.