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)
- Derived signals only (no raw biosignals)
- 30s, 5m, 1h, 24h aggregations
- Quality metrics and confidence scores
- 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)
- 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
- No content (what you type/read)
- Only patterns (how you interact)
HSI Runtime (Synheart Runtime)
The Synheart Runtime is the native binary you install withsynheart 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).
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:
- Signal Ingestion:
push_rr(),push_hr(),push_accel(),push_behavior()accept raw samples and feed the Synheart Runtime’s FeatureSet builder. - HSV Inference: the inference engine runs six canonical heads (Emotion, Focus, Capacity, Sleep, Recovery, Strain) plus MotionState. Each emits an
Hsvwith quality-adjusted, tier-capped confidence based on physiological signal fidelity. - Time Windows: 60s sliding window, 5s emit step (configurable).
- 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. - HSI Packing:
fluxbuilds the HSI 1.3 envelope fromInferenceOutput, propagating axis readings, source provenance, tier bundles, and the embedding (when capability level + HSI version permit).
- 30s window: Updated every 30 seconds
- 5m window: Updated every minute
- 1h window: Updated every 5 minutes
- 24h window: Updated every 15 minutes
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 insynheart-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— typedHSIStateprojection 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
cloudUploadconsent + 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.
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_idis hashed before upload). - User can revoke at any time; the connector pauses on the next flush.
Consent Module
Manages permissions and data masking. Responsibilities:- Permission requests
- Consent tracking
- Data masking based on consent
- Runtime enforcement
| Module | Permission | Data Access |
|---|---|---|
| Wear | Health data | Derived biosignals |
| Phone | Motion & sensors | Coarse context only |
| Behavior | Accessibility (optional) | Interaction patterns only |
| Cloud | Network upload | HSI snapshots only |
Capability System
Different apps get different levels of access based on app signature and tenant ID.Capability Levels
| Level | Access | Who Gets It |
|---|---|---|
| None | No access | Default before a token loads |
| Core | Basic HSI fields, derived signals | Third-party apps |
| Extended | Full HSI fields, higher frequency | Enterprise customers and approved partners |
| Research | Raw streams, full fusion vectors | Authorized research apps |
Capability Matrix
| Module | Core | Extended | Research |
|---|---|---|---|
| Wear | Derived biosignals | Higher-frequency windows | Raw HR/HRV streams |
| Phone | Motion, screen state | Advanced app context | Full context |
| Behavior | Basic metrics (aggregated) | Extended metrics | Event-level timing streams |
| HSI Runtime | Basic state | Full embedding fields in HSI envelope | Full fusion vectors + intermediate states |
| Cloud | Ingest endpoint (HSI 1.3) | Extended endpoint payloads | Research endpoints |
Enforcement
Capability checks happen at:- SDK Initialization: Validates app signature and tenant ID
- Module Enable: Checks capability for requested module
- Data Access: Masks/filters data based on capability
- 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:- 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 viasynheart-storage):
- Sessions and HSI windows: bounded by retention (default platform-specific).
- Vendor events: backlog from
synheart-wearadapters. - 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>.jsonand platform secure storage.
synheart_core_set_storage_callbacks.
Cloud Storage
- Requires explicit
cloudUploadconsent + 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-Proofper 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).
Synheart.runtimeDiagnostics(). Profile your app on the device classes you ship to — overall footprint will vary with the choices above.
Security
Data Protection
-
Encryption
- Local storage: AES-256
- Network: TLS 1.3
- Key storage: Platform keychain
-
Access Control
- Capability-based access
- App signature validation
- Tenant ID verification
-
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
- 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
Related Documentation
- HSV Specification - the canonical inference output (
Hsvstruct, six heads, 64D embedding) - Capability System - Access level details
- Consent System - Permission model
- Cloud Protocol - Upload protocol specification