OVOS ChatEngine agent plugin that proxies turns through a connected OVOS messagebus
Project description
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/:
docs/architecture.md— where the plugin fits in the OVOS agent ecosystem and the SessionManager interplay.docs/configuration.md— every config key with behaviour notes.docs/message_flow.md— end-to-end turn lifecycle, including the cross-turn Session reuse story.docs/development.md— local tests, releases.
License
Apache 2.0. See LICENSE.md.
Project details
Release history Release notifications | RSS feed
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 ovos_messagebus_chat_plugin-0.1.1a1.tar.gz.
File metadata
- Download URL: ovos_messagebus_chat_plugin-0.1.1a1.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
050e73a00e5ba3098e3dac6e0d0bc33727d59257b00a4db65cb90fa7f20a4a9a
|
|
| MD5 |
00c1aebeb696e791ba688d81c408d378
|
|
| BLAKE2b-256 |
7e92033025eaab27eaeb3231c7601a9c87aa3b2292273635351716458a00689a
|
File details
Details for the file ovos_messagebus_chat_plugin-0.1.1a1-py3-none-any.whl.
File metadata
- Download URL: ovos_messagebus_chat_plugin-0.1.1a1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd375370823fe1df91fd3820646c9baed5e3290de80273f2352568984d26fb3a
|
|
| MD5 |
34c4018ca2a208da0ebe00f7dfa13517
|
|
| BLAKE2b-256 |
28d432f448a1433e44d0ea3b54d34c182ed44c07d6608afd8666d3abbcb8a3d2
|