Skip to content
smartworldarafathPublic

About

An open-source, on-device AI assistant for Android. Chat with GPT, Claude, Gemini or your own local models, keep long-term memory on your phone, and let the AI use real tools. No account, no tracking, no telemetry. Built with Kotlin and Material 3 Expressive.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

241 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local AI

Local AI

An open-source, on-device AI assistant for Android
Material 3 Expressive UI · multi-provider model routing · local RAG memory · PRoot Linux tool sandbox · a web UI you open from any browser on your Wi-Fi.


Local AI - Privacy-First On-Device AI Assistant with Material 3 Expressive & Linux Workspace



Download APK Source Code Support Local AI Release Notes

Android 14+ / 16 100% On-Device Material 3 Expressive Linux PRoot Zero Telemetry Multimodal AI GPL-3.0 License PRs welcome


📸 A quick look

Chat with tools and reasoning
Chat — reasoning timer, tool badges, rendered SVG answer
Memory settings
Memory — memory modes, RAG retrieval, memory search tool
Statistics
Statistics — activity heatmap, conversations, tokens

More screenshots per release live in docs/, including provider setup walkthroughs (1.1.6_providers_use.gif, 1.3.4_providers_use.gif).


Overview: Privacy-first on-device AI assistant with Linux sandbox & Material 3 Expressive

Local AI is a state-of-the-art, open-source AI assistant application for Android engineered around Google's Material 3 Expressive design system.

It provides an entirely private, locally sandboxed environment that unites multi-provider LLM routing, local vector memory (RAG), embedded Linux PRoot workspaces, real-time hardware telemetry, and fluid 60Hz/120Hz spring physics.

All conversations, API keys, documents, vector embeddings, and tool executions reside 100% securely on your device. There is zero telemetry, zero analytics tracking, and no external middleman server.

Quick factsDetails
Application nameLocal AI (v1.2 Universal Release)
Repositorysmartworldarafath/Local-AI
Target PlatformAndroid 9.0+ (API 28 to API 36 / Android 16) · Single Universal APK (180.8 MB)
UI SystemGoogle Material 3 Expressive (Jetpack Compose 1.8 · Shapes, Springs & Micro-motions)
Display OptimizationDynamic High Refresh Rate (60Hz & 120Hz ProMotion fluid timing)
Native SandboxEmbedded PRoot Linux user-space environment (CMake / C++ native core)
AI ArchitectureMulti-Provider Engine (OpenAI, Gemini, Claude, ComfyUI, Ollama, SiliconFlow)
Memory & RAGLocal Vector Embeddings + SQLite Vector Engine (Room Database v33)
Security & KeysHardware-backed Android Keystore + EncryptedSharedPreferences (AES-256)
In-App UpdatesGitHub Releases API with live speed monitor (MB/s) and background persistence
LicenseGNU General Public License v3.0 (GPL-3.0)

💡 What you can actually do with it

I want to… Local AI does it with…
Chat with GPT / Claude / Gemini / DeepSeek / Ollama One assistant definition, per-assistant model choice, 62 provider presets in the bundled catalog, plus custom OpenAI-compatible endpoints
Keep long-term context without cloud memory Local RAG memory: episodic chunks embedded by an embedding model you pick, stored on device, recalled by cosine similarity
Ask a model to do tasks on my phone Built-in tools: eval_javascript, text_to_speech, generate_image, send_notification, schedule_message, get_notifications, search_memory, manage_skills, ask_user
Run Python, a package manager or shell scripts The :workspace module installs a PRoot Linux rootfs and exposes workspace_shell, workspace_read_file, workspace_write_file, workspace_edit_file — no root required
Use custom MCP servers Built-in Model Context Protocol (MCP) client with SSE and Streamable-HTTP transports
Chat from laptop while phone does the work Embedded Ktor server + React Router SPA + JWT auth + SSE streaming, advertised over mDNS on the LAN
Read PDF / Word / Images and ask questions MuPDF engine, DOCX→Markdown parser, OCR transformer, image/audio attachments, multimodal vision models

Report an issue Contribute Support Project GPL-3.0 License

