Skip to main content
Pre-release

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

OVOS Messagebus Chat Plugin

An OVOS ChatEngine agent plugin that proxies user turns through a connected OpenVoiceOS messagebus. Each continue_chat call sends the latest user utterance to the OVOS pipeline and collects the synthesized response.

The plugin reuses the SessionManager-owned Session for each session_id, so multi-turn conversations preserve OVOS-side state (active skills, entity context, response-mode flags, language). Skills that rely on MycroftSkill.get_response(), common_query disambiguation, or context-managed intents keep working across turns.

Installation

pip install ovos-messagebus-chat-plugin

Usage

Via plugin discovery

The plugin registers under opm.agents.chat with name ovos-messagebus. Any OVOS component that loads chat-agent plugins (e.g. ovos-persona) will pick it up automatically:

from ovos_plugin_manager.agents import load_chat_agent_plugin

agent_cls = load_chat_agent_plugin("ovos-messagebus")
agent = agent_cls(config={"autoconnect": True, "host": "127.0.0.1", "port": 8181})

Direct programmatic use

from ovos_bus_client import MessageBusClient
from ovos_messagebus_chat_plugin import OVOSMessagebusChatAgent
from ovos_plugin_manager.templates.agents import AgentMessage, MessageRole

bus = MessageBusClient()
bus.run_in_thread()
bus.connected_event.wait()

agent = OVOSMessagebusChatAgent(bus=bus, config={"timeout": 15})

reply = agent.continue_chat(
    [AgentMessage(role=MessageRole.USER, content="what time is it?")],
    session_id="kitchen",
)
print(reply.content)

# next turn — same session_id reuses the Session, so OVOS skills that need
# follow-up context (get_response, common_query, dialog flow) keep working
reply = agent.continue_chat(
    [
        AgentMessage(role=MessageRole.USER, content="what time is it?"),
        AgentMessage(role=MessageRole.ASSISTANT, content=reply.content),
        AgentMessage(role=MessageRole.USER, content="and tomorrow morning?"),
    ],
    session_id="kitchen",
)

Configuration

Key Type Default Notes
autoconnect bool False Open an internal MessageBusClient on init.
host str 127.0.0.1 OVOS messagebus host (only used with autoconnect).
port int 8181 OVOS messagebus port (only used with autoconnect).
timeout int 30 Per-utterance wait, refreshed on every speak to allow multi-speak.
source_name str messagebus_chat_agent Value set on outgoing context.source. Useful for OVOS routing rules.

Documentation

Full developer docs live in docs/:

License

Apache 2.0. See LICENSE.md.

Credits

Developed by TigreGótico for OpenVoiceOS.

NGI0 Commons Fund

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

ovos_messagebus_chat_plugin-0.1.2a1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

ovos_messagebus_chat_plugin-0.1.2a1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file ovos_messagebus_chat_plugin-0.1.2a1.tar.gz.

File metadata

File hashes

Hashes for ovos_messagebus_chat_plugin-0.1.2a1.tar.gz
Algorithm Hash digest
SHA256 35e8679e875f559a0ae5bed3818dab59879d637c0d37717ff4333c868d315fd4
MD5 5b894fe86a542f6a5192bdca58eb3525
BLAKE2b-256 60c745fca3052f5fd81a492d5cb4ef66c025792013af27c3edc029f576cd2fb0

See more details on using hashes here.

File details

Details for the file ovos_messagebus_chat_plugin-0.1.2a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_messagebus_chat_plugin-0.1.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 54bf754a747c02dd552ef265d3ffeba7a315d62178dbd1a4bb973b72feb7038a
MD5 1dcd9843914f4245189fd23a12f03e5f
BLAKE2b-256 bc084b38e74b58ba3ec122dcc8ba3a81de90de3b5f09b3513911fb9239368b96

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