AMEVA-Orchestrator

High-Reliability Control Plane, Lifecycle Scheduling, and Multi-Modality Component Adapter Gateway SDK for Edge & Mobile AI

PyPI Version npm Version License Platform
1-Line Quick Installation

Install the official package directly into your runtime:

pip install termux-ai-orchestrator
# or
npm install -g @ameva/orchestrator

The Engineering Challenge

Executing concurrent multimodal AI models (LLM, STT, TTS, Vision, Diffusion) on mobile edge devices inevitably triggers Android Low Memory Killer (LMK) SIGKILL terminations, unauthorized RPC exposure risks, and severe compute resource contention across disparate runtimes.

The Architectural Breakthrough

AMEVA-Orchestrator is a lightweight, high-reliability control plane SDK and adapter gateway managing local AI model lifecycles and external runtime components on Android Termux and edge devices. It enforces a strict 5-tier lifecycle model (COLD, WARM, HOT, ACTIVE, ERROR) with process mutex serialization to prevent Android LMK terminations, and features native distributed smartphone clustering via P2P Tailscale mesh and zero-config UDP PIN pairing. Compliant with OpenSSF and CNCF security specifications, it provides built-in automated secret redaction and a tamper-evident SHA-256 audit logging chain.

Key Capabilities & Built-in Hardening

5-Tier Model Lifecycle Management

Strict 5-tier deterministic transitions with budget enforcement, completely preventing Android LMK kills.

Disaggregated Mobile AI Clustering

Pools idle RAM across heterogeneous smartphones and computes dynamic tensor split weights in real-time.

Zero-Config UDP PIN Pairing

Instant zero-config master-worker pairing via 6-digit one-time PIN and HMAC-signed UDP beacons.

Automated Secret Redaction Engine

Detects and masks Bearer tokens, passwords, API keys, and URL credentials across logs and SSE event streams.

Tamper-Evident SHA-256 Audit Trail

Cryptographically links all control commands into a SHA-256 hash chain for provable post-audit integrity.

9-Modality Component Adapter Gateway

Orchestrates full lifecycles for 9 modality adapters including termux-aichain, stt, tts, and vision.

Supported Compute Kernels & Operations

Subsystem Category Operations & Kernels Status
Compute Engine WebGPU Compute Shaders (WGSL), FP16/FP32 Production
Memory Subsystem Zero-Copy Ring Buffers, Weakref GC Pooling Production
Platform Runtimes Node.js, Chromium WebGPU, Android Termux Bionic Production

Canonical Usage Example

import ameva_orchestrator as orch
from termux_ai_orchestrator.client import Client

# 1. Probe available RAM and calculate dynamic tensor split across phone fleet:
ram_mb = orch.probe_node_ram_mb("192.168.43.101", user="u0_a123", port=8022)
servers, ts_str = orch.resolve_auto_tensor_split(["192.168.43.101:8022", "192.168.43.102:8022"])
print(f"Cluster Auto Split: -ts {ts_str}")

# 2. Connect to local Control Plane and inspect ecosystem status:
client = Client(base_url="http://127.0.0.1:11553", token="")
status = client.status()
print(f"Active nodes: {len(status['nodes'])}, Models: {len(status['models'])}")

Getting Started & Deep Guides