Core Features: Material 3 Expressive UI, PRoot Linux tools, RAG & multi-provider routing

Material 3 Expressive Multi-Provider Routing
Local RAG & Vector Memory Linux PRoot Workspace
Real-Time Hardware Monitor Multimodal Vision & Voice
Smart In-App Updates 100% Zero-Leak Privacy

App Showcase & Screenshots

Chat with tools and reasoning
Chat — reasoning timer, tool badges, rendered SVG answer
Memory settings
Memory — memory modes, RAG retrieval, memory search tool
Statistics
Statistics — activity heatmap, conversations, tokens

More walkthroughs and animated setup demos are in docs/, including 1.1.6_providers_use.gif and 1.3.4_providers_use.gif.

Hardware & Performance: Real-time CPU/GPU monitor, power limit sliders & 120Hz display timing

Local AI includes an embedded low-overhead hardware telemetry engine and custom power-budget controls located under Settings ➔ Advanced Settings:

  • Real-Time CPU & GPU Usage Monitor: Compact, live-animated monitor card sampling /proc/stat and JVM runtime telemetry to provide instantaneous percentage utilization metrics without draining background battery.
  • Dual Power Limit Sliders (Default 70%):
    • CPU Power Limit: Default set to 70%, adjustable from 10% to 100% with haptic feedback ticks on every 5% step.
    • GPU Power Limit: Default set to 70%, adjustable from 10% to 100% to prevent thermal throttling during intensive local inference passes.
  • Display Smoothness & 120Hz Optimization:
    • Full support for variable refresh rate displays (60Hz, 90Hz, 120Hz).
    • High-performance Compose list keying and memoized state derivations (derivedStateOf) to eliminate frame drops and scrolling stutters.

In-App Updates: Instant GitHub release downloads with live speed & resume persistence

The dedicated App Updates section (located directly under About in Settings) connects straight to GitHub Releases:

  • Semantic Version Comparison: Verifies if the GitHub release tag is strictly newer than the currently installed build (v1.2). Lower or identical versions report "App is Up to Date".
  • Live Progress & Download Speed Counter: Dynamic progress bar calculating transfer speeds in real time (MB/s and KB/s updated every 500ms) with total/downloaded byte tallies.
  • Persistence & Force-Close Recovery: Downloaded APKs are cached safely in external files storage. If the user closes the app or swipes it away from Recents, the completed file is recognized instantly on reopen—enabling direct installation without re-downloading.
  • One-Tap Package Installer: Direct integration with Android's secure FileProvider to launch package updates seamlessly.

Architecture & Tech Stack: Modern reactive Android architecture with Jetpack Compose & Koin

Kotlin 2.1 Jetpack Compose Material 3 Expressive Koin 4 DI Room & SQLite Ktor Web Server OkHttp & SSE PRoot Linux Sandbox MuPDF Engine React Web UI


Module / LayerTechnologyArchitecture Role
PresentationJetpack Compose + Navigation 2Single-activity Compose host (RouteActivity) with type-safe screens and adaptive settings layouts.
Motion & ThemeMaterial 3 Expressive + PremiumHapticsSpring physics (damping=0.5f, stiffness=400f), 12 tactile vibration patterns, and Light Slider tinting.
Dependency InjectionKoin 4 (Android + WorkManager)Clean decoupled dependency graph spanning AppModule, DataSource, Repository, and ViewModel modules.
Data & PersistenceRoom v33 (10 Entities, 10 DAOs)Paging 3 conversation feeds, episodic vector embeddings, SHA-256 deduplicated chat attachments.
Local SandboxPRoot (CMake & C++ native runtime)On-device unprivileged Linux guest environment executing scripts, Python commands, and developer CLI tools.
AI OrchestrationGenerationHandler (~1800 lines)Autonomous tool-calling loop (up to 256 steps), Pebble prompt templating, and SSE streaming pipeline.
Embedded Web UIKtor 3.0 Server + React Router 7Embedded web server with HMAC-SHA256 JWT auth and NSD mDNS discovery for browser control.
Document EngineMuPDF + XmlPullParserHigh-speed extraction and prompt ingestion for PDF and DOCX attachments directly on-device.

