Skip to main content

ClawHive platform adapter plugin for Hermes Agent

Project description

ClawHive Hermes Plugin

This plugin lets a Hermes runtime register as a ClawHive runtime node, sync Hermes profiles into ClawHive, receive ClawHive user messages through the Hermes platform adapter connection, and write Hermes replies back through the ClawHive message API. It is shaped for the Hermes directory plugin loader: plugin.yaml plus a root __init__.py that exposes register(ctx).

Install Locally

Copy this directory into a Hermes plugin path:

mkdir -p ~/.hermes/plugins/clawhive
cp -R hermes-plugin/* ~/.hermes/plugins/clawhive/

Install From a Local Wheel

The plugin is packaged as a Python distribution because Hermes plugins are Python modules. Build and install it locally before publishing to PyPI:

cd hermes-plugin
python -m build
python -m pip install dist/clawhive_hermes_plugin-0.1.0-py3-none-any.whl

Hermes can discover the package when the wheel is installed into the same Python environment that runs Hermes, through the hermes_agent.plugins entry point:

python - <<'PY'
import importlib.metadata as md
print(md.entry_points().select(group="hermes_agent.plugins")["clawhive"])
PY

For end-user installs where the package may be installed outside the Hermes virtual environment, use the packaged installer to create a normal Hermes directory plugin:

clawhive-hermes install
hermes plugins enable clawhive

Re-run with --force to replace an existing ~/.hermes/plugins/clawhive directory.

Authorize Locally

Enable the plugin in Hermes, then run the ClawHive authorization command:

hermes clawhive authorize \
  --project-url "https://<project>.supabase.co" \
  --anon-key "<anon key>"

This starts the same ClawHive device-code authorization flow used by the OpenClaw plugin: Hermes prints an approval URL and user code, the user approves with their ClawHive account, and the command stores the returned plugin token in the Hermes .env file. Restart the Hermes gateway after authorization so the platform adapter can call plugin-register and sync agents.

Status can be checked with:

hermes clawhive status

Required Runtime Environment

export CLAWHIVE_PROJECT_URL="https://<project>.supabase.co"
export CLAWHIVE_SUPABASE_ANON_KEY="<anon key>"
export CLAWHIVE_PLUGIN_TOKEN="<plugin token>"

Normally hermes clawhive authorize writes these values to $HERMES_HOME/.env; set them manually only for local testing or automation.

Optional values:

export CLAWHIVE_NODE_NAME="Hermes Desktop"
export CLAWHIVE_PLUGIN_VERSION="0.1.0"
export CLAWHIVE_USER_ID="<user uuid>"
export CLAWHIVE_PLUGIN_NODE_ID="<existing node uuid>"

Agent Registration

ClawHive follows the Hermes platform plugin flow. Hermes loads plugin.yaml, calls register(ctx), and creates ClawHivePlatformAdapter through ctx.register_platform(...). When the adapter connects, it registers the Hermes runtime node with ClawHive and syncs serviceable Hermes profiles as ClawHive agents.

Hermes profiles are discovered through Hermes profile APIs. With gateway profile multiplexing enabled, the adapter syncs all serviceable profiles. Without multiplexing, it syncs the active/default profile only.

Message Routing

ClawHivePlatformAdapter.send(chat_id, text) writes an agent message with:

chat_id = <session_id>:<agent_id>

If Hermes supplies session metadata separately, pass session_id and agent_id as keyword arguments instead of encoding them into chat_id.

Inbound messages are received by the platform adapter's connect() flow through the ClawHive Realtime bridge. The adapter converts user messages into Hermes MessageEvent values and dispatches them through self.handle_message(event).

poll_session(session_id) is a local debug/fallback helper. It is not the product message receive path.

Local Verification

From the repository root:

python3 -m pytest hermes-plugin/tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clawhive_hermes_plugin-0.1.0.tar.gz (32.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clawhive_hermes_plugin-0.1.0-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file clawhive_hermes_plugin-0.1.0.tar.gz.

File metadata

  • Download URL: clawhive_hermes_plugin-0.1.0.tar.gz
  • Upload date:
  • Size: 32.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for clawhive_hermes_plugin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3b76cef93ccc698ca1f1ede95184c0da391d9ad6188591ad737f1e96f3f54f0
MD5 83d780b65902c4ee852d40494a82566e
BLAKE2b-256 093067f157e3abbb7f89446c064851c82fa0edf07ea58a0e9cdbf5f9ac6f50c7

See more details on using hashes here.

File details

Details for the file clawhive_hermes_plugin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for clawhive_hermes_plugin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b604f443429f74622be67e1496e8169ec41fc3adb884c5d8f4af16270f0e976
MD5 9ad35088dd49e0dc740b96a60b7aec56
BLAKE2b-256 7fa093112daf982771f43249a9b45ba0b00d6f41a6ba9c3ec444f4c46e149a27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page