Skip to main content

System Overview

Synheart Core SDK is a modular, on-device human state intelligence system that collects multi-modal signals and fuses them into a unified state representation via the Synheart runtime (native). The same pipeline runs whether you’ve enabled one module or all three. Modules feed raw samples across the native bridge into the runtime’s feature pipeline; the SDK side only sees the HSI envelope (and a typed projection of it) coming back.

Module System

Signal Collection Modules

1. Wear Module

Collects biosignals from wearable devices. Data Sources:
  • Heart rate (HR)
  • Heart rate variability (HRV)
  • Sleep stages
  • Motion/activity
  • Skin temperature (if available)
Output:
  • Derived signals only (no raw biosignals)
  • 30s, 5m, 1h, 24h aggregations
  • Quality metrics and confidence scores
Platform Support:
  • iOS: HealthKit
  • Android: Health Connect
  • Multi-device: Apple Watch, Fitbit, WHOOP, Garmin, Samsung

2. Phone Module

Collects device-level signals. Data Sources:
  • Motion (accelerometer, gyroscope)
  • Screen state (on/off, brightness)
  • App context (coarse categories)
  • Location context (stay/move, no coordinates)
Privacy:
  • No fine-grained location
  • No app names (only categories: social, productivity, etc.)
  • No notification content

3. Behavior Module

Captures interaction patterns. Data Sources:
  • Tap frequency and pressure
  • Scroll speed and direction
  • Typing cadence
  • App switching frequency
  • Screen unlock patterns
Privacy:
  • No content (what you type/read)
  • Only patterns (how you interact)

HSI Runtime (Synheart Runtime)

The Synheart Runtime is the native binary you install with synheart install runtime and the only thing the SDKs link against. It owns:
  • Storage, crypto, sync, consent, capability gating, cloud connector, lab mode, sensor adapters, native binding surface.
  • The sample-ingest seam (push_rr, push_hr, push_accel, push_behavior).
The full pipeline:
The SDK pushes raw signals across the native bridge and receives HSI JSON on tick(). HSV is the typed in-runtime intermediate — see HSV Specification for the canonical structure. Flux is what packs HSV into HSI for the wire. Core Functions:
  1. Signal Ingestion: push_rr(), push_hr(), push_accel(), push_behavior() accept raw samples and feed the Synheart Runtime’s FeatureSet builder.
  2. HSV Inference: the inference engine runs six canonical heads (Emotion, Focus, Capacity, Sleep, Recovery, Strain) plus MotionState. Each emits an Hsv with quality-adjusted, tier-capped confidence based on physiological signal fidelity.
  3. Time Windows: 60s sliding window, 5s emit step (configurable).
  4. 64D Embedding: the Synheart Runtime computes a deterministic, L2-normalized, non-invertible Johnson-Lindenstrauss projection over the HSV bundle (synheart-jl-64, 64 dims, float32). Privacy-preserving: the original HSVs cannot be reconstructed from the embedding.
  5. HSI Packing: flux builds the HSI 1.3 envelope from InferenceOutput, propagating axis readings, source provenance, tier bundles, and the embedding (when capability level + HSI version permit).
Output:
Update Frequency:
  • 30s window: Updated every 30 seconds
  • 5m window: Updated every minute
  • 1h window: Updated every 5 minutes
  • 24h window: Updated every 15 minutes
Performance: The runtime is designed for low overhead — sub-100ms HSI emission and a single-digit-percent CPU budget on a typical mid-range device. These are design targets, not measurements. Profile your app and read Synheart.runtimeDiagnostics() for live counters.

Inference heads

The engine emits typed HSV (Human State Vector) heads — there are no separate “Focus Module” or “Emotion Module” SDK products. Each head is one entry inside the HSI envelope’s axis readings. The canonical head set lives in synheart-engine. See HSV Specification for the head taxonomy and value ranges. The SDK exposes the engine output two ways:
  • Synheart.onHSIUpdate — raw HSI 1.3 JSON envelope (authoritative).
  • Synheart.onStateUpdate — typed HSIState projection of the same JSON. See the per-platform pages for the typed shape.

Cloud Connector

Securely uploads HSI snapshots to Synheart Platform with user consent. The connector lives inside the runtime — the SDK feeds the runtime, which owns the queue and signing. Features:
  • Consent-gated uploads (via cloudUpload consent + per-request JWT).
  • Persistent SQLite queue (offline-resilient).
  • Automatic retry with backoff.
  • Hardware-backed request signing (X-Synheart-Proof).
  • Tenant-isolated routing by org_id.
Wire payload: the engine’s HSI 1.3 JSON envelope, with the runtime adding X-Consent-Token and X-Synheart-Proof headers. See Cloud Protocol for the full spec. Privacy:
  • No raw signals (only HSI snapshots).
  • No personally identifiable information (subject_id is hashed before upload).
  • User can revoke at any time; the connector pauses on the next flush.
Manages permissions and data masking. Responsibilities:
  1. Permission requests
  2. Consent tracking
  3. Data masking based on consent
  4. Runtime enforcement
Consent Levels: Example:
See Consent System for the seven consent types, granular channels, and JWT flow.

Capability System

Different apps get different levels of access based on app signature and tenant ID.

Capability Levels

Capability Matrix

Enforcement

Capability checks happen at:
  1. SDK Initialization: Validates app signature and tenant ID
  2. Module Enable: Checks capability for requested module
  3. Data Access: Masks/filters data based on capability
  4. Cloud Upload: Routes to appropriate endpoint

Data Flow

1. Signal Collection

2. HSV inference and HSI packing (Synheart Runtime)

3. Interpretation

4. Output

Thread Model

The SDK uses a multi-threaded architecture for performance:
Thread Safety:
  • All callbacks delivered on main thread
  • Internal state protected by locks
  • Async operations use platform-native concurrency (Coroutines, Combine, async/await)

Storage

Local Storage

The runtime owns local persistence (SQLite via synheart-storage):
  • Sessions and HSI windows: bounded by retention (default platform-specific).
  • Vendor events: backlog from synheart-wear adapters.
  • Consent snapshot + token: per subject_id.
  • Upload queue: persistent SQLite at <data_dir>/ingest_upload_queue_<subject_id>.sqlite.
  • SRM snapshot: longitudinal state restored from srm_<subject_id>.json and platform secure storage.
Encryption-at-rest is on by default. Hosts on mobile typically wire native secure storage (Keychain / EncryptedSharedPreferences) into the runtime via synheart_core_set_storage_callbacks.

Cloud Storage

  • Requires explicit cloudUpload consent + valid JWT.
  • Only HSI snapshots leave the device (lab session JSON when explicitly enabled).
  • Transit: TLS (modern cipher suites only, no fallback to legacy versions).
  • Hardware-backed X-Synheart-Proof per request — see Synheart Auth — Signing.

Performance

The runtime is designed for low-overhead background operation. The exact CPU / memory / battery footprint depends on:
  • Sample rate (BLE HRM at 1 Hz is much cheaper than 50 Hz raw motion).
  • Active modules (motion-state inference is the heaviest single load when enabled).
  • Cloud upload cadence (offline operation costs almost nothing).
For live counters in your build, read Synheart.runtimeDiagnostics(). Profile your app on the device classes you ship to — overall footprint will vary with the choices above.

Security

Data Protection

  1. Encryption
    • Local storage: AES-256
    • Network: TLS 1.3
    • Key storage: Platform keychain
  2. Access Control
    • Capability-based access
    • App signature validation
    • Tenant ID verification
  3. Privacy
    • No raw content
    • No personal identifiers
    • Consent-gated access

Threat Model

Protected Against:
  • Unauthorized data access
  • Man-in-the-middle attacks
  • Local storage compromise
  • Malicious apps accessing data
Not Protected Against:
  • Device compromise (jailbreak/root)
  • Physical device access
  • Platform-level vulnerabilities

Platform-Specific Notes

iOS

  • Uses HealthKit for biosignals
  • CoreMotion for motion sensors
  • Combine for reactive streams
  • Background delivery supported

Android

  • Uses Health Connect for biosignals
  • SensorManager for motion sensors
  • Kotlin Coroutines and Flow
  • WorkManager for background tasks

Flutter/Dart

  • Platform channels for native access
  • Streams for reactive updates
  • Async/await for operations
  • Cross-platform consistency