Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

HiveMind OVOS Agent Plugin

OVOS agent protocol plugin for HiveMind-core.

Bridges HiveMind client messages to an OpenVoiceOS message bus. HiveMind clients connect to a hivemind-core listener, and this plugin forwards their Mycroft Message payloads to a local OVOS bus (and routes OVOS responses back to the originating client).

Installation

pip install hivemind-ovos-agent-plugin

Or from source:

git clone https://github.com/JarbasHiveMind/hivemind-ovos-agent-plugin
cd hivemind-ovos-agent-plugin
pip install -e .

Usage

The plugin registers itself as a HiveMind agent protocol via the hivemind.agent.protocol entry point group, with name hivemind-ovos-agent-plugin.

In your hivemind-core configuration (~/.config/hivemind-core/server.json):

{
  "agent_protocol": {
    "module": "hivemind-ovos-agent-plugin",
    "hivemind-ovos-agent-plugin": {
      "host": "127.0.0.1",
      "port": 8181
    }
  }
}

hivemind-core will discover the plugin via its entry point and instantiate the OVOSAgentProtocol class with the supplied config. The plugin connects to the OVOS message bus at the given host/port (defaulting to 127.0.0.1:8181).

This is also the default — if hivemind-core is running on the same host as OVOS, no config change is needed. hivemind-core ships with hivemind-ovos-agent-plugin pre-selected and falls back to the websocket section of the global OVOS mycroft.conf for the bus address.

Direct programmatic use

from hivemind_ovos_agent_plugin import OVOSAgentProtocol

agent = OVOSAgentProtocol(config={"host": "127.0.0.1", "port": 8181})
# pass `agent` to your HiveMindListenerProtocol

How it works

The plugin owns two callbacks on the OVOS bus:

  • hive.send.downstream — emitted by OVOS components that want to push a HiveMessage to a connected HiveMind client. The plugin wraps the payload in a HiveMessage and dispatches it to the right peer, or fans it out for PROPAGATE/BROADCAST types.
  • message (catch-all) — every internal OVOS bus message is inspected. If its context["destination"] lists a connected HiveMind peer, the plugin forwards it back to that peer wrapped as a HiveMessageType.BUS message. This is where client isolation is enforced: a client never sees responses meant for another client.

Upstream traffic (client → OVOS bus) is handled by hivemind-core itself; this plugin only handles the downstream half.

Policy plugin

This package also registers as a hivemind.policy provider under the name hivemind-ovos-agent-policy. hivemind-core runs the policy chain before forwarding any inbound client message; the built-in OVOSAgentPolicy reads per-client skill_blacklist and intent_blacklist from the credential store and injects them into message.context["session"] as AddBlacklistedSkill / AddBlacklistedIntent mutations.

Six concrete Mutation subclasses are available for custom policy plugins:

Class Purpose
AddBlacklistedSkill Append to session["blacklisted_skills"]
AddBlacklistedIntent Append to session["blacklisted_intents"]
SetSessionField Set any key in message.context["session"]
SetContextField Set a nested path in message.context
RewriteUtterance Replace utterance text in recognizer_loop:utterance messages

All types are importable from hivemind_ovos_agent_plugin directly. See docs/policy.md for full details.

Documentation

Full developer documentation lives in docs/:

License

Apache 2.0. See LICENSE.md.

Download files

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

Source Distribution

hivemind_ovos_agent_plugin-0.3.2a2.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

hivemind_ovos_agent_plugin-0.3.2a2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file hivemind_ovos_agent_plugin-0.3.2a2.tar.gz.

File metadata

File hashes

Hashes for hivemind_ovos_agent_plugin-0.3.2a2.tar.gz
Algorithm Hash digest
SHA256 313ef942bfd9b5b19b983e27e31cb72d8c41129992a1f5bf060d6c019d2e08c3
MD5 f761b71147ec24e4b878df6d42625af5
BLAKE2b-256 1897ed2ac22834bdcafb045356ecc502a03c1762cb5507a2a0041dfd297730f1

See more details on using hashes here.

File details

Details for the file hivemind_ovos_agent_plugin-0.3.2a2-py3-none-any.whl.

File metadata

File hashes

Hashes for hivemind_ovos_agent_plugin-0.3.2a2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d861a4f29d54359cba16d4557d4cae7cad77d9339a468cde525c69d7e0f1179
MD5 de5f547d7b5c76b7e9c00c54b0b28f58
BLAKE2b-256 d8842b2b4a7451760013fe56b102f4530d74c52a6e5e767616a92daababfdf4b

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 Sentry Error logging StatusPage Status page