# richardpizem-ctrl/sirius-local-ai-beta architecture

> Architecture diagram of the GitHub repository richardpizem-ctrl/sirius-local-ai-beta, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/richardpizem-ctrl/sirius-local-ai-beta
- Repository: https://github.com/richardpizem-ctrl/sirius-local-ai-beta

## Overview

SIRIUS LOCAL AI is an offline-first Slovak/English desktop assistant. A user asks through the panel; Runtime 5 routes the request, reasons over the active local knowledge graph, and can offer an approved ENVOY web lookup when local knowledge is insufficient. A separate workflow handles system and file actions, while Professor synthesizes graph explanations during idle time. The repository also contains substantial autonomy, detection, and repair subsystems. The README documents the product-level links; source excerpts and the index confirm selected internal calls. Several documented subsystems are represented at their exact tree paths but were not inspected in source.

Main entry points: [`runtime5/runtime5.py`](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/runtime5.py) (Runtime 5), [`runtime5/reasoning_engine_5.py`](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/reasoning_engine_5.py) (Reasoning engine), [`AUTONOMY/autonomy.py`](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/AUTONOMY/autonomy.py) (Autonomy proposals), [`runtime5/health_monitor_5.py`](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/health_monitor_5.py) (Runtime health)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_panel["Desktop panel<br/>[panel_api.py]"]
  node_panel_ui["Panel UI<br/>[ui_controller.js]"]
  node_orchestrator["Application launcher"]
end

subgraph group_runtime["Reasoning runtime"]
  node_runtime5["Runtime 5<br/>[runtime5.py]"]
  node_reasoning["Reasoning engine"]
  node_kg_router["KG router<br/>[kg_router.py]"]
end

subgraph group_knowledge["Knowledge and enrichment"]
  node_kg_reasoner["KG reasoner<br/>[kg_reasoner.py]"]
  node_kg_query["KG query<br/>[kg_query.py]"]
  node_kg_store[("KG storage<br/>[kg_store.py]")]
  node_envoy["ENVOY lookup<br/>[envoy_manager.py]"]
  node_professor["Professor synthesis<br/>[professor_miner.py]"]
  node_kg_core[("Knowledge graph core<br/>[kg_core.py]")]
end

subgraph group_actions["Automation and actions"]
  node_workflow["Action workflow<br/>[workflow_engine.py]"]
  node_colnik["Action decisions<br/>[decision_engine.py]"]
  node_autonomy["Autonomy proposals<br/>[autonomy.py]"]
  node_proposal_builder["Proposal generation<br/>[proposer.py]"]
  node_detection["System detection<br/>[detection.py]"]
end

subgraph group_resilience["Health and repair"]
  node_runtime_health["Runtime health"]
  node_error_handler["Error handling<br/>[error_handler_5.py]"]
  node_self_repair["Self repair<br/>[repair_core.py]"]
end

node_user(("User"))

node_user -->|"asks"| node_panel_ui
node_panel_ui -.->|"sends requests"| node_panel
node_panel -->|"uses IPC"| node_orchestrator
node_orchestrator -->|"routes queries"| node_runtime5
node_runtime5 -.->|"processes requests"| node_reasoning
node_reasoning -->|"routes intent"| node_kg_router
node_reasoning -->|"requests inference"| node_kg_reasoner
node_kg_reasoner -->|"queries relations"| node_kg_query
node_runtime5 -->|"queries active graph"| node_kg_store
node_runtime5 -->|"offers approved lookup"| node_envoy
node_professor -->|"synthesizes graph facts"| node_kg_core
node_runtime5 -.->|"dispatches actions"| node_workflow
node_workflow -.->|"requests decisions"| node_colnik
node_autonomy -->|"builds proposals"| node_proposal_builder
node_autonomy -.->|"uses system analysis"| node_detection
node_autonomy -->|"sends action requests"| node_colnik
node_error_handler -->|"records errors"| node_runtime_health
node_reasoning -->|"wraps execution"| node_error_handler
node_runtime_health -->|"safely executes"| node_error_handler
node_runtime_health -.->|"repair hook"| node_self_repair

