Skip to main content

Overview

syni-kotlin is the Android consumer SDK for Syni. Same agent surface as the Flutter sibling and the Swift sibling, idiomatic for Kotlin (suspend calls, Flow<SyniChatEvent> streaming, StateFlow<SyniInstallState> for the install lifecycle).

Platform support

  • Android 8.0+ (minSdk 26)
  • Kotlin 2.0+ · Java 17 toolchain · AGP 9.0+
  • Native runtime delivered by the synheart CLI for arm64-v8a, armeabi-v7a, x86_64, x86 (see install steps below)

Installation

Native runtime

The AAR ships Kotlin sources only. Install the native runtime once into your project with the synheart CLI:
This writes libsyni_ffi.so for every Android ABI under <your-project>/synheart/vendor/syni/android/jniLibs/. Wire the vendor path into your app module’s build.gradle.kts so JNA can find the library at runtime:
The SDK uses JNA (Native.load) to resolve libsyni_ffi at runtime, so the AAR compiles standalone — calls into the runtime fail with a clear error if the install step hasn’t been run.

Basic usage

Streaming

chatStream returns a Flow<SyniChatEvent> — token-level Delta events followed by exactly one Final carrying the structured response.

Hybrid local / cloud

SyniExecutionMode values: LOCAL_FIRST (default), CLOUD_FIRST, LOCAL_ONLY, CLOUD_ONLY.

Install lifecycle

Wire installState into your UI to surface progress:
Stages: DOWNLOADING_MODELVERIFYING_MODELLOADING_ENGINEBINDING_PERSONA.

Where this fits

syni-kotlin is the agent layer — inference, install lifecycle, persona binding, chat orchestration. It does NOT own:
  • HSI signal collection (the synheart-core SDK does), or
  • the four-authority gate (consent + capability + activation + session; also a host concern).
Synheart-ecosystem apps typically depend on synheart-core and use SyniModule, which wraps this SDK with those layers. Standalone use of syni-kotlin is fully supported when you don’t need the wider Synheart contract.

Models

Out-of-the-box GGUF models exposed under SyniModels:
  • qwen25_15bInstructQ4 (default, ~1.5 GB)
  • qwen2_05bInstructQ4 (~500 MB)
  • gemma3_1bInstructQ4
Pinned SHA-256 per model; verified at install time. Bring your own GGUF via a custom SyniModelSpec.

API reference