# kathirvel2321/lya2.0 architecture

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

- Interactive diagram: https://gitdiagram.com/kathirvel2321/lya2.0
- Repository: https://github.com/kathirvel2321/lya2.0

## Overview

LYA is an in-development personal assistant with a native Windows desktop and a paired phone client. Its documented desktop path starts in the desktop app and experience, then reaches the brain workflow; voice provides hearing and speech around that interaction. Separate capabilities cover mobile access, owner/security controls, and storage and authority. The README explicitly says several memory and recovery modules are development work, not a deployed shared-memory system. Relationships below are limited to README statements and shown imports or calls; unsampled implementation details are not inferred.

Main entry points: [`desktop/app.py`](https://github.com/kathirvel2321/lya2.0/blob/main/desktop/app.py) (Desktop app), [`main.py`](https://github.com/kathirvel2321/lya2.0/blob/main/main.py) (Runtime entrypoint), [`brain/memory_witness_service.py`](https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_witness_service.py) (Witness service), [`runner/main.py`](https://github.com/kathirvel2321/lya2.0/blob/main/runner/main.py) (Remote runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop assistant"]
  node_desktop_app["Desktop app<br/>[app.py]"]
  node_experience["Desktop experience<br/>[experience.py]"]
end

subgraph group_intelligence["Brain and memory"]
  node_workflow["Brain workflow<br/>[workflow.py]"]
  node_mind["Legacy brain<br/>[mind.py]"]
  node_memory_prototype[("Memory prototype")]
  node_memory_recovery["Memory recovery<br/>[memory_recovery.py]"]
  node_witness_service["Witness service"]
  node_notes["Memory notes<br/>[notes.py]"]
end

subgraph group_voice["Voice and vision"]
  node_voice["Voice runtime<br/>[voice.py]"]
  node_whisper["Local transcription<br/>[local_whisper.py]"]
  node_identity["Face identity<br/>[identity.py]"]
end

subgraph group_access["Access and security"]
  node_storage[("Storage<br/>[store.py]")]
  node_security_policy["Session policy<br/>[policy.py]"]
  node_biometrics["Owner biometrics"]
end

subgraph group_mobile["Mobile and remote"]
  node_bridge_server["Phone bridge<br/>[server.py]"]
  node_bridge_client["Bridge client<br/>[client.py]"]
  node_mobile_server["Mobile service<br/>[mobile.py]"]
  node_mobile_control["Mobile control<br/>[mobile_client.py]"]
  node_runner["Remote runner<br/>[main.py]"]
  node_runner_handlers["Runner handlers<br/>[commands.py]"]
end

node_owner(("Assistant user"))
node_remote_agent["Configured agent"]
node_main["Runtime entrypoint<br/>[main.py]"]

node_owner -->|"uses"| node_desktop_app
node_desktop_app -->|"launches"| node_experience
node_experience -->|"hands off"| node_workflow
node_desktop_app -->|"runs jobs"| node_workflow
node_desktop_app -->|"uses voice"| node_voice
node_desktop_app -->|"uses transcription"| node_whisper
node_owner -->|"uses phone"| node_mobile_server
node_mobile_control -->|"controls"| node_mobile_server
node_bridge_client -->|"posts commands"| node_bridge_server
node_bridge_server -.->|"verifies access"| node_security_policy
node_main -->|"uses legacy brain"| node_mind
node_main -->|"identifies user"| node_identity
node_main -->|"checks permission"| node_security_policy
node_main -->|"speaks replies"| node_voice
node_runner -->|"registers handlers"| node_runner_handlers
node_runner -->|"configures command"| node_remote_agent
node_witness_service -->|"uses witness"| node_memory_prototype
node_witness_service -->|"uses recovery"| node_memory_recovery

click node_desktop_app "https://github.com/kathirvel2321/lya2.0/blob/main/desktop/app.py"
click node_experience "https://github.com/kathirvel2321/lya2.0/blob/main/desktop/experience.py"
click node_workflow "https://github.com/kathirvel2321/lya2.0/blob/main/brain/workflow.py"
click node_mind "https://github.com/kathirvel2321/lya2.0/blob/main/brain/mind.py"
click node_memory_prototype "https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_prototype.py"
click node_memory_recovery "https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_recovery.py"
click node_witness_service "https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_witness_service.py"
click node_storage "https://github.com/kathirvel2321/lya2.0/blob/main/storage/store.py"
click node_notes "https://github.com/kathirvel2321/lya2.0/blob/main/brain/notes.py"
click node_voice "https://github.com/kathirvel2321/lya2.0/blob/main/audio/voice.py"
click node_whisper "https://github.com/kathirvel2321/lya2.0/blob/main/audio/local_whisper.py"
click node_identity "https://github.com/kathirvel2321/lya2.0/blob/main/vision/identity.py"
click node_security_policy "https://github.com/kathirvel2321/lya2.0/blob/main/security/policy.py"
click node_biometrics "https://github.com/kathirvel2321/lya2.0/blob/main/desktop/owner_biometrics.py"
click node_bridge_server "https://github.com/kathirvel2321/lya2.0/blob/main/bridge/server.py"
click node_bridge_client "https://github.com/kathirvel2321/lya2.0/blob/main/bridge/client.py"
click node_mobile_server "https://github.com/kathirvel2321/lya2.0/blob/main/cloud/mobile.py"
click node_mobile_control "https://github.com/kathirvel2321/lya2.0/blob/main/cloud/mobile_client.py"
click node_runner "https://github.com/kathirvel2321/lya2.0/blob/main/runner/main.py"
click node_runner_handlers "https://github.com/kathirvel2321/lya2.0/blob/main/runner/commands.py"
click node_main "https://github.com/kathirvel2321/lya2.0/blob/main/main.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_desktop_app,node_experience,node_owner toneBlue
class node_workflow,node_mind,node_memory_prototype,node_memory_recovery,node_witness_service,node_notes toneAmber
class node_voice,node_whisper,node_identity toneMint
class node_storage,node_security_policy,node_biometrics toneRose
class node_bridge_server,node_bridge_client,node_mobile_server,node_mobile_control,node_runner,node_runner_handlers,node_remote_agent toneIndigo
class node_main toneTeal
```

## Components

### Desktop assistant

- [Desktop app](https://github.com/kathirvel2321/lya2.0/blob/main/desktop/app.py): `desktop/app.py`
- [Desktop experience](https://github.com/kathirvel2321/lya2.0/blob/main/desktop/experience.py): `desktop/experience.py`

### Brain and memory

- [Brain workflow](https://github.com/kathirvel2321/lya2.0/blob/main/brain/workflow.py): `brain/workflow.py`
- [Legacy brain](https://github.com/kathirvel2321/lya2.0/blob/main/brain/mind.py): `brain/mind.py`
- [Memory prototype](https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_prototype.py): `brain/memory_prototype.py`
- [Memory recovery](https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_recovery.py): `brain/memory_recovery.py`
- [Witness service](https://github.com/kathirvel2321/lya2.0/blob/main/brain/memory_witness_service.py): `brain/memory_witness_service.py`
- [Memory notes](https://github.com/kathirvel2321/lya2.0/blob/main/brain/notes.py): `brain/notes.py`

### Voice and vision

- [Voice runtime](https://github.com/kathirvel2321/lya2.0/blob/main/audio/voice.py): `audio/voice.py`
- [Local transcription](https://github.com/kathirvel2321/lya2.0/blob/main/audio/local_whisper.py): `audio/local_whisper.py`
- [Face identity](https://github.com/kathirvel2321/lya2.0/blob/main/vision/identity.py): `vision/identity.py`

### Access and security

- [Storage](https://github.com/kathirvel2321/lya2.0/blob/main/storage/store.py): `storage/store.py`
- [Session policy](https://github.com/kathirvel2321/lya2.0/blob/main/security/policy.py): `security/policy.py`
- [Owner biometrics](https://github.com/kathirvel2321/lya2.0/blob/main/desktop/owner_biometrics.py): `desktop/owner_biometrics.py`

### Mobile and remote

- [Phone bridge](https://github.com/kathirvel2321/lya2.0/blob/main/bridge/server.py): `bridge/server.py`
- [Bridge client](https://github.com/kathirvel2321/lya2.0/blob/main/bridge/client.py): `bridge/client.py`
- [Mobile service](https://github.com/kathirvel2321/lya2.0/blob/main/cloud/mobile.py): `cloud/mobile.py`
- [Mobile control](https://github.com/kathirvel2321/lya2.0/blob/main/cloud/mobile_client.py): `cloud/mobile_client.py`
- [Remote runner](https://github.com/kathirvel2321/lya2.0/blob/main/runner/main.py): `runner/main.py`
- [Runner handlers](https://github.com/kathirvel2321/lya2.0/blob/main/runner/commands.py): `runner/commands.py`

### Other components

- **Assistant user**
- **Configured agent**
- [Runtime entrypoint](https://github.com/kathirvel2321/lya2.0/blob/main/main.py): `main.py`

## Connections

- Assistant user → Desktop app: uses (evidence: `README.md`)
- Desktop app → Desktop experience: launches (evidence: `README.md`)
- Desktop experience → Brain workflow: hands off (evidence: `README.md`)
- Desktop app → Brain workflow: runs jobs (evidence: `desktop/app.py`)
- Desktop app → Voice runtime: uses voice (evidence: `desktop/app.py`)
- Desktop app → Local transcription: uses transcription (evidence: `desktop/app.py`)
- Assistant user → Mobile service: uses phone (evidence: `README.md`)
- Mobile control → Mobile service: controls (evidence: `cloud/mobile_client.py`)
- Bridge client → Phone bridge: posts commands (evidence: `bridge/client.py`)
- Phone bridge → Session policy: verifies access
- Runtime entrypoint → Legacy brain: uses legacy brain (evidence: `main.py`)
- Runtime entrypoint → Face identity: identifies user (evidence: `main.py`)
- Runtime entrypoint → Session policy: checks permission (evidence: `main.py`)
- Runtime entrypoint → Voice runtime: speaks replies (evidence: `main.py`)
- Remote runner → Runner handlers: registers handlers (evidence: `runner/main.py`)
- Remote runner → Configured agent: configures command (evidence: `runner/main.py`)
- Witness service → Memory prototype: uses witness (evidence: `brain/memory_witness_service.py`)
- Witness service → Memory recovery: uses recovery (evidence: `brain/memory_witness_service.py`)
