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.1-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

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

Managed-cloud installs use the built-in ClawHive Supabase URL and anon key. For local or self-hosted Supabase, override them before authorization:

export CLAWHIVE_SUPABASE_MODE="local"
export CLAWHIVE_PROJECT_URL="https://<project>.supabase.co"
export CLAWHIVE_SUPABASE_ANON_KEY="<anon key>"

Normally hermes clawhive authorize writes the resolved project URL, anon key, and plugin token 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.1"
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.1.tar.gz (34.9 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.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clawhive_hermes_plugin-0.1.1.tar.gz
  • Upload date:
  • Size: 34.9 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.1.tar.gz
Algorithm Hash digest
SHA256 80b3e96e60fae8b057bf3fd41165b66f430c24c02432862d390af2e0befb81bb
MD5 d08a9f0019cb28299225d3d38134420e
BLAKE2b-256 e91530d7fc59309cccb4e1efb5d69fcf7322f54d4bffc657ab1afbdcb405a074

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for clawhive_hermes_plugin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 490014cff7d31d06ca9584bdb0dff81e3a0a093e68ccde948391c3bd5d4d244d
MD5 efb3d34ffc56b277bc587f9851dc907e
BLAKE2b-256 aaf9bb8d867e6016a56a5a7da541bc156931679454336718c356a14564ab2ef9

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