click node_panel "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/UI_PANEL/core/panel_api.py"
click node_panel_ui "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/UI_PANEL/ui/ui_controller.js"
click node_orchestrator "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/sirius_orchestrator.py"
click node_runtime5 "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/runtime5.py"
click node_reasoning "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/reasoning_engine_5.py"
click node_kg_router "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_router.py"
click node_kg_reasoner "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_reasoner.py"
click node_kg_query "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_query.py"
click node_kg_store "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_store.py"
click node_envoy "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/envoy/envoy_manager.py"
click node_professor "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/professor/professor_miner.py"
click node_workflow "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/workflow/workflow_engine.py"
click node_colnik "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/COLNIK/decision_engine.py"
click node_autonomy "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/AUTONOMY/autonomy.py"
click node_proposal_builder "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/AUTONOMY/proposer.py"
click node_detection "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/detection/detection.py"
click node_kg_core "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/kg/kg_core.py"
click node_runtime_health "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/health_monitor_5.py"
click node_error_handler "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/error_handler_5.py"
click node_self_repair "https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/src/self_repair/orchestration/repair_core.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_panel,node_panel_ui,node_orchestrator,node_user toneBlue
class node_runtime5,node_reasoning,node_kg_router toneAmber
class node_kg_reasoner,node_kg_query,node_kg_store,node_envoy,node_professor,node_kg_core toneMint
class node_workflow,node_colnik,node_autonomy,node_proposal_builder,node_detection toneRose
class node_runtime_health,node_error_handler,node_self_repair toneIndigo
```

## Components

### Desktop interface

- [Desktop panel](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/UI_PANEL/core/panel_api.py): `UI_PANEL/core/panel_api.py`
- [Panel UI](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/UI_PANEL/ui/ui_controller.js): `UI_PANEL/ui/ui_controller.js`
- [Application launcher](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/sirius_orchestrator.py): `sirius_orchestrator.py`

### Reasoning runtime

- [Runtime 5](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/runtime5.py): `runtime5/runtime5.py`
- [Reasoning engine](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/reasoning_engine_5.py): `runtime5/reasoning_engine_5.py`
- [KG router](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_router.py): `runtime5/kg_router.py`

### Knowledge and enrichment

- [KG reasoner](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_reasoner.py): `runtime5/kg_reasoner.py`
- [KG query](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_query.py): `runtime5/kg_query.py`
- [KG storage](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/kg_store.py): `runtime5/kg_store.py`
- [ENVOY lookup](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/envoy/envoy_manager.py): `envoy/envoy_manager.py`
- [Professor synthesis](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/professor/professor_miner.py): `professor/professor_miner.py`
- [Knowledge graph core](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/kg/kg_core.py): `kg/kg_core.py`

### Automation and actions

- [Action workflow](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/workflow/workflow_engine.py): `workflow/workflow_engine.py`
- [Action decisions](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/COLNIK/decision_engine.py): `COLNIK/decision_engine.py`
- [Autonomy proposals](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/AUTONOMY/autonomy.py): `AUTONOMY/autonomy.py`
- [Proposal generation](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/AUTONOMY/proposer.py): `AUTONOMY/proposer.py`
- [System detection](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/detection/detection.py): `detection/detection.py`

### Health and repair

- [Runtime health](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/health_monitor_5.py): `runtime5/health_monitor_5.py`
- [Error handling](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/runtime5/error_handler_5.py): `runtime5/error_handler_5.py`
- [Self repair](https://github.com/richardpizem-ctrl/sirius-local-ai-beta/blob/main/src/self_repair/orchestration/repair_core.py): `src/self_repair/orchestration/repair_core.py`

### Other components

- **User**

## Connections

- User → Panel UI: asks (evidence: `README.md`)
- Panel UI → Desktop panel: sends requests
- Desktop panel → Application launcher: uses IPC (evidence: `README.md`)
- Application launcher → Runtime 5: routes queries (evidence: `README.md`)
- Runtime 5 → Reasoning engine: processes requests
- Reasoning engine → KG router: routes intent (evidence: `runtime5/reasoning_engine_5.py`)
- Reasoning engine → KG reasoner: requests inference (evidence: `runtime5/reasoning_engine_5.py`)
- KG reasoner → KG query: queries relations (evidence: `runtime5/kg_reasoner.py`)
- Runtime 5 → KG storage: queries active graph (evidence: `README.md`)
- Runtime 5 → ENVOY lookup: offers approved lookup (evidence: `README.md`)
- Professor synthesis → Knowledge graph core: synthesizes graph facts (evidence: `README.md`)
- Runtime 5 → Action workflow: dispatches actions
- Action workflow → Action decisions: requests decisions
- Autonomy proposals → Proposal generation: builds proposals (evidence: `AUTONOMY/autonomy.py`)
- Autonomy proposals → System detection: uses system analysis
- Autonomy proposals → Action decisions: sends action requests (evidence: `AUTONOMY/autonomy.py`)
- Error handling → Runtime health: records errors (evidence: `runtime5/error_handler_5.py`)
- Reasoning engine → Error handling: wraps execution (evidence: `runtime5/reasoning_engine_5.py`)
- Runtime health → Error handling: safely executes (evidence: `runtime5/health_monitor_5.py`)
- Runtime health → Self repair: repair hook