Installation & Setup: Build from source with Gradle or install the standalone universal APK

📱 Option A: Download Universal APK (Recommended)

  1. Go to the Releases page.
  2. Download the latest LocalAI_1.2_debug.apk.
  3. Open the downloaded APK on your Android device and confirm installation.

💻 Option B: Build from Source

Requirements

  • JDK: OpenJDK 17 or newer
  • Android SDK: Compile SDK 36, Target SDK 36, Min SDK 28
  • Node.js: v20.x or newer (for bundling embedded web-ui/)
  • NDK & CMake: NDK 26+ and CMake 3.22+ (for building native PRoot workspace binaries)
# 1. Clone the repository
git clone https://github.com/smartworldarafath/Local-AI.git
cd Local-AI

# 2. Build the embedded Web UI
cd web-ui
npm install
npm run build
cd ..

# 3. Assemble the single universal APK
./gradlew :app:assembleDebug

# 4. Output location:
# app/build/outputs/apk/debug/LocalAI_1.2_debug.apk

FAQ: Frequently asked questions regarding local models, privacy, and Linux tools

Are my chats and API credentials private?
Yes, 100%. Local AI has no centralized accounts or telemetry collectors. All API keys and tokens are encrypted via Android's hardware-backed EncryptedSharedPreferences through SecretKeyManager. SQLite databases remain strictly within your device's private app sandbox.

How does the Linux PRoot sandbox function?
PRoot uses the Linux ptrace system call to emulate root file systems and system paths entirely in user-space. It allows executing shell scripts, Python, and terminal utilities inside an isolated Linux environment on Android without requiring device rooting.

What does the Dual Power Limit Slider do?
It sets software execution limits for concurrent CPU worker threads and GPU offload limits (default 70%). This prevents your phone from overheating or throttling battery health during heavy inference sessions.

Can I run local models offline?
Yes. You can connect Local AI to local Ollama endpoints or on-device LLM servers running on your phone or local WiFi network.

Support & Donate: Support ongoing development via SupportKori, nsave, RedotPay, Payoneer & GitHub Sponsors

Local AI is an independent, ad-free, 100% open-source project. If it enhances your daily workflow, consider supporting development to help maintain Android 16 optimizations, new provider drivers, and Linux PRoot capabilities:

SupportKori SupportKori

SupportKori QR

SupportKori
Cards · bKash · Nagad · Global

nsave nsave

nsave QR

nsave
Ntag: @arafath_rahman9
Email: arafathrahman711@gmail.com

RedotPay RedotPay

RedotPay QR

RedotPay
ID: 184920485
USDT · USDC · BTC · Visa

Payoneer Payoneer

Payoneer Transfer

Payoneer
Email: arafathrahman711@gmail.com
Receiving Accounts (USD/EUR/GBP)

GitHub Sponsors



MethodAccount / IdentifierDetails
SupportKorisupportkori.com/arafathrahmanCredit/Debit Cards, bKash, Nagad, and International payment methods.
nsavearafathrahman711@gmail.com (Ntag: @arafath_rahman9)Swiss accounts · Direct EUR, USD & GBP transfers with zero cross-border hidden fees.
RedotPayUser ID: 184920485RedotPay Visa virtual card & crypto wallet · Instant USDT, USDC, BTC, and internal ID transfers.
Payoneerarafathrahman711@gmail.comDirect bank-to-bank transfer or Payoneer-to-Payoneer in USD, EUR, GBP.
GitHub Sponsorsgithub.com/sponsors/smartworldarafathDirect monthly or one-time project sponsorship.
DeveloperArafath (arafathrahman711@gmail.com)GitHub: @smartworldarafath

Crafted with Google Material 3 Expressive · Spring Physics · Zero Telemetry · 100% Open Source under GNU GPL-3.0

About

An open-source, on-device AI assistant for Android. Chat with GPT, Claude, Gemini or your own local models, keep long-term memory on your phone, and let the AI use real tools. No account, no tracking, no telemetry. Built with Kotlin and Material 3 Expressive.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages