Amaryllis flower mark

Open-source React Native systems engineering

On-device mobile AI with enforceable application boundaries.

Amaryllis combines local multimodal inference, streaming interaction, offline-first context, and governed adaptive components. The implementation explores how useful AI behavior can remain private and responsive without making probabilistic model output authoritative over application code, policy, or rendering.

Active 0.1.x implementation Android and iOS MIT licensed
Local-first execution Prompts, images, context, and inference can remain within the mobile application boundary.
Deterministic controls Schemas, registries, policy, and validators remain authoritative when model output is probabilistic.
Production-minded delivery Lifecycle handling, compatibility CI, package checks, SBOMs, and provenance are treated as implementation concerns.

Current implementation

Three layers with explicit ownership and trust boundaries.

Native inference provides model capability. The context layer provides application-owned retrieval. The component layer constrains how generated output can affect user interfaces. Each layer can be tested, replaced, restricted, or disabled independently.

Runtime

On-device multimodal inference

React Native APIs bridge to Android and iOS model execution with streamed results, image inputs, cancellation, typed errors, and explicit lifecycle control.

Context

Offline-first retrieval interfaces

An interface-driven context engine supports application-owned storage, bounded retrieval, TTL policy, validation, and optional scoring without requiring a hosted data service.

Components

Governed adaptive UI

Typed ComponentSpecs, registries, generators, schema validation, policy checks, and bounded personalization constrain how AI can influence rendered interfaces.

Architecture

Keep model capability behind application-owned contracts.

The model is a capability provider, not the authority. Application code owns model selection, storage, lifecycle, rendering, fallback behavior, and policy. Runtime model output is treated as untrusted input before it reaches product UI.

Read the security model
Application UIReact Native components and product logic
Contracts and policySpecs, schemas, registries, validation, and lifecycle rules
Amaryllis APIsProvider, hooks, controller, and context interfaces
Native runtimeAndroid and iOS on-device model execution
Model assetsApplication-selected local models and adapters

Engineering scope

The implementation includes more than a happy-path AI demo.

Amaryllis is also a systems-engineering exercise across native mobile APIs, deterministic validation, secure delivery, and long-lived package boundaries.

Mobile systems

Native runtime integration

React Native modules, Android and iOS build paths, native resource management, streaming APIs, cancellation, and compatibility testing.

AI governance

Deterministic control surfaces

Typed contracts, schema validation, import and capability restrictions, registry authority, bounded patches, and explicit non-goals.

Delivery assurance

Reviewable software supply chain

Change-aware CI, package and entrypoint validation, compatibility matrices, repository and package SBOMs, and release provenance controls.

@micrantha/amaryllis-components

Adaptive components without arbitrary runtime code generation.

ComponentSpec is the source of truth. It declares structure, props, target runtime, allowed AI behavior, and generation contracts before a model is involved.

01

Scaffold

Generate source at build time, then validate, inspect, test, and publish it through the normal software delivery path.

02

Customize

Create bounded variants within declared slots, design tokens, copy rules, layouts, and import allowlists.

03

Personalize

Return schema-validated props, variants, slot text, or constrained JSON patches at runtime—never raw JSX, TSX, imports, or scripts.

Authoritative registryOnly known component identities, versions, and implementations can be resolved.
Schema and policy validationEvery generated or personalized output is treated as untrusted input.
Capability limitsNetwork use, imports, design tokens, slots, and patch paths can be explicitly constrained.
Attributable changesGeneration inputs, outputs, versions, validator results, and approvals can remain reviewable.

Where it fits

A focused foundation, not a universal AI platform.

The strongest fit is mobile software where privacy, offline behavior, latency, application ownership, and constrained adaptation matter more than access to the largest hosted model.

Strong fit

  • Privacy-sensitive or intermittently connected mobile workflows
  • On-device text and image features with responsive streaming UI
  • Adaptive interfaces governed by schemas, policy, and known components
  • Teams that need inspectable AI-assisted generation and release evidence

Current constraints

  • The project is an active 0.1.x implementation and APIs may evolve
  • Applications own model distribution, storage, updates, and device performance budgets
  • Local inference shifts risk; it does not remove client compromise, reverse engineering, or model tampering concerns
  • It is not a replacement for server-scale training, fleet orchestration, or unrestricted generative UI

Quickstart

Start with local inference.

The application owns model selection, distribution, storage, privacy decisions, and fallback behavior.

Install

npm install @micrantha/react-native-amaryllis

Provider

import { LLMProvider } from '@micrantha/react-native-amaryllis';

<LLMProvider config={{
  modelPath: 'gemma3-1b-it-int4.task',
  maxTokens: 512,
  maxNumImages: 2,
}}>
  <App />
</LLMProvider>

Streaming

import { useInferenceAsync } from '@micrantha/react-native-amaryllis';

const generate = useInferenceAsync({
  onResult: (chunk, isFinal) => {
    append(chunk);
    if (isFinal) finish();
  },
  onError: handleError,
});

await generate({ prompt, images });

Project direction

Private mobile intelligence with explicit control boundaries.

Current work continues to harden native compatibility, model delivery, context integration, package publication, component governance, and evidence-producing release workflows.