This release is a pre-release and may not be stable for production use.
HiveMind OVOS Agent Plugin
This plugin connects HiveMind-core to an OpenVoiceOS message bus.
HiveMind clients connect to a hivemind-core node. This plugin forwards their Mycroft Message payloads to a local OVOS bus, and it routes OVOS responses back to the client that sent the original message.
Installation
pip install hivemind-ovos-agent-plugin
Or install it 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 through the hivemind.agent.protocol entry point group, under the name hivemind-ovos-agent-plugin.
Add it to 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 discovers the plugin through its entry point and creates the OVOSAgentProtocol class with the config you supply. The plugin then connects to the OVOS message bus at the given host and port. The default host and port are 127.0.0.1:8181.
This configuration is also the default. If hivemind-core runs on the same host as OVOS, you do not need to change the config. hivemind-core ships with hivemind-ovos-agent-plugin pre-selected. It 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: OVOS components emit this message to push aHiveMessageto a connected HiveMind client. The plugin wraps the payload in aHiveMessageand sends it to the right peer, or fans it out forPROPAGATEandBROADCASTtypes.message(catch-all): the plugin inspects every internal OVOS bus message. If itscontext["destination"]lists a connected HiveMind peer, the plugin forwards the message back to that peer, wrapped as aHiveMessageType.BUSmessage. This is where the plugin enforces client isolation: a client never sees responses meant for another client.
Upstream traffic (client to 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 it forwards any inbound client message. The built-in OVOSAgentPolicy reads the per-client skill_blacklist and intent_blacklist from the credential store, and it injects them into message.context["session"] as AddBlacklistedSkill and AddBlacklistedIntent mutations.
Five 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 |
You can import all these types directly from hivemind_ovos_agent_plugin. See docs/policy.md for full details.
Related projects
- HiveMind-core: the server this plugin connects to.
- OpenVoiceOS: the OVOS bus and skill ecosystem this plugin bridges to.
Documentation
Full developer documentation lives in docs/:
docs/architecture.md: how the plugin fits between HiveMind and OVOS.docs/configuration.md: every config option.docs/message_flow.md: the end-to-end message lifecycle.docs/development.md: running tests and releasing.docs/policy.md: the policy plugin and mutation classes.
License
Apache 2.0. See LICENSE.md.
Credits
Developed by TigreGótico for OpenVoiceOS.
This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hivemind_ovos_agent_plugin-0.3.8a1.tar.gz.
File metadata
- Download URL: hivemind_ovos_agent_plugin-0.3.8a1.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aab59f3a2ed40b348244f4f363506a1fd7fc9fc09444efb38fd15badcbc11729
|
|
| MD5 |
334cf93b9a02080ed0fa85bf68610336
|
|
| BLAKE2b-256 |
3cb08a2715f6e44232416d0b198b4a6c91083ee9c78041c476ef8b8203d6d92f
|
File details
Details for the file hivemind_ovos_agent_plugin-0.3.8a1-py3-none-any.whl.
File metadata
- Download URL: hivemind_ovos_agent_plugin-0.3.8a1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd18a1312650a0b066eeccdc63925bd4ac92370372f384697474027570faa6f
|
|
| MD5 |
d07f26d6471bc49e98b9e265fbefed89
|
|
| BLAKE2b-256 |
d9eee4abe3b66be133b82d3312a3e55f2309ea882486a1b9aa39e6892101c425
|