# harooshia/kimikonea architecture

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

- Interactive diagram: https://gitdiagram.com/harooshia/kimikonea
- Repository: https://github.com/harooshia/kimikonea
- Video tour (about a minute): https://gitdiagram.com/harooshia/kimikonea/video

## Overview

Kimiko is a local AI desktop companion. The main workflow is user input in the character UI, conversation handling by the core, and a response from the local model displayed in the UI. The core also manages modes, commands, memory, and reminders; Minecraft events can be collected by a local server and supplied as context. The README documents these capabilities, while sampled excerpts show only selected call paths, so unsampled internal links are omitted.

Main entry points: [`Kimiko_Core.py`](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py) (Conversation Core), [`KimikoDesktop.py`](https://github.com/harooshia/kimikonea/blob/main/KimikoDesktop.py) (Character UI), [`Minecraft_Connect.py`](https://github.com/harooshia/kimikonea/blob/main/Minecraft_Connect.py) (Minecraft Event Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop Companion"]
  node_ui["Character UI<br/>[KimikoDesktop.py]"]
end

subgraph group_conversation["Conversation Core"]
  node_core["Conversation Core<br/>[Kimiko_Core.py]"]
  node_modes["Conversation Modes<br/>[Kimiko_Core.py]"]
  node_commands["Commands<br/>[Kimiko_Core.py]"]
  node_memory[("Conversation Memory<br/>[Kimiko_Core.py]")]
  node_reminders["Reminders<br/>[Kimiko_Core.py]"]
  node_memoryfile[("Local Memory File<br/>[Kimiko_Core.py]")]
end

subgraph group_minecraft["Minecraft Integration"]
  node_eventserver["Minecraft Event Server"]
  node_eventbuffer["Recent Event Buffer"]
end

subgraph group_model["Local Model Runtime"]
  node_runtime["Runtime Manager<br/>[Kimiko_Core.py]"]
  node_api["Local Model API"]
  node_llmster["llmster / lms"]
  node_modelservice["Local Language Model"]
end

node_user(("Desktop User"))
node_minecraft(("Minecraft Game"))
node_cheatutils["CheatUtils Script"]

node_user -->|"enters input"| node_ui
node_ui -->|"submits input"| node_core
node_ui -->|"handles commands"| node_core
node_ui -->|"sets mode"| node_core
node_core -->|"selects mode"| node_modes
node_core -->|"dispatches commands"| node_commands
node_core -->|"recalls and updates"| node_memory
node_memory -->|"reads and writes"| node_memoryfile
node_core -->|"starts runtime"| node_runtime
node_runtime -->|"starts daemon"| node_llmster
node_runtime -->|"checks readiness"| node_api
node_core -->|"sends conversation"| node_api
node_api -->|"generates response"| node_modelservice
node_core -->|"schedules timers"| node_reminders
node_reminders -->|"fires callback"| node_ui
node_core -->|"returns reply"| node_ui
node_minecraft -->|"provides game events"| node_cheatutils
node_cheatutils -->|"posts events"| node_eventserver
node_eventserver -->|"stores updates"| node_eventbuffer
node_ui -->|"polls recent events"| node_eventserver
node_ui -->|"adds event context"| node_core

click node_ui "https://github.com/harooshia/kimikonea/blob/main/KimikoDesktop.py"
click node_core "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_modes "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_commands "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_memory "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_reminders "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_memoryfile "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_runtime "https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py"
click node_eventserver "https://github.com/harooshia/kimikonea/blob/main/Minecraft_Connect.py"
click node_eventbuffer "https://github.com/harooshia/kimikonea/blob/main/Minecraft_Connect.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_ui,node_user toneBlue
class node_core,node_modes,node_commands,node_memory,node_reminders,node_memoryfile toneAmber
class node_eventserver,node_eventbuffer toneMint
class node_runtime,node_api,node_llmster,node_modelservice toneRose
class node_minecraft,node_cheatutils toneIndigo
```

## Components

### Desktop Companion

- [Character UI](https://github.com/harooshia/kimikonea/blob/main/KimikoDesktop.py): `KimikoDesktop.py`

### Conversation Core

- [Conversation Core](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`
- [Conversation Modes](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`
- [Commands](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`
- [Conversation Memory](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`
- [Reminders](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`
- [Local Memory File](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`

### Minecraft Integration

- [Minecraft Event Server](https://github.com/harooshia/kimikonea/blob/main/Minecraft_Connect.py): `Minecraft_Connect.py`
- [Recent Event Buffer](https://github.com/harooshia/kimikonea/blob/main/Minecraft_Connect.py): `Minecraft_Connect.py`

### Local Model Runtime

- [Runtime Manager](https://github.com/harooshia/kimikonea/blob/main/Kimiko_Core.py): `Kimiko_Core.py`
- **Local Model API**
- **llmster / lms**
- **Local Language Model**

### Other components

- **Desktop User**
- **Minecraft Game**
- **CheatUtils Script**

## Connections

- Desktop User → Character UI: enters input (evidence: `README.md`)
- Character UI → Conversation Core: submits input (evidence: `KimikoDesktop.py`)
- Character UI → Conversation Core: handles commands (evidence: `KimikoDesktop.py`)
- Character UI → Conversation Core: sets mode (evidence: `KimikoDesktop.py`)
- Conversation Core → Conversation Modes: selects mode (evidence: `Kimiko_Core.py`)
- Conversation Core → Commands: dispatches commands (evidence: `Kimiko_Core.py`)
- Conversation Core → Conversation Memory: recalls and updates (evidence: `Kimiko_Core.py`)
- Conversation Memory → Local Memory File: reads and writes (evidence: `Kimiko_Core.py`)
- Conversation Core → Runtime Manager: starts runtime (evidence: `Kimiko_Core.py`)
- Runtime Manager → llmster / lms: starts daemon (evidence: `Kimiko_Core.py`)
- Runtime Manager → Local Model API: checks readiness (evidence: `Kimiko_Core.py`)
- Conversation Core → Local Model API: sends conversation (evidence: `README.md`)
- Local Model API → Local Language Model: generates response (evidence: `README.md`)
- Conversation Core → Reminders: schedules timers (evidence: `Kimiko_Core.py`)
- Reminders → Character UI: fires callback (evidence: `Kimiko_Core.py`)
- Conversation Core → Character UI: returns reply (evidence: `KimikoDesktop.py`)
- Minecraft Game → CheatUtils Script: provides game events (evidence: `README.md`)
- CheatUtils Script → Minecraft Event Server: posts events (evidence: `README.md`)
- Minecraft Event Server → Recent Event Buffer: stores updates (evidence: `Minecraft_Connect.py`)
- Character UI → Minecraft Event Server: polls recent events (evidence: `KimikoDesktop.py`)
- Character UI → Conversation Core: adds event context (evidence: `KimikoDesktop.py`)
