# lockslkls0-ui/tiffany-ai-os architecture

> Architecture diagram of the GitHub repository lockslkls0-ui/tiffany-ai-os, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lockslkls0-ui/tiffany-ai-os
- Repository: https://github.com/lockslkls0-ui/tiffany-ai-os

## Overview

Tiffany AI-OS is a local Linux voice and system assistant with a companion mobile interface. The principal voice workflow captures speech, filters and corrects recognized phrases, then dispatches commands to actions or the conversational core for a response. Other documented capabilities include mobile control, local Ollama models, memory, system/thermal monitoring, PDF and Web-IA tools, and desktop controls. Sampled code supports the voice, brain, and mobile routing edges; README statements support the unsampled capability branches, whose internal wiring is not established here.

Main entry points: [`ear_modules/03_moteur_ecoute.py`](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/ear_modules/03_moteur_ecoute.py) (Continuous listening), [`cerveau_ia.py`](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/cerveau_ia.py) (Hybrid response engine), [`mobile/moteur_mobile.py`](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/moteur_mobile.py) (Mobile command engine), [`ear_modules/02_filtre_alias.py`](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/ear_modules/02_filtre_alias.py) (Speech filter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_voice["Voice interaction"]
  node_ear["Continuous listening"]
  node_filter["Speech filter<br/>[02_filtre_alias.py]"]
  node_actions["Voice action router<br/>[tiffany_actions.sh]"]
  node_speech_models["Offline speech and voice"]
end

subgraph group_assistant["Assistant and memory"]
  node_core["Conversation core<br/>[tiffany_core.sh]"]
  node_brain["Hybrid response engine<br/>[cerveau_ia.py]"]
  node_memory[("Long-term memory<br/>[memory_agent.py]")]
  node_gardener["Memory gardener<br/>[memory_gardener.py]"]
end

subgraph group_mobile["Mobile companion"]
  node_mobile_server["Mobile HTTP server<br/>[serveur_mobile.py]"]
  node_mobile_engine["Mobile command engine<br/>[moteur_mobile.py]"]
  node_mobile_ui["Mobile interface<br/>[interface.html]"]
end

subgraph group_capabilities["System capabilities"]
  node_plugins["System controls"]
  node_terminal_actions["Terminal tools"]
  node_watchdog["Thermal watchdog"]
  node_pdf_web["PDF and Web-IA"]
end

node_user(("User"))
node_microphone(("Microphone"))
node_ollama["Ollama models"]
node_mobile_user(("Phone user"))

node_microphone -->|"streams audio"| node_ear
node_ear -->|"filters phrases"| node_filter
node_filter -->|"returns phrase"| node_ear
node_ear -->|"dispatches aliases"| node_actions
node_ear -->|"sends requests"| node_core
node_core -.->|"runs assistant"| node_brain
node_brain -->|"requests generation"| node_ollama
node_brain -->|"runs after reply"| node_gardener
node_gardener -.->|"updates facts"| node_memory
node_user -.->|"uses controls"| node_mobile_ui
node_mobile_ui -.->|"sends requests"| node_mobile_server
node_mobile_server -->|"executes commands"| node_mobile_engine
node_mobile_engine -->|"runs matched scripts"| node_plugins
node_mobile_engine -->|"runs matched scripts"| node_terminal_actions
node_user -.->|"receives monitoring"| node_watchdog
node_user -.->|"requests research"| node_pdf_web
node_user -.->|"invokes controls"| node_plugins
node_user -.->|"uses offline voice"| node_speech_models

click node_ear "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/ear_modules/03_moteur_ecoute.py"
click node_filter "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/ear_modules/02_filtre_alias.py"
click node_actions "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/tiffany_actions.sh"
click node_core "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/tiffany_core.sh"
click node_brain "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/cerveau_ia.py"
click node_memory "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/agents/memory_agent.py"
click node_gardener "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/memory_gardener.py"
click node_mobile_server "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/serveur_mobile.py"
click node_mobile_engine "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/moteur_mobile.py"
click node_mobile_ui "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/interface.html"
click node_plugins "https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/plugins"
click node_terminal_actions "https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/actions_terminal"
click node_watchdog "https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/thermal_watchdog.sh"
click node_pdf_web "https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/actions_terminal"
click node_speech_models "https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/voice"

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_ear,node_filter,node_actions,node_speech_models,node_user,node_mobile_user toneBlue
class node_core,node_brain,node_memory,node_gardener toneAmber
class node_mobile_server,node_mobile_engine,node_mobile_ui toneMint
class node_plugins,node_terminal_actions,node_watchdog,node_pdf_web toneRose
class node_microphone,node_ollama toneIndigo
```

## Components

### Voice interaction

- [Continuous listening](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/ear_modules/03_moteur_ecoute.py): `ear_modules/03_moteur_ecoute.py`
- [Speech filter](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/ear_modules/02_filtre_alias.py): `ear_modules/02_filtre_alias.py`
- [Voice action router](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/tiffany_actions.sh): `tiffany_actions.sh`
- [Offline speech and voice](https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/voice): `voice`

### Assistant and memory

- [Conversation core](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/tiffany_core.sh): `tiffany_core.sh`
- [Hybrid response engine](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/cerveau_ia.py): `cerveau_ia.py`
- [Long-term memory](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/agents/memory_agent.py): `agents/memory_agent.py`
- [Memory gardener](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/memory_gardener.py): `memory_gardener.py`

### Mobile companion

- [Mobile HTTP server](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/serveur_mobile.py): `mobile/serveur_mobile.py`
- [Mobile command engine](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/moteur_mobile.py): `mobile/moteur_mobile.py`
- [Mobile interface](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/mobile/interface.html): `mobile/interface.html`

### System capabilities

- [System controls](https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/plugins): `plugins`
- [Terminal tools](https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/actions_terminal): `actions_terminal`
- [Thermal watchdog](https://github.com/lockslkls0-ui/tiffany-ai-os/blob/main/thermal_watchdog.sh): `thermal_watchdog.sh`
- [PDF and Web-IA](https://github.com/lockslkls0-ui/tiffany-ai-os/tree/main/actions_terminal): `actions_terminal`

### Other components

- **User**
- **Microphone**
- **Ollama models**
- **Phone user**

## Connections

- Microphone → Continuous listening: streams audio (evidence: `ear_modules/03_moteur_ecoute.py`)
- Continuous listening → Speech filter: filters phrases (evidence: `ear_modules/03_moteur_ecoute.py`)
- Speech filter → Continuous listening: returns phrase (evidence: `ear_modules/03_moteur_ecoute.py`)
- Continuous listening → Voice action router: dispatches aliases (evidence: `ear_modules/03_moteur_ecoute.py`)
- Continuous listening → Conversation core: sends requests (evidence: `ear_modules/03_moteur_ecoute.py`)
- Conversation core → Hybrid response engine: runs assistant
- Hybrid response engine → Ollama models: requests generation (evidence: `cerveau_ia.py`)
- Hybrid response engine → Memory gardener: runs after reply (evidence: `cerveau_ia.py`)
- Memory gardener → Long-term memory: updates facts
- User → Mobile interface: uses controls (evidence: `README.md`)
- Mobile interface → Mobile HTTP server: sends requests (evidence: `README.md`)
- Mobile HTTP server → Mobile command engine: executes commands (evidence: `mobile/serveur_mobile.py`)
- Mobile command engine → System controls: runs matched scripts (evidence: `mobile/moteur_mobile.py`)
- Mobile command engine → Terminal tools: runs matched scripts (evidence: `mobile/moteur_mobile.py`)
- User → Thermal watchdog: receives monitoring (evidence: `README.md`)
- User → PDF and Web-IA: requests research (evidence: `README.md`)
- User → System controls: invokes controls (evidence: `README.md`)
- User → Offline speech and voice: uses offline voice (evidence: `README.md`)
