What is Synheart Flux?
Synheart Flux is a Rust-based on-device compute engine that transforms raw wearable vendor payloads (e.g., WHOOP, Garmin) and smartphone behavioral data into HSI-compliant human state signals. Flux centralizes two parallel pipelines:- Wearable Pipeline: vendor adaptation → normalization → feature derivation → baseline computation → HSI encoding
- Behavioral Pipeline: session parsing → normalization → metric computation → baseline tracking → HSI encoding
Key Features
Wearable Processing
- Parse vendor JSON into canonical, vendor-agnostic structures
- Normalize units and scales (and surface data quality flags)
- Derive features (sleep efficiency/fragmentation, normalized load, etc.)
- Maintain rolling baselines for relative interpretation (HRV, RHR, sleep)
- Encode daily windows into HSI JSON with provenance + quality/confidence
Behavioral Metrics
- Parse behavioral session JSON (taps, scrolls, notifications, app switches, typing)
- Compute engagement metrics (distraction score, focus hint, burstiness, interaction intensity)
- Detect patterns (idle segments, engagement blocks, scroll jitter, deep focus periods)
- Maintain rolling baselines across sessions (20-session default window)
- Encode behavioral windows into HSI JSON with deviation tracking
Non-goals
- Emotion inference or labeling
- Medical/diagnostic claims
- UI, visualization, or cloud-side compute
- Replacing wearable ingestion/auth SDKs
Installation
Rust (crate)
Add to yourCargo.toml:
Platform Installs (Android / iOS / Flutter / Desktop)
Flux is typically bundled into a host SDK (e.g., Synheart Wear, Synheart Behavior) as native artifacts.- Recommended (prebuilt): Download artifacts from GitHub Releases and vendor them into your SDK repo
- Fallback (from source): Build artifacts in CI using the scripts in
scripts/
Android (JNI .so inside an AAR)
iOS (XCFramework)
Flutter
Bundle the same artifacts in your Flutter plugin:WebAssembly (WASI)
Flux can be compiled to WASM for cross-language integration:Usage
One-shot Conversion (Stateless)
Persistent Baselines Across Calls
For baselines that accumulate across multiple payloads (e.g., across app launches), useFluxProcessor:
Behavioral Metrics (One-shot)
Behavioral Metrics with Persistent Baselines
Behavioral Axes
| Axis | Direction | Description |
|---|---|---|
distraction | higher_is_more | Composite distraction score (0-1) |
focus | higher_is_more | Inverse of distraction (0-1) |
task_switch_rate | higher_is_more | App switch frequency (normalized) |
notification_load | higher_is_more | Notification frequency (normalized) |
burstiness | bidirectional | Temporal clustering (Barabasi index) |
scroll_jitter_rate | higher_is_more | Direction reversals ratio |
interaction_intensity | higher_is_more | Events per second (normalized) |
idle_ratio | higher_is_more | Idle time ratio |
HSI Output Format
Flux emits HSI 1.0 JSON payloads that conform to the Human State Interface specification.Required Fields
hsi_version— Schema version (e.g.,"1.0")observed_at_utc— When the data was observedcomputed_at_utc— When HSI was computedproducer— Name, version, and instance_id of the producing softwarewindow_ids/windows— Time windows with start/end timestampssource_ids/sources— Data sources with type and qualityaxes— Behavioral readings organized by domainprivacy— Data handling declarations
Feature Flags
ffi: Enables the C FFI bindings for mobile and cross-language integration
Resources
- GitHub: synheart-ai/synheart-flux
- crates.io: synheart-flux
- docs.rs: synheart-flux