INFRASTRUCTURE · ANDROID LOCAL AIActive engineering · shared runtime integrated

Harnex

Your local AI harness for Android. Run and manage local LLMs once, then expose them to Android apps through one controlled boundary.

Android API 26+Qwen3.5 0.8B / 2BGGUF + llama.cppConsumer SDK + BinderMIT
Harnex system map from Android consumer applications through the shared runtime to local GGUF inference
Android apps → Consumer SDK → Binder → HarnexRuntime → backend → local GGUF

WHY HARNEX

One app can embed a model. Harnex makes Local AI reusable across apps.

The goal is not another llama.cpp wrapper. It is a governed Android runtime that keeps product code separate from model, trust and lifecycle concerns.

One governed runtime

Model selection, residency, sessions, generation and cleanup live in Harnex instead of being reimplemented per app.

Android-native trust

Access is authorized from caller UID, package and signing identity, not from what a client claims to be.

Evidence built in

Latency, TTFT, throughput, memory, thermal state and inference Activity are part of the system, not an afterthought.

WHAT WORKS TODAY

A real Android host, not just an architecture diagram.

The shared runtime, cross-app boundary and engineering control plane are already integrated on the current development line.

Shared runtime

Consumer apps use the versioned SDK and Binder instead of embedding the native inference stack themselves.

Android-native trust

Authorization starts from Binder UID, installed package and signer, then applies Harnex policy and enabled use cases.

Local inference Activity

Accepted inference can be inspected through a durable, encrypted local audit trail without leaking content into normal telemetry.

Control plane

Models, applications, use cases, runtime state, performance, diagnostics and Activity stay visible in one engineering console.

Harnex Local AI Console showing App connections, local Playground, Activity and GGUF model management
Real Harnex surfaces · apps, local inference, Activity and models
CURRENT SURFACES

One console to operate and inspect the shared runtime.

  • Overview
  • Playground
  • Activity
  • Applications
  • Performance
  • Models
  • Diagnostics
  • Settings

ARCHITECTURE

One clear ownership boundary.

Consumer app → Consumer Android SDK → Binder → Harnex control plane/runtime → backend-neutral SPI → llama.cpp → local GGUF. Model storage, observability, evaluation and inference Activity stay Harnex-owned around that execution path.

Harnex architecture showing consumer applications, Consumer Android SDK, Binder, Harnex control plane, runtime orchestration, backend, observability and local GGUF models
WHO OWNS WHAT

Four boundaries are enough to understand the system.

01APP
Consumer app

Owns the product workflow, UI state and application data.

02CONTRACT
Consumer SDK + Binder

Owns the typed contract, transport and caller boundary between the app and Harnex.

03HARNEX
Control plane + runtime

Owns identity, authorization, model policy, residency, lifecycle, scheduling and inference audit.

04EXECUTION
Backend

Owns local execution. llama.cpp is the current backend, not the architecture.

llama.cpp is the current backend, not the architecture.

The runtime core keeps policy and lifecycle separate from the execution engine through a backend-neutral boundary.

HOW APPS CONNECT

Your app stays focused on the product.

Add the Consumer Android SDK and call Harnex over Binder. The app owns the workflow; Harnex keeps model selection, residency and execution lifecycle behind the boundary.

01
Keep the product workflow in your app

The consumer owns UI, product state and application data.

02
Call the Consumer SDK

Typed contracts cross the Binder boundary without exposing Harnex internals.

03
Let Harnex operate the runtime

Authorization, model policy, residency, lifecycle and audit stay host-owned.

kotlinConsumer Android SDK
implementation("io.github.daniele21.localllm:consumer-android:<version>")

val job = client.submitLogicalGeneration(
    ConsumerLogicalJobSubmitRequest(
        clientRequestId = ConsumerLogicalJobRequestId("analysis-42"),
        useCaseId = prepared.useCaseId,
        preparedId = prepared.preparedId,
        expectedExecution = prepared.toExecutionIdentity(),
        input = ConsumerGenerationInput.Text(input),
    ),
)

Scroll to inspect code

EVIDENCE

What is proven now and what is still being validated.

The shared runtime and cross-app boundary are real. Physical-device and release evidence remain separate gates for stronger production claims.

EVIDENCE BOUNDARY

Keep implementation and release evidence separate.

Harnex already has meaningful cross-application evidence. The remaining gap is representative real-device and release validation, not the core architecture.

Supported today

  • Shared runtime + Consumer Android SDK/Binder boundary integrated
  • API 35 cross-application lifecycle, fault and serialization matrix green
  • Independent-signer consumer path supported with Harnex-owned UID/package/signer authorization
  • Encrypted local inference Activity with verified caller attribution and restart-safe history implemented
  • Consumer Android SDK 0.1.0-alpha.11 published from the validated baseline

Not claimed here

  • Actual Play App Signing identity confirmation
  • Representative physical ARM64/JNI/GGUF execution evidence
  • Physical memory and thermal envelope across target devices
  • OEM/device coverage and selected real-environment release gates

STATUS

Working Android infrastructure. Real-device release validation is still in progress.

The shared runtime, SDK, control plane and cross-app trust boundary are implemented. The next confidence step is representative hardware and release evidence.

CURRENT DECISION

Architecture stable. Evidence hardening next.

Keep the host/Consumer boundary stable and close the remaining physical-device, Play identity, OEM and selected release gates.

  • Shared runtime + cross-app boundary implemented
  • Independent-signer path already exercised
  • Physical-device and release evidence still being expanded

CONNECTED SYSTEM

Where this project fits

OPEN SOURCE · MIT

Explore the runtime, contracts and evidence.

Harnex is the Android infrastructure experiment behind a simple question: can Local AI become a shared capability instead of a native stack rebuilt inside every app?