Ainekio OS Architecture: Local-First Personal AI, Visual Workflows & Overnight Sleep
Canonical architectural guide to Ainekio OS (Greg-Aster/ainekio-os): Standing Persona, four cognitive modes, provenance-tagged memory, crash-safe SQLite execution, 23 visual workflows, local model stack, and overnight consolidation.
While Greg-Aster/Ainekio-bot owns the robot hardware, firmware, locomotion training, and Body Control gateway, the robot’s mind lives in Ainekio OS (Greg-Aster/ainekio-os) (formerly MetaHuman OS).
Ainekio OS is a local-first operating system for a persistent personal AI identity. Rather than wrapping a stateless chat prompt around robot commands, it provides one shared runtime for identity, provenance-tagged memory, visual cognitive workflows, crash-safe task execution, voice I/O, LoRA training, and background reflection—running standalone on a PC or embodied inside physical and simulated robots.


1. Standalone vs. embodied roles
Keeping the mind in a separate repository decouples hard real-time motor safety from language-model latency and lets Ainekio OS keep running on a desktop or local server even when no physical robot is powered on:
| System | Repository | Core Responsibilities |
|---|---|---|
| Ainekio OS (Mind) | Greg-Aster/ainekio-os | Standing Persona, web/CLI/Android clients, visual cognitive workflows, crash-safe SQLite execution, episodic memory, background reflection, local/hybrid model and voice routing, LoRA training, and the embodied robot bridge. |
| Ainekio-bot (Body & Gateway) | Greg-Aster/Ainekio-bot | Physical V1, V2 “Kanzagroth”, and V3 “Killdozer” hardware, microcontroller firmware, on-chip walking and safety interlocks, Body Control Cockpit, and browser simulation (hardware overview). |
Every client—web workbench, terminal CLI, Android app, and embodied robot bridge—talks to one shared core engine and profile store, with optional AES encryption for private profile data.
2. Standing Persona, cognitive modes & trust tiers
Ainekio OS separates who the system is from how much autonomy it has.
Standing Persona
Core identity lives in a single Standing Persona record containing traits (including Big Five dimensions), values, voice style, and long-term goals. Everyday chats and task loops treat this record as read-only so casual turns cannot cause personality drift; only the scheduled overnight Psychotherapist review or a direct owner edit can update it. Short-term goals live separately in an Agency/Desire store where priorities rise or decay based on actual outcomes.
Four cognitive modes & trust tiers
| Cognitive Mode | Memory & Learning Behavior | Role & Typical Trust Tier |
|---|---|---|
| Dual Consciousness | Full episodic writes, background reflection, and personalization adapters learning the owner’s voice and style | Long-term personal digital counterpart (adaptive_auto) |
| Agent Mode | Task-scoped memory with direct engineering, research, and coding delegation | Focused desktop and coding assistant (suggest) |
| Emulation Mode | Read-only memory and frozen persona/adapter state with zero mutation | Safe demos, snapshots, and replay (observe) |
| Environment Mode | Connects live robot perception to bounded physical actions and companion speech | Embodied robot companion across Reactive, Semi, or Full Auto (autonomy guide) |
3. Episodic memory & crash-safe SQLite execution
Long-running companions fail in two common ways: imagined thoughts get mixed up with real events, and multi-step physical tasks lose track when a walk takes several seconds or Wi-Fi hiccups. Ainekio OS solves both at the storage layer:
- Provenance-tagged episodic memory: Every memory records its origin—human chat, room voice transcript, camera sighting, verified action result, reflection, or symbolic dream. Semantic embeddings run on CPU (
Qwen3-Embedding-0.6B/Nomic-Embed-Text) so memory search never competes with chat or vision models for GPU VRAM. - Crash-safe SQLite execution: Multi-step turns and autonomous plans run inside a write-ahead-logged SQLite state machine with incremental, content-addressed checkpoints. Wait-for-event checkpoints reconcile command sequence receipts so a reconnect never replays a physical robot motion twice.
- Explicit speech, stream & camera-image feed: Outward speech flows only through visible
TTS Outputnodes in the workflow editor, routing audio to the browser, host speakers, or robot speaker while projecting live replies onto Ainekio Cockpit and simulator chat—and rendering captured robot camera observations inline inside the Ainekio OS conversation feed.
4. Visual cognitive workflows & cached tool loop
Rather than burying prompt logic in opaque scripts, Ainekio OS models every behavior as an editable visual node graph in the browser. A recent consolidation trimmed 47 sprawling graphs down to 23 focused, color-coded workflows:
- Interactive & Embodied Modes: One graph handles Dual Consciousness, Agent, and Emulation turns without keyword hacks; a streamlined 15-node embodied graph pairs a fast ~310 ms single-shot lane for simple commands (“wave”, “stop”) with a native 6-tool reasoning loop (
sense,move,posture/face,speak,delegate,complete) that preserves byte-identical prompt prefixes for ~99.7% KV-cache reuse across multi-step searches. - Zero-pinning robot following: Body Control owns which robot is active (V1, V2, or simulated), so Ainekio OS automatically follows whichever body connects without manual re-pairing (embodied bridge guide).
- 3D spatial curiosity: Feeds Body Control’s 8-sector metric curiosity and obstacle map into autonomous exploration so the robot turns toward unseen areas instead of staring at walls.
- Inner life, desires & maintenance: Dedicated graphs handle associative thought, reflection, symbolic dreaming, desire planning/execution, memory curation, therapy review, and coding escalation.
5. Compact local model & voice stack
Instead of relying on one giant model, Ainekio OS routes specialist tasks across a 6.56 GiB co-resident llama.cpp stack plus optional LAN or cloud delegates:
- Co-resident
0.8Bspecialists +9Bmain model: A quantizedQwen3.5-0.8B Q8_0worker (1.22 GiB) hot-swaps four lightweight specialist LoRAs (triage, one-shot tasks, Freestyle choreography, and compact tool loops) right beside a32K-contextQwen3.5-9Bplanner (5.34 GiB) with dynamic Persona LoRA scaling. Any in-flight generation cancels immediately when a person speaks or switches to Reactive mode. - LAN edge offloading: When Body Control runs on a compact SBC like a Radxa Dragon Q6A, fast routing can stay local while heavier vision, speech, or reasoning roles offload to a workstation on the same LAN.
- Offline-first voice pipeline: Whisper handles speech-to-text from cached local checkpoints, while Kokoro (with local Piper fallback) handles text-to-speech—automatically shifting Kokoro from GPU to CPU if VRAM runs tight during local training (voice loop guide).
- “Big Brother” coding & research escalation: Heavy debugging, repository analysis, or terminal tasks can escalate to pre-warmed CLI coding sessions (Codex, Claude Code, or Gemini) alongside direct API providers.
6. Nightly 02:00 AM consolidation sleep cycle
During a configurable overnight window (default 02:00 AM), Ainekio OS pauses autonomous robot motion and runs an 8-stage sleep cycle—waking immediately if someone speaks to it:
- Organize Memories: Tags the day’s raw conversations and sightings with entities and context.
- Curate Dialogue: Distills clean conversational training examples while filtering command noise.
- Curate Robot Decisions: Surfaces candidate action-routing examples from real robot runs for review.
- Fit Personalization Adapters: Trains candidate LoRA weights on reviewed interaction history.
- Update Desires: Adjusts desire strengths from real outcomes, archives completed goals, and drafts bounded multi-step plans.
- Dream: Samples lifetime memories along a decay curve into symbolic dreams tagged strictly with
dreamprovenance so they are never mistaken for physical events. - Persona Review: Runs a reflective interview over recent experiences to make careful, auditable adjustments to the Standing Persona.
- Rebuild Index: Refreshes CPU vector embeddings across the updated memory store.
Related guides
- Embodied Robot Integration — How observations, telemetry, and bounded intents cross the bridge between Ainekio OS and the robot.
- Bounded Autonomy Modes — Reactive, Semi, and Full Auto modes plus hardware safety boundaries.
- Ainekio as a Companion — Day-to-day voice interaction, expressions, and standalone vs. embodied use.