Skip to content

Repository files navigation


🌊 Overview

AION OS is a production-grade, voice-first AI operating system built natively for Android. More than just a chatbot, AION OS acts as an autonomous companion that leverages on-device pipelines to understand context, control device hardware securely, and execute tasks via a sandboxed plugin registry.

Built with Kotlin and Jetpack Compose, AION OS enforces strict Clean Architecture, ensuring that complex state machines, voice orchestration, and AI intent classification remain highly testable and decoupled from the Android framework.


🎯 The Problem & Solution

The Problem

Traditional AI voice assistants operate as black boxes, suffering from high latency, rigid command structures, and privacy concerns due to continuous cloud streaming. They lack true on-device memory and fail to gracefully handle transient network drops or complex, multi-step user intents.

The AION OS Solution

AION OS shifts the paradigm by running the orchestration layer entirely on-device:

  • Privacy-First Pipeline: Adaptive wake-word detection and local intent classification happen before any network call is made.
  • Continuous Memory: A local Room database stores conversation vectors and user preferences, enabling contextual reasoning without leaking data to cloud providers.
  • Extensible Sandboxing: A secure plugin registry allows AION to execute real-world tasks (calendar, SMS, smart home) with isolated permission scopes.

⭐ Engineering Highlights

AION OS is built to enterprise Android standards, handling complex hardware states natively.

  1. Pipeline Orchestrator: A centralized coordinator managing the full lifecycle: WakeWord → STT → Classify → Plugin Execution → Generative AI → TTS.
  2. Resilient Audio Focus: Custom AudioFocusManager seamlessly handles audio ducking, noisy intent receivers, and Bluetooth SCO routing without interrupting the user.
  3. Adaptive Noise Floor: The wake-word engine uses an exponential moving average to adjust threshold sensitivity based on ambient room noise, preventing false positives.
  4. Strict Result<T> Error Handling: Business logic never throws exceptions. Every layer communicates via sealed Result classes, ensuring deterministic failure states and preventing silent crashes.
  5. Secure Storage: Uses Android's EncryptedFile and EncryptedSharedPreferences for AES-GCM encryption of all access tokens and API keys.

🚀 Visual Features

AION OS Core Features

🏗️ System Architecture

flowchart TD
    U["👤 User"] --> UI

    subgraph UI["Presentation Layer (Compose)"]
        Chat["💬 Chat UI"]
        Orb["🔴 AionOrb Indicator"]
        Service["⚙️ Audio Foreground Service"]
    end

    UI --> APP

    subgraph APP["Application Layer"]
        Orchestrator["🎼 Pipeline Orchestrator"]
        SM["🚦 Session State Machine"]
    end

    APP --> DOM

    subgraph DOM["Domain Layer (Pure Kotlin)"]
        IC["🧠 Intent Classifier"]
        Mem["💾 Memory Engine"]
        PE["🔌 Plugin Executor"]
    end

    DOM --> INF

    subgraph INF["Infrastructure Layer"]
        WW["🎙️ WakeWord Detector"]
        STT["🗣️ Speech Recognizer"]
        TTS["🔊 TTS Engine"]
        DB[("🍃 Room Database")]
        Sec["🔐 CryptoManager"]
    end
Loading

Design Principles

  • Fail Fast, Fail Safe: Hardware timeouts (e.g., STT stalling) auto-recover or gracefully degrade using fallback intents.
  • Isolated State: The Voice Session Manager relies on a strict single-threaded state machine (8 states, 35 valid transitions) to prevent race conditions during rapid audio interrupts.
  • Clean Boundaries: The shared/ module is pure Kotlin, allowing business logic to be easily ported to Desktop or KMP in the future.

🔁 Workflow Example: Voice Pipeline

sequenceDiagram
    participant User
    participant Orchestrator
    participant STT
    participant AI
    participant Plugin
    participant TTS

    User->>Orchestrator: 1. Says "Hey AION" (Wake Word)
    Orchestrator->>STT: 2. Start Listening (Audio Focus Gained)
    STT-->>Orchestrator: 3. Transcript: "Schedule a meeting for tomorrow"
    Orchestrator->>AI: 4. Classify Intent
    AI-->>Orchestrator: 5. Intent: create_calendar_event
    Orchestrator->>Plugin: 6. Execute Calendar Plugin
    Plugin-->>Orchestrator: 7. Success Result
    Orchestrator->>TTS: 8. Speak: "Meeting scheduled."
    TTS-->>User: 9. Audio Playback
    Orchestrator->>Orchestrator: 10. Return to IDLE / Release Focus
Loading

📦 Tech Stack

Layer Technologies
Language & Core Kotlin, Coroutines, StateFlow, Clean Architecture
UI Framework Jetpack Compose, Material 3
Dependency Injection Hilt / Dagger
Database & Storage Room, DataStore, EncryptedFile
Voice & Audio SpeechRecognizer API, TextToSpeech API, AudioRecord
AI & Pipeline Custom intent router, Open-Meteo, LLM integration APIs
Testing JUnit4, MockK, Turbine, Espresso

📁 Folder Structure

AION/
├── android/        # Android-specific UI and framework adapters
├── shared/         # Pure Kotlin domain (Entities, Use Cases)
├── backend/        # Cloud services & configuration
├── ai/             # AI engine interfaces and Pipeline Orchestrator
├── plugins/        # Plugin SDK and sandboxed executors
├── docs/           # Extended documentation and architecture reports
├── tests/          # Unit and Instrumentation test suites
└── scripts/        # CI/CD and build scripts

🚀 Quick Start

Prerequisites

  • Android Studio Iguana (or newer)
  • JDK 17
  • Android Device running API 26+

Installation

# 1. Clone the repository
git clone https://github.com/Manthan-13521/Jarvis-AI-Assistant.git
cd Jarvis-AI-Assistant

# 2. Configure Keystore (Required for build)
cp keystore.properties.example keystore.properties
# Fill in your local debug or release signing properties

# 3. Build the project
./scripts/build/android.sh

🤝 Contributing & Guidelines

AION OS is an active ecosystem project. For contributions, please refer to our Contributing Guidelines and Code of Conduct.

For detailed technical teardowns, read the Architecture Report.


📄 License

All Rights Reserved © 2026 Manthan Jaiswal

This repository is shared as a technical portfolio piece. Please reach out before reusing, forking for redistribution, or deploying a derivative in production.


Built solo by Manthan Jaiswal

Kotlin Android

About

🤖 AI Voice Assistant with Memory, Wake Word & Smart Device Control

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages