Initialization is two-phase. Phase 1 is the initialize() call and is all local inference
needs. Phase 2 handles authentication, device registration, and telemetry in the background;
completeServicesInitialization() awaits it when you need to be sure it finished.Call it from Application.onCreate().
Reading state
Property
Type
Meaning
isReady
Boolean
Local inference is usable
version
String
SDK version
environment
SDKEnvironment?
Configured environment
isAuthenticated
Boolean
Control-plane credentials are valid
events
Flow<SdkEvent>
Lifecycle and error breadcrumbs
eventBus
EventBus
Category-filtered events
getUserId() and getOrganizationId() return String?.
isInitialized, areServicesReady, and isActive are deprecated. Use isReady.
Capabilities
val capabilities = RunAnywhere.capabilities()
Reports the modalities, backends, and audio formats this build can run, plus an unavailable
list explaining anything missing.
Models
// What is availableval models = RunAnywhere.models.list()val model = RunAnywhere.models.get("qwen3-0.6b")// Get one onto the deviceRunAnywhere.models.download("qwen3-0.6b").collect { event -> if (event is DownloadEvent.Progress) progress = event.fraction ?: 0f}// Load and unloadval loaded = RunAnywhere.models.load("qwen3-0.6b")RunAnywhere.models.unload("qwen3-0.6b")RunAnywhere.models.unloadAll(ModelCategory.MODEL_CATEGORY_LANGUAGE)// HousekeepingRunAnywhere.models.delete("qwen3-0.6b")val state = RunAnywhere.models.state()RunAnywhere.models.refresh()
You rarely need load directly. Generation auto-loads what it needs and downloads when
options.model names a model that is absent.
val info = RunAnywhere.models.register( ModelRegistration.url( name = "My model", url = "https://example.com/model.gguf", framework = InferenceFramework.INFERENCE_FRAMEWORK_LLAMA_CPP, category = ModelCategory.MODEL_CATEGORY_LANGUAGE ))