|
| 1 | +--- |
| 2 | +title: "AI Agents in OpenVoiceOS: Intelligent Conversations, Modular Architecture, and Custom Personas" |
| 3 | +excerpt: "Explore how OpenVoiceOS uses a modular AI agent system—featuring solvers, personas, and transformers—for flexible, private, and smart voice-first experiences." |
| 4 | +coverImage: "https://haieng.com/wp-content/uploads/2017/10/test-image-500x500.jpg" |
| 5 | +date: "2025-04-19T00:00:00.000Z" |
| 6 | +author: |
| 7 | + name: Peter Steenbergen |
| 8 | + picture: "https://avatars.githubusercontent.com/u/641281" |
| 9 | +ogImage: |
| 10 | + url: "/assets/blog/common/cover.png" |
| 11 | +--- |
| 12 | + |
| 13 | +OpenVoiceOS (OVOS) introduces a flexible and modular system for integrating AI agents into voice-first environments. This is made possible through a layered architecture built around solvers, personas, and persona routing components. This section explains how these parts work together to enable intelligent conversations with customizable behavior. |
| 14 | + |
| 15 | +## 🧠 Solver Plugins (Low-Level AI) |
| 16 | + |
| 17 | +At the core of the AI agent system are solver plugins. These are simple black-box components responsible for handling a single task: receiving a text input (typically a question) and returning a text output (typically an answer). |
| 18 | + |
| 19 | +**Key Features:** |
| 20 | + |
| 21 | +- **Input/Output:** Plain text in, plain text out. |
| 22 | +- **Functionality:** Usually question-answering, though more specialized solvers exist (e.g., summarization, multiple choice). |
| 23 | +- **Language Adaptation:** Solvers are automatically wrapped with a translation layer if they don't support the user's language. |
| 24 | +- **Fallback Behavior:** If a solver returns `None`, higher-level systems will attempt fallback options. |
| 25 | + |
| 26 | +## 👤 Personas (Agent Definition Layer) |
| 27 | + |
| 28 | +A persona represents a higher-level abstraction over solver plugins. It behaves like an AI agent with a defined personality and behavior, built by combining one or more solvers in a specific order. |
| 29 | + |
| 30 | +**Key Features:** |
| 31 | + |
| 32 | +- **Composition:** Each persona consists of a name, a list of solver plugins, and optional configuration. |
| 33 | +- **Chained Execution:** Solvers are tried one-by-one until a response is generated. |
| 34 | +- **Customizable Behavior:** Different personas can emulate different personalities or knowledge domains. |
| 35 | + |
| 36 | +> Personas don't need to use LLMs—no beefy GPU required. Any solver plugin can define a persona. |
| 37 | +
|
| 38 | +```json |
| 39 | +{ |
| 40 | + "name": "OldSchoolBot", |
| 41 | + "solvers": [ |
| 42 | + "ovos-solver-wikipedia-plugin", |
| 43 | + "ovos-solver-ddg-plugin", |
| 44 | + "ovos-solver-plugin-wolfram-alpha", |
| 45 | + "ovos-solver-wordnet-plugin", |
| 46 | + "ovos-solver-rivescript-plugin", |
| 47 | + "ovos-solver-failure-plugin" |
| 48 | + ], |
| 49 | + "ovos-solver-plugin-wolfram-alpha": { |
| 50 | + "appid": "Y7353-XXX" |
| 51 | + } |
| 52 | +} |
| 53 | +``` |
| 54 | + |
| 55 | +## 🦙 Persona Server (LLM-Compatible Endpoint) |
| 56 | + |
| 57 | +The `persona-server` exposes any defined persona as an OpenAI- or Ollama-compatible API, making personas drop-in replacements for LLMs. |
| 58 | + |
| 59 | +**Use Cases:** |
| 60 | + |
| 61 | +* Integrate OVOS personas with OpenAI/Ollama-compatible tools. |
| 62 | +* Plug into OpenWebUI for a chat interface. |
| 63 | +* Use with HomeAssistant for smart home interactions. |
| 64 | + |
| 65 | +**Usage:** |
| 66 | + |
| 67 | +```bash |
| 68 | +$ ovos-persona-server --persona my_persona.json |
| 69 | +``` |
| 70 | + |
| 71 | +## 🔁 Persona Pipeline (Runtime Routing in OVOS-Core) |
| 72 | + |
| 73 | +Inside OVOS-Core, the `persona-pipeline` plugin handles interaction logic for AI agents. |
| 74 | + |
| 75 | +**Key Features:** |
| 76 | + |
| 77 | +* **Persona Registry:** Multiple personas defined or discovered. |
| 78 | +* **Session Control:** "I want to talk with {persona\_name}" to switch. |
| 79 | +* **Session End:** Stop persona use anytime. |
| 80 | +* **Fallback Handling:** Use a default persona on failure. |
| 81 | +* **Extensible:** Future system-level enhancements via messagebus. |
| 82 | + |
| 83 | +```json |
| 84 | +{ |
| 85 | + "intents": { |
| 86 | + "persona": { |
| 87 | + "handle_fallback": true, |
| 88 | + "default_persona": "Remote Llama" |
| 89 | + }, |
| 90 | + "pipeline": [ |
| 91 | + "stop_high", |
| 92 | + "converse", |
| 93 | + "ocp_high", |
| 94 | + "padatious_high", |
| 95 | + "adapt_high", |
| 96 | + "ovos-persona-pipeline-plugin-high", |
| 97 | + "ocp_medium", |
| 98 | + "...", |
| 99 | + "fallback_medium", |
| 100 | + "ovos-persona-pipeline-plugin-low", |
| 101 | + "fallback_low" |
| 102 | + ] |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | + |
| 107 | +## 🤝 Collaborative Agents via MoS (Mixture of Solvers) |
| 108 | + |
| 109 | +One of OVOS’s most advanced features is its ability to use **MoS** strategies to combine multiple solvers for smarter answers. |
| 110 | + |
| 111 | +**Flexible Plugin Design:** MoS strategies are just solver plugins and can be composed or nested. |
| 112 | + |
| 113 | +**How It Works:** |
| 114 | + |
| 115 | +* Delegates a query to several solvers. |
| 116 | +* Uses strategies like voting, reranking, or generation to determine the final response. |
| 117 | + |
| 118 | +**Examples:** |
| 119 | + |
| 120 | +* **The King:** Central reranker selects the best answer. |
| 121 | +* **Democracy:** Solvers vote for the most agreed response. |
| 122 | +* **Duopoly:** Two LLMs discuss answers, then a president chooses. |
| 123 | + |
| 124 | +> 🌀 MoS strategies can be recursive for deep collaboration trees. |
| 125 | +
|
| 126 | +## 🔌 Bonus: OVOS as a Solver Plugin |
| 127 | + |
| 128 | +You can expose `ovos-core` itself as a solver plugin to allow OVOS to act as an agent in other local apps. |
| 129 | + |
| 130 | +**Use Cases:** |
| 131 | + |
| 132 | +* Chain OVOS instances via Docker. |
| 133 | +* Use skills in a collaborative AI/MoS setup. |
| 134 | +* Do **not** use `ovos-bus-solver-plugin` inside a local persona (infinite loop risk!). |
| 135 | + |
| 136 | +```json |
| 137 | +{ |
| 138 | + "name": "Open Voice OS", |
| 139 | + "solvers": [ |
| 140 | + "ovos-solver-bus-plugin", |
| 141 | + "ovos-solver-failure-plugin" |
| 142 | + ], |
| 143 | + "ovos-solver-bus-plugin": { |
| 144 | + "autoconnect": true, |
| 145 | + "host": "127.0.0.1", |
| 146 | + "port": 8181 |
| 147 | + } |
| 148 | +} |
| 149 | +``` |
| 150 | + |
| 151 | +## 🔧 Transformer Plugins (Runtime Modifiers) |
| 152 | + |
| 153 | +Transformers operate independently from personas but can complement them. They modify OVOS’s internal pipeline. |
| 154 | + |
| 155 | +**Scope:** Transformers work in OVOS Core, not within personas (unless called internally). |
| 156 | + |
| 157 | +**Integration Points:** |
| 158 | + |
| 159 | +* **Utterance Transformers:** Between STT and NLP. |
| 160 | +* **Dialog Transformers:** Between NLP and TTS. |
| 161 | + |
| 162 | +### ✅ OVOS Transcription Validator |
| 163 | + |
| 164 | +Validates STT output using LLMs before passing to NLP. |
| 165 | + |
| 166 | +```json |
| 167 | +"utterance_transformers": { |
| 168 | + "ovos-transcription-validator-plugin": { |
| 169 | + "model": "gemma3:1b", |
| 170 | + "ollama_url": "http://192.168.1.200:11434", |
| 171 | + "prompt_template": "/path/to/template.txt", |
| 172 | + "error_sound": true, |
| 173 | + "mode": "reprompt" |
| 174 | + } |
| 175 | +} |
| 176 | +``` |
| 177 | + |
| 178 | +> Prevents triggering skills from garbage STT like: “Potato stop green light now yes.” |
| 179 | +
|
| 180 | +### 🗣️ Dialog Transformer |
| 181 | + |
| 182 | +Rewrites final responses using prompts. |
| 183 | + |
| 184 | +**Prompt Use Cases:** |
| 185 | + |
| 186 | +* "Explain it to a 5-year-old" |
| 187 | +* "Sound like an angry old man" |
| 188 | +* "Add more 'dude'ness" |
| 189 | + |
| 190 | +```json |
| 191 | +"dialog_transformers": { |
| 192 | + "ovos-dialog-transformer-openai-plugin": { |
| 193 | + "rewrite_prompt": "rewrite the text as if you were explaining it to a 5-year-old" |
| 194 | + } |
| 195 | +} |
| 196 | +``` |
| 197 | + |
| 198 | +## 🧩 Summary Table |
| 199 | + |
| 200 | +| Component | Role | |
| 201 | +| --------------------------- | ------------------------------------------------------------- | |
| 202 | +| **Solver Plugin** | Stateless text-to-text inference (e.g., Q\&A, summarization). | |
| 203 | +| **Persona** | Named agent composed of ordered solver plugins. | |
| 204 | +| **Persona Pipeline** | Handles persona activation/routing in OVOS core. | |
| 205 | +| **Transformer Plugins** | Modify utterances or responses in the pipeline. | |
| 206 | +| **Dialog Transformer** | Rewrites assistant replies based on tone/intent. | |
| 207 | +| **Transcription Validator** | Filters invalid transcriptions before skills/NLP. | |
| 208 | + |
| 209 | +--- |
| 210 | + |
| 211 | +By decoupling solvers, personas, and management layers, OpenVoiceOS empowers developers and users with highly customizable AI experiences—adaptable to voice or text across any platform. |
0 commit comments