# kalliope-project/kalliope architecture

> Architecture diagram of the GitHub repository kalliope-project/kalliope, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kalliope-project/kalliope
- Repository: https://github.com/kalliope-project/kalliope

## Overview

Kalliope is a configurable personal-assistant framework: signals such as spoken orders, scheduled events, or MQTT messages activate synapses that run neuron actions. The main workflow loads settings and a YAML brain, listens for an input, matches it to synapses, and executes the resulting actions. The graph also preserves speech/trigger and speech-output plugins, REST access, lifecycle hooks, and community-resource management. Some plugin and API wiring is not shown in the excerpts; uncertain links are omitted rather than inferred.

Main entry points: [`kalliope/core/SynapseLauncher.py`](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/SynapseLauncher.py) (Synapse launcher), [`kalliope/__init__.py`](https://github.com/kalliope-project/kalliope/blob/master/kalliope/__init__.py) (CLI entrypoint), [`kalliope/signals/order/order.py`](https://github.com/kalliope-project/kalliope/blob/master/kalliope/signals/order/order.py) (Order signal), [`kalliope/core/ConfigurationManager/SettingLoader.py`](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/SettingLoader.py) (Settings loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_cli["CLI entrypoint<br/>[__init__.py]"]
  node_settings["Settings loader<br/>[SettingLoader.py]"]
  node_yaml["YAML loader<br/>[YAMLLoader.py]"]
  node_brain["Brain loader<br/>[BrainLoader.py]"]
end

subgraph group_inputs["Signals and Speech"]
  node_order_signal["Order signal<br/>[order.py]"]
  node_signal_plugins["Other signal plugins"]
  node_trigger_plugins["Trigger plugins"]
  node_order_listener["Order listener<br/>[OrderListener.py]"]
  node_speech_recognition["Speech recognition"]
end

subgraph group_execution["Synapse Execution"]
  node_matcher["Order analyser<br/>[OrderAnalyser.py]"]
  node_synapse_launcher["Synapse launcher<br/>[SynapseLauncher.py]"]
  node_lifo["Synapse execution buffer<br/>[LIFOBuffer.py]"]
  node_neuron_launcher["Neuron launcher<br/>[NeuronLauncher.py]"]
  node_hooks["Lifecycle hooks<br/>[HookManager.py]"]
end

subgraph group_outputs["Actions and Audio"]
  node_neuron_plugins["Neuron actions"]
  node_tts_module["Text-to-speech module<br/>[TTSModule.py]"]
  node_tts_plugins["Speech synthesis plugins"]
  node_player_module["Audio player module<br/>[PlayerModule.py]"]
  node_player_plugins["Audio player plugins"]
end

subgraph group_extensions["Interfaces and Extensions"]
  node_rest_api["REST API<br/>[FlaskAPI.py]"]
  node_resources["Community resources"]
end

node_user(("Assistant user"))

node_user -->|"starts assistant"| node_cli
node_cli -->|"loads settings"| node_settings
node_cli -->|"loads brain"| node_brain
node_settings -->|"parses settings"| node_yaml
node_brain -->|"reads settings"| node_settings
node_brain -->|"parses brain"| node_yaml
node_cli -->|"starts configured signals"| node_order_signal
node_cli -->|"starts API"| node_rest_api
node_order_signal -->|"uses trigger"| node_trigger_plugins
node_order_signal -->|"starts listening"| node_order_listener
node_order_signal -->|"routes order"| node_synapse_launcher
node_signal_plugins -.->|"activates synapses"| node_synapse_launcher
node_order_listener -.->|"uses recognizer"| node_speech_recognition
node_synapse_launcher -->|"matches order"| node_matcher
node_synapse_launcher -->|"queues synapses"| node_lifo
node_synapse_launcher -->|"runs lifecycle hooks"| node_hooks
node_lifo -->|"dispatches neurons"| node_neuron_launcher
node_neuron_plugins -.->|"configured as actions"| node_synapse_launcher
node_tts_module -->|"selects player"| node_player_module
node_player_module -.->|"loads audio"| node_player_plugins
node_tts_plugins -.->|"implements synthesis"| node_tts_module
node_resources -->|"reads settings"| node_settings
node_resources -->|"runs installer neuron"| node_neuron_launcher

click node_cli "https://github.com/kalliope-project/kalliope/blob/master/kalliope/__init__.py"
click node_settings "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/SettingLoader.py"
click node_yaml "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/YAMLLoader.py"
click node_brain "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/BrainLoader.py"
click node_order_signal "https://github.com/kalliope-project/kalliope/blob/master/kalliope/signals/order/order.py"
click node_signal_plugins "https://github.com/kalliope-project/kalliope/tree/master/kalliope/signals"
click node_trigger_plugins "https://github.com/kalliope-project/kalliope/tree/master/kalliope/trigger"
click node_order_listener "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/OrderListener.py"
click node_speech_recognition "https://github.com/kalliope-project/kalliope/blob/master/kalliope/stt/SpeechRecognizer.py"
click node_matcher "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/OrderAnalyser.py"
click node_synapse_launcher "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/SynapseLauncher.py"
click node_lifo "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/Lifo/LIFOBuffer.py"
click node_neuron_launcher "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/NeuronLauncher.py"
click node_neuron_plugins "https://github.com/kalliope-project/kalliope/tree/master/kalliope/neurons"
click node_tts_module "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/TTS/TTSModule.py"
click node_tts_plugins "https://github.com/kalliope-project/kalliope/tree/master/kalliope/tts"
click node_player_module "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/PlayerModule.py"
click node_player_plugins "https://github.com/kalliope-project/kalliope/tree/master/kalliope/players"
click node_hooks "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/HookManager.py"
click node_rest_api "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/RestAPI/FlaskAPI.py"
click node_resources "https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ResourcesManager.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_settings,node_yaml,node_brain,node_user toneBlue
class node_order_signal,node_signal_plugins,node_trigger_plugins,node_order_listener,node_speech_recognition toneAmber
class node_matcher,node_synapse_launcher,node_lifo,node_neuron_launcher,node_hooks toneMint
class node_neuron_plugins,node_tts_module,node_tts_plugins,node_player_module,node_player_plugins toneRose
class node_rest_api,node_resources toneIndigo
```

## Components

### Configuration

- [CLI entrypoint](https://github.com/kalliope-project/kalliope/blob/master/kalliope/__init__.py): `kalliope/__init__.py`
- [Settings loader](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/SettingLoader.py): `kalliope/core/ConfigurationManager/SettingLoader.py`
- [YAML loader](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/YAMLLoader.py): `kalliope/core/ConfigurationManager/YAMLLoader.py`
- [Brain loader](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ConfigurationManager/BrainLoader.py): `kalliope/core/ConfigurationManager/BrainLoader.py`

### Signals and Speech

- [Order signal](https://github.com/kalliope-project/kalliope/blob/master/kalliope/signals/order/order.py): `kalliope/signals/order/order.py`
- [Other signal plugins](https://github.com/kalliope-project/kalliope/tree/master/kalliope/signals): `kalliope/signals`
- [Trigger plugins](https://github.com/kalliope-project/kalliope/tree/master/kalliope/trigger): `kalliope/trigger`
- [Order listener](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/OrderListener.py): `kalliope/core/OrderListener.py`
- [Speech recognition](https://github.com/kalliope-project/kalliope/blob/master/kalliope/stt/SpeechRecognizer.py): `kalliope/stt/SpeechRecognizer.py`

### Synapse Execution

- [Order analyser](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/OrderAnalyser.py): `kalliope/core/OrderAnalyser.py`
- [Synapse launcher](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/SynapseLauncher.py): `kalliope/core/SynapseLauncher.py`
- [Synapse execution buffer](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/Lifo/LIFOBuffer.py): `kalliope/core/Lifo/LIFOBuffer.py`
- [Neuron launcher](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/NeuronLauncher.py): `kalliope/core/NeuronLauncher.py`
- [Lifecycle hooks](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/HookManager.py): `kalliope/core/HookManager.py`

### Actions and Audio

- [Neuron actions](https://github.com/kalliope-project/kalliope/tree/master/kalliope/neurons): `kalliope/neurons`
- [Text-to-speech module](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/TTS/TTSModule.py): `kalliope/core/TTS/TTSModule.py`
- [Speech synthesis plugins](https://github.com/kalliope-project/kalliope/tree/master/kalliope/tts): `kalliope/tts`
- [Audio player module](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/PlayerModule.py): `kalliope/core/PlayerModule.py`
- [Audio player plugins](https://github.com/kalliope-project/kalliope/tree/master/kalliope/players): `kalliope/players`

### Interfaces and Extensions

- [REST API](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/RestAPI/FlaskAPI.py): `kalliope/core/RestAPI/FlaskAPI.py`
- [Community resources](https://github.com/kalliope-project/kalliope/blob/master/kalliope/core/ResourcesManager.py): `kalliope/core/ResourcesManager.py`

### Other components

- **Assistant user**

## Connections

- Assistant user → CLI entrypoint: starts assistant
- CLI entrypoint → Settings loader: loads settings (evidence: `kalliope/__init__.py`)
- CLI entrypoint → Brain loader: loads brain (evidence: `kalliope/__init__.py`)
- Settings loader → YAML loader: parses settings (evidence: `kalliope/core/ConfigurationManager/SettingLoader.py`)
- Brain loader → Settings loader: reads settings (evidence: `kalliope/core/ConfigurationManager/BrainLoader.py`)
- Brain loader → YAML loader: parses brain (evidence: `kalliope/core/ConfigurationManager/BrainLoader.py`)
- CLI entrypoint → Order signal: starts configured signals (evidence: `kalliope/__init__.py`)
- CLI entrypoint → REST API: starts API (evidence: `kalliope/__init__.py`)
- Order signal → Trigger plugins: uses trigger (evidence: `kalliope/signals/order/order.py`)
- Order signal → Order listener: starts listening (evidence: `kalliope/signals/order/order.py`)
- Order signal → Synapse launcher: routes order (evidence: `kalliope/signals/order/order.py`)
- Other signal plugins → Synapse launcher: activates synapses (evidence: `kalliope/signals/mqtt_subscriber/MqttClient.py`)
- Order listener → Speech recognition: uses recognizer
- Synapse launcher → Order analyser: matches order (evidence: `kalliope/core/SynapseLauncher.py`)
- Synapse launcher → Synapse execution buffer: queues synapses (evidence: `kalliope/core/SynapseLauncher.py`)
- Synapse launcher → Lifecycle hooks: runs lifecycle hooks (evidence: `kalliope/core/SynapseLauncher.py`)
- Synapse execution buffer → Neuron launcher: dispatches neurons (evidence: `kalliope/core/Lifo/LIFOBuffer.py`)
- Neuron actions → Synapse launcher: configured as actions
- Text-to-speech module → Audio player module: selects player (evidence: `kalliope/core/TTS/TTSModule.py`)
- Audio player module → Audio player plugins: loads audio (evidence: `kalliope/players/pyalsaaudio/pyalsaaudio.py`)
- Speech synthesis plugins → Text-to-speech module: implements synthesis (evidence: `kalliope/tts/voicerss/voicerss.py`)
- Community resources → Settings loader: reads settings (evidence: `kalliope/core/ResourcesManager.py`)
- Community resources → Neuron launcher: runs installer neuron (evidence: `kalliope/core/ResourcesManager.py`)
