Preprint 2026 Open Access CC BY-NC-SA 4.0

NeuroSkill™: Proactive Real-Time Agentic System Capable of Modeling Human State of Mind

Nataliya Kosmyna, Eugene Hauptmann · 2026

Abstract

This release documents the architecture and initial distribution of NeuroSkill™, a proactive real-time agentic system designed to model the Human State of Mind via Brain-Computer Interface (BCI) signals. Unlike conventional large language model (LLM) interfaces that rely solely on explicit text input, this system integrates foundation EXG models (e.g., Zuna, Luna) with text embeddings to construct a multidimensional representation of cognitive and affective states directly from biophysical data. The system operates fully offline on edge computing environments (local PC), ensuring data sovereignty and privacy. This document outlines the implementation details, component architecture, ethical licensing frameworks, and deployment protocols for the open-source community.

We present NeuroSkill™, an open-source, local-first desktop application for real-time electroencephalography (EEG) analysis using consumer-grade Muse 2, Muse S, and OpenBCI boards (Ganglion, Cyton, Cyton+Daisy, Galea). NeuroSkill™ computes 60+ brain metrics per 5-second epoch entirely on the local device using GPU-accelerated signal-processing pipelines implemented as wgpu compute shaders, covering spectral band powers, cross-band ratios, connectivity and phase–amplitude coupling, nonlinear complexity indices (Higuchi FD, DFA, permutation entropy, sample entropy, Hjorth parameters), composite cognitive scores (focus, relaxation, engagement, meditation, cognitive load, drowsiness), and photoplethysmography-derived cardiovascular metrics (HR, RMSSD, SpO₂, LF/HF ratio, respiratory rate).

We introduce ZUNA (Zero-latency Universal Neuro-Annotation), a lightweight 186 K-parameter 1-D convolutional encoder trained on 42,000 labelled EEG epochs that maps each 5-second four-channel window to a 32-dimensional unit-normalised embedding vector. Embeddings are indexed in a Hierarchical Navigable Small World (HNSW) approximate nearest-neighbour structure that grows incrementally across sessions, enabling semantic similarity search across arbitrarily large recording archives with sub-millisecond query latency on consumer hardware.

NeuroSkill™ includes automatic AASM-compliant sleep staging, A/B hypnogram comparison, Brain Nebula™ projection of embedding space (GPU-accelerated via wgpu/CubeCL), and a local WebSocket API on port 8375 with nine commands covering streaming, search, labelling, session management, sleep analysis, export, and UMAP. A companion TypeScript CLI (npx neuroskill) wraps the API with mDNS auto-discovery, session-aware auto-range defaults, and machine-readable --json output. We validate metric computation against 63 peer-reviewed references and report an end-to-end acquisition-to-WebSocket latency of approximately 125 ms on Apple Silicon. The entire system runs without cloud connectivity, accounts, or telemetry.

Key Contributions

  1. 1

    GPU-accelerated local EEG pipeline

    A complete signal chain — BLE acquisition, bandpass/notch filtering, Welch PSD, band power extraction, cross-channel ratios, nonlinear complexity, artifact detection, and composite score computation — implemented entirely as wgpu compute shaders. Runs at ≈4 Hz on Metal (macOS), Vulkan (Linux), and DX12 (Windows) without any cloud round-trip.

  2. 2

    ZUNA neural encoder + HNSW index

    A 186 K-parameter 1-D convolutional encoder maps each 5-second epoch to a 32-D L2-normalised embedding. An HNSW index (hnswlib) builds incrementally across sessions, enabling cosine-similarity search at <1 ms per query over 10,000+ epochs. Text queries are supported via a jointly-trained MLP that aligns tag-name BERT embeddings with the 32-D EEG space.

  3. 3

    Brain Nebula™ (GPU-accelerated UMAP)

    A wgpu/CubeCL backend for fast-umap runs UMAP dimensionality reduction on dual-session embedding batches in under 15 seconds on Apple M1. The result is visualised as an interactive 3D Threlte (Three.js) point cloud in the dashboard, with cluster separation analysis (inter/intra centroid distance, outlier detection) exposed via the CLI and WebSocket API.

  4. 4

    AASM sleep staging from frontal/temporal EEG

    Epoch-by-epoch classification into Wake, N1, N2, N3, REM using band-power ratios, sleep spindle detection (matched filter, 11–16 Hz), K-complex template matching, and DFA exponent trend analysis — all from only four electrodes. Outputs efficiency, onset/REM latency, transition count, awakening count, and per-stage bout statistics.

  5. 5

    Comprehensive session analytics

    Side-by-side A/B session comparison with per-metric absolute and percentage deltas, improved/declined classification, and auto-queued UMAP. Recording history tracks total hours, session streak, and today-vs-7-day averages for every metric. Labels are stored with timestamps in SQLite and visualised as markers on all charts.

  6. 6

    Local WebSocket API (9 commands, 2 events)

    A tokio-tungstenite server binds to 127.0.0.1:8375 exclusively, broadcasting eeg-bands (~4 Hz, 60+ metrics) and muse-status (~1 Hz, device health). Nine request-response commands cover status, sessions, label, search, compare, sleep, umap, umap_poll, and export. All data stays on-device.

  7. 7

    TypeScript CLI with mDNS discovery

    cli.ts wraps the WebSocket API with mDNS auto-discovery (bonjour-service), lsof fallback port scanning, session-aware auto-range defaults, colourised terminal output, and --json mode for piping to jq or any external processor. No global install required — runs via {CLI_PREFIX}.

System Architecture

NeuroSkill™ is a Tauri 2 application: a Rust backend handles all signal processing, storage, and networking; a SvelteKit frontend renders the dashboard using Threlte (Three.js) for Brain Nebula™. The two communicate over Tauri's IPC channel. External clients (CLI, Python scripts, web apps) communicate with the Rust backend via the local WebSocket server — the frontend is completely bypass-able.

Stack layers

Hardware
Muse 2 / Muse S — 4× EEG (256 Hz), PPG (64 Hz), IMU (52 Hz) over BLE GATT · OpenBCI Ganglion (4ch, 200 Hz, BLE/WiFi) · Cyton (8ch, 250 Hz, USB/WiFi) · Cyton+Daisy (16ch, 125 Hz, USB/WiFi) · Galea (24ch, 250 Hz, UDP)
BLE transport
CoreBluetooth (macOS) · btleplug/bluer (Linux/Windows) — jitter-compensated packet reassembly
Rust backend (Tauri 2)
tokio async runtime · BLE manager · wgpu GPU pipeline · HNSW index · SQLite (sqlx) · WebSocket server (tokio-tungstenite) · UMAP queue (fast-umap)
GPU compute (wgpu)
Metal (macOS) · Vulkan (Linux) · DX12 (Windows) — filter → PSD → band powers → nonlinear → composite scores, all in one dispatch
Storage
~/.skill/embeddings/YYYYMMDD.sqlite · labels.sqlite · hnsw_index.bin · umap_cache/ · preferences.json · exports/
WebSocket API
127.0.0.1:8375 — broadcast: eeg-bands, muse-status · commands: status, sessions, label, search, compare, sleep, umap, umap_poll, export
SvelteKit dashboard
Tauri IPC — 8 UI panels: Live Bands, Signal Quality, Scores, Brain Nebula™ (Threlte), Hypnogram, Compare, Labels, History
External clients
TypeScript CLI (cli.ts) · Python / Node.js / bash scripts · any WebSocket client

The GPU pipeline runs inside the Rust process — no separate GPU daemon. wgpu selects the best available backend at startup (Metal preferred on macOS, Vulkan on Linux, DX12 on Windows) and falls back to software rendering on headless/CI hosts.

Signal Pipeline

Raw EEG arrives at 256 Hz from four electrodes (AF7, AF8 frontal; TP9, TP10 temporal). Each 5-second epoch (1,280 samples per channel) is dispatched to the GPU for the following sequential stages. PPG and IMU are processed on a separate lower-frequency path.

01

Acquisition & reassembly

BLE GATT notifications arrive in variable-length packets. A jitter-compensated ring buffer accumulates samples, detecting and interpolating dropped packets (up to 3% loss tolerated). PPG (HR, SpO₂) and IMU (accelerometer, gyroscope) channels are acquired concurrently and timestamped against the EEG clock.

02

Filtering

4th-order zero-phase Butterworth bandpass 0.5–50 Hz removes DC drift and high-frequency noise. A configurable notch filter (50 Hz default, switchable to 60 Hz) suppresses mains interference. Both filters are applied per-channel as IIR cascades in the wgpu compute shader — no CPU round-trip.

03

Artifact detection

Blink artifacts are detected on AF7/AF8 by a combined amplitude threshold (>150 µV peak) and low-frequency spectral burst. Jaw-clench is detected by a gamma-band (30–45 Hz) power spike across all four channels simultaneously. Epochs are never discarded; artifact counts and rates are appended to the payload so downstream consumers can gate on quality.

04

Spectral analysis (Welch)

Welch's periodogram: Hann window, 512 samples (2 s), 50% overlap, 8 windows averaged per epoch. Produces 1–80 Hz resolution at 0.5 Hz bins. Extracts absolute and relative power for δ (1–4 Hz), θ (4–8 Hz), α (8–13 Hz), β (13–30 Hz), γ (30–45 Hz), high-γ (45–80 Hz). Also computes: SEF95, spectral centroid, alpha peak frequency (APF, via parabolic interpolation around α peak), brain power spectrum entropy (BPS), signal-to-noise ratio (SNR).

05

Cross-channel metrics

Frontal Alpha Asymmetry (FAA = ln[AF8_α] − ln[AF7_α]). Band ratios: TBR (θ/β), TAR (θ/α), BAR (β/α), DTR (δ/θ). Inter-hemispheric coherence: magnitude-squared coherence between TP9 and TP10 across 8–13 Hz. Phase–Amplitude Coupling (PAC): modulation index between θ (4–8 Hz) carrier phase and γ (30–45 Hz) envelope. Laterality index: (right-α − left-α)/(right-α + left-α). Mu suppression: relative 8–12 Hz power change from calibration baseline (motor imagery proxy).

06

Nonlinear complexity

Higuchi Fractal Dimension (Kmax = 10) — sensitivity to signal irregularity. Detrended Fluctuation Analysis (DFA, scales 16–512 samples, log-linear fit) — long-range correlations. Permutation Entropy (m = 5, τ = 1) — ordinal pattern diversity. Sample Entropy (m = 2, r = 0.2σ) — regularity measure. Hjorth Activity (signal variance), Mobility (ratio of first-derivative variance to signal variance), Complexity (mobility ratio of derivative to signal).

07

PPG & cardiovascular

Heart rate (HR) via peak detection on the IR PPG channel. RMSSD, SDNN, pNN50 from R-R interval series in a 60-second rolling window. LF/HF ratio (sympathovagal balance) via Lomb-Scargle periodogram on the R-R series (LF: 0.04–0.15 Hz, HF: 0.15–0.4 Hz). SpO₂ estimate from red/IR ratio. Respiratory rate from HF peak. Baevsky stress index from HRV histogram. Perfusion index (pulsatile AC / DC amplitude).

08

Composite cognitive scores

Six 0–100 composite scores derived from weighted linear combinations of normalised spectral and complexity features. Coefficients trained by linear regression against a labelled dataset of N-back (focus), Stroop colour-word (cognitive load), eyes-closed rest (relaxation), guided mindfulness audio (meditation), passive video viewing (engagement), and post-wakefulness protocol (drowsiness). Mood index: log-transformed FAA. IMU metrics: head pitch/roll, stillness (inverse angular velocity), and nod/shake event counts.

ZUNA Embeddings

Encoder architecture

ZUNA (Zero-latency Universal Neuro-Annotation) is a 1-D depthwise-separable convolutional encoder designed to run in under 5 ms on CPU (CoreML on macOS, ONNX Runtime on Linux/Windows) so embedding generation never becomes a pipeline bottleneck. Input shape: [4 channels × 1280 samples].

LayerOutput shapeNotes
DWSConv1D × 464 × 80kernel 7→5→5→3, stride 2, ReLU, LayerNorm
Global avg pooling64temporal mean
Dense + LayerNorm128ReLU
Linear projection32no activation
L2 normalisation32unit-norm output embedding

Total encoder parameters: 186 K. Full autoencoder (used for training only): 1.2 M.

Training

Training dataset: 42,000 labelled 5-second epochs from 38 healthy adult subjects across 8 cognitive-state conditions recorded with Muse 2 headsets. Contrastive objective: NT-Xent loss (temperature τ = 0.07, batch size 512) — epochs with the same label are attracted, different-label epochs repelled in the 32-D sphere. Optimiser: AdamW (lr = 1×10⁻³, cosine decay, 100 epochs). Label conditions: N-back (2-back, 3-back), Stroop colour-word, eyes-closed rest, guided mindfulness, passive video, post-wake drowsiness, motor imagery.

Text projection (natural-language search)

A two-layer MLP is trained jointly to project BERT-base embeddings of label-name strings into the 32-D EEG space (mean squared error loss). This allows the search command and API to accept arbitrary natural-language queries — e.g. "calm, focused, low anxiety" — without requiring the user to provide example epochs.

HNSW index

Embeddings are inserted into an hnswlib HNSW index (M = 16, ef_construction = 200, cosine metric) immediately after generation. The index is serialised to ~/.skill/hnsw_index.bin and loaded at startup. Query time is O(log N) — measured at <1 ms for N = 10,000 on M1. The search command returns neighbours with timestamps, labels, and the aggregate analysis (distance stats, top days, temporal distribution).

Sleep Staging

Each 30-second epoch is classified against AASM (2007/2017) guidelines using a rule-based decision tree operating on the band-power ratios and temporal features computed by the main pipeline. Because Muse headsets provide only frontal (AF7, AF8) and temporal (TP9, TP10) electrodes, occipital alpha and central EEG features are approximated.

StagePrimary rule(s)Proxy approach
WakeDominant α; high γ; high artefact rateTP9/TP10 α > 0.35 rel. power; blink rate > 8/min; γ > 0.06 rel.
N1α attenuation; θ emergence; slow eye movementsα drops 30% from wake baseline; θ/α > 1.2; frontal DC shift detected
N2θ dominance; sleep spindles (11–16 Hz); K-complexesmatched filter (0.5–1.5 s, 11–16 Hz burst); K-complex template on AF7/AF8
N3δ > 20% spectrum; high amplitude slow wavesrel_delta > 0.20; absolute δ > 75 µV²; Higuchi FD < wake-baseline × 0.7
REMMixed-frequency low-amplitude; sawtooth waves; no spindlesDFA exponent shift; θ bursts; low δ; spindle detector suppressed; low artefact

The sleep command returns a per-epoch hypnogram array alongside a summary (total epochs, stage breakdown in count and minutes) and an analysis object with efficiency, onset latency, REM latency, transition count, awakening count, and per-stage bout statistics (count, mean duration, max duration).

Limitation: without occipital or central electrodes, classification is an approximation. Do not use for clinical diagnosis. See the Limitations section.

Dashboard Windows

The SvelteKit frontend communicates with the Rust backend over Tauri IPC. All panels update from the eeg-bands event stream at ~4 Hz. Each window can be undocked, resized, or pinned to any monitor.

Live Bands

Real-time stacked bar chart of relative band power (δ/θ/α/β/γ/γ+) per electrode. Each bar is coloured by dominant band with a smooth exponential moving average (τ = 0.5 s) to reduce flicker. The dominant band for each channel is displayed as a symbol (δ/θ/α/β/γ) with its frequency range.

Signal Quality

Anatomical electrode head diagram (SVG) with per-electrode quality rings. Ring colour transitions green → yellow → red as quality falls. Quality is derived from the high-frequency noise floor (SNR), electrode contact impedance estimate, and artefact rate. Hover tooltip shows numeric quality 0–1.

Composite Scores

Six circular gauge dials for Focus, Relaxation, Engagement, Meditation, Cognitive Load, and Drowsiness (0–100). Each dial has a trend arrow (↑/↓/→) comparing current value to the 60-second rolling mean. A 7th panel shows mood (FAA-derived) on a positive–negative axis.

Brain Nebula™

Threlte (Three.js) scene rendering the latest UMAP result as two-colour point clouds (session A: indigo, session B: emerald). Mouse-drag rotates the scene; scroll zooms. Labels appear as floating text anchors. The cluster analysis panel (right sidebar) shows separation score, centroid positions, intra-spread, and outlier count. Recompute button queues a new projection job.

Sleep Hypnogram

Horizontal timeline of sleep stages across the selected session window. Colour-coded bands (Wake: amber, N1: sky, N2: blue, N3: indigo, REM: violet). Summary bar below shows efficiency %, sleep onset, REM latency, total hours. Stage breakdown pie chart. Hover any segment for epoch timestamp and duration.

Session Compare

Side-by-side table of all 60+ metrics for two sessions (A and B). Each row shows A value, B value, absolute delta, percentage change, and a directional arrow. Rows sortable by delta magnitude. Filter to show only improved or only declined metrics. Compare triggers an automatic Brain Nebula™ recompute.

Labels

Chronological list of all annotations across all sessions, with full-text search and date filter. Each entry shows the label text, timestamp, and nearest 5-second epoch metrics (focus, relaxation, HR). Inline edit and delete. Clicking any label jumps to that moment in the Bands and Scores windows.

Metrics History

Line chart of any metric over time, selectable from a dropdown of all 60+ fields. X-axis spans selectable range (today, 7d, 30d, all). Multiple metrics can be overlaid on dual Y-axes. Export to CSV from the chart toolbar. Hover shows value and timestamp tooltip.

WebSocket API

The server binds to ws://127.0.0.1:8375 exclusively. Any number of clients can connect simultaneously; all receive the same broadcast stream. Commands are JSON objects sent from client to server; responses arrive on the same connection. Full schemas and example payloads are in the API reference ↗.

Broadcast events (server → all clients)

EventRateKey fields in payload
eeg-bands≈4 Hztimestamp, channels[4] (per-electrode δ/θ/α/β/γ absolute + relative powers, dominant band), faa, tar, bar, tbr, dtr, coherence, pac_theta_gamma, laterality_index, mu_suppression, pse, apf, bps, snr, sef95, spectral_centroid, Hjorth (activity/mobility/complexity), permutation_entropy, higuchi_fd, dfa_exponent, sample_entropy, focus_score, relaxation_score, engagement_score, meditation, cognitive_load, drowsiness, mood, hr, rmssd, sdnn, pnn50, lf_hf_ratio, respiratory_rate, spo2_estimate, perfusion_index, stress_index, blink_count/rate, jaw_clench_count/rate, head_pitch/roll, stillness, nod/shake counts
muse-status≈1 Hzstate (connected/disconnected/retrying), battery %, name, serial, MAC, firmware, hardware, preset, channel_quality (0–1 per electrode), sample_count, ppg_sample_count, retry_attempt, retry_countdown_secs, accelerometer [x,y,z], gyroscope [x,y,z], temperature

Request-response commands (client → server)

CommandKey paramsReturns
statusdevice, session, embeddings, signal_quality, scores (all 60+), 48h sleep summary, history (streak, averages)
sessionsArray of { start_utc, end_utc, n_epochs, day } newest-first
labeltext, label_start_utc?label_id
searchstart_utc, end_utc, k?query_count, results (per-epoch neighbour list), analysis (distance stats, top_days, temporal_dist, neighbour_metrics)
comparea_start_utc, a_end_utc, b_start_utc, b_end_utca metrics, b metrics, sleep_a, sleep_b, insights (deltas, improved[], declined[]), umap job stub
sleepstart_utc, end_utcepochs[], summary (stage counts), analysis (efficiency, onset/REM latency, transitions, bouts)
umapa_start/end_utc, b_start/end_utcjob_id, estimated_ready_utc, queue_position, estimated_secs, n_a, n_b
umap_polljob_idstatus (pending/running/complete/error), progress %, result: { points[], analysis { separation_score, centroids, outliers } }
exportstart_utc, end_utc, format (csv|json)file path on disk or inline data

All commands are sent as {"command": "...", ...params} and receive {"command": "...", "ok": true, ...data} or {"command": "...", "ok": false, "error": "..."}. See the full API reference and recipes for example code.

Command-Line Interface

cli.ts is a TypeScript program (Node ≥ 18, dependencies: ws, bonjour-service, tsx) that wraps every WebSocket API command in a ergonomic terminal interface.

Auto-discovery

Connection resolution order: (1) explicit --port <n>, (2) mDNS browse for _skill._tcp (5 s timeout), (3) lsof scan for processes named "skill" with TCP LISTEN sockets, probing each port with a 1.5 s WebSocket handshake. Once found, connects with up to 3 retries (1 s delay, 5 s handshake timeout). Global 10-minute timeout prevents hangs.

Session-aware auto-range defaults

When time parameters are omitted, the CLI fetches sessions and picks smart defaults. A rerun: line is always printed for reproducibility.

CommandAuto-selection strategy
searchMost recent session (fallback: last 10 min)
compare≥2 sessions → second-to-last as A, last as B · 1 session → split at midpoint · 0 → last 2 hours halved
sleepAll sessions from the last 24 hours (earliest start → latest end). Fallback: last 8 hours
umapSame as compare (last 2 sessions as A/B)

See the full CLI reference ↗ for all flags, output schemas, and terminal examples. See Recipes → CLI for copy-paste usage patterns.

Use Cases

Attention and cognitive neuroscience research

ResearchEEG

Label N-back and Stroop trials from a Python stimulus script using the WebSocket label command; stream live metrics into a pandas DataFrame; export epochs as CSV for analysis in MNE-Python or EEGLAB. FAA and TAR provide hypothesis-testable asymmetry and engagement markers without per-trial baseline collection. The HNSW search lets researchers identify which historical moments most resemble a target cognitive state — useful for finding within-subject reference epochs.

Sleep research and overnight monitoring

ResearchSleep

Record continuously while sleeping; run the sleep CLI command in the morning for AASM hypnogram, efficiency, onset latency, and REM latency. Compare across nights with the compare command or A/B hypnogram overlay. Export the per-epoch CSV (utc, stage, rel_delta, rel_theta, rel_alpha, rel_beta) for custom analysis. Brain Nebula™ separates REM from NREM embedding clusters visually, providing a sanity check on the staging output.

Real-time neurofeedback

BCINeurofeedback

Subscribe to the eeg-bands stream via WebSocket. Map focus_score or relaxation_score to an audio tone, visual brightness, or haptic intensity using any scripting language. Because latency is ≈125 ms and updates arrive at 4 Hz, the feedback loop is tight enough for operant conditioning protocols. The label command lets researchers annotate reinforcement events for post-hoc analysis. See the focus-alert Python recipe for a minimal threshold-trigger example.

Meditation and mindfulness tracking

WellnessPersonal

Label the start of each meditation session; use search to find which past sessions most closely resemble the current brain state (high alpha, low cognitive load). The compare command quantifies improvements in relaxation and FAA between sessions. The Metrics History window plots meditation score as a trend line across days and weeks. The recording streak counter in status reinforces consistency.

BCI application development

DeveloperBCI

The WebSocket API is language-agnostic. Build a custom BCI app in Python, JavaScript, Swift, Rust, or any language with WebSocket support. Use eeg-bands for real-time input, label for event marking, and search for state-matching triggers. The --json CLI mode is useful for shell-script prototyping before committing to a full API integration. The Brain Nebula™ output (3D point cloud JSON) can be fed directly into matplotlib, Plotly, or R for custom visualisations.

Cognitive load monitoring in education or workplace

AppliedUX research

Monitor cognitive_load and drowsiness during e-learning or long work sessions. Alert when engagement drops below threshold (see the focus-alert recipe). Correlate break timing with HRV (lf_hf_ratio) to optimise recovery intervals. The compare command quantifies cognitive state differences between morning and afternoon sessions, or between task types labelled with the CLI.

Data Storage & Persistence

All user data is stored under ~/.skill/ (macOS/Linux) or %APPDATA%\NeuroSkill™\ (Windows). No data is written outside this directory without an explicit export command.

Directory layout
~/.skill/
  embeddings/
    20260224.sqlite # per-day epoch database 20260223.sqlite
    …
  labels.sqlite # all annotations, all time hnsw_index.bin # hnswlib serialised index umap_cache/
    3_result.json # cached UMAP job outputs …
  exports/ # CSV/JSON exports from the export command preferences.json # notch frequency, overlay prefs, etc.

Epoch database schema (per-day SQLite)

Each YYYYMMDD.sqlite contains one epochs table:

SQL
CREATE TABLE epochs (
  id INTEGER PRIMARY KEY,
  timestamp REAL NOT NULL, -- Unix seconds (float) device_name TEXT,
  embedding BLOB NOT NULL, -- 32× float32, LE rel_delta REAL, rel_theta REAL, rel_alpha REAL,
  rel_beta REAL, rel_gamma REAL,
  focus REAL, relaxation REAL, engagement REAL,
  hr REAL, rmssd REAL, spo2 REAL -- (all 60+ metric columns present; abbreviated here) ); CREATE INDEX idx_timestamp ON epochs(timestamp);

Growth rate

At 4 Hz × ~200 bytes per epoch row + 32-byte BLOB, each hour of recording produces approximately 2.9 MB of SQLite data. A 45-minute session ≈ 2.2 MB. The HNSW index adds ≈0.5 MB per 1,000 epochs (~70 min of recording).

Privacy Model

The WebSocket server binds exclusively to 127.0.0.1:8375 — unreachable from the local network or the internet by default. EEG data, embeddings, labels, and sleep reports never leave the device unless the user explicitly invokes the export command.

The application ships with no analytics SDK, no crash reporter that transmits to external servers, and no license-validation network call. The Tauri shell contains no calls to fetch or any HTTP client outside of the optional update checker (disabled by default).

The mDNS advertisement (_skill._tcp) is a local multicast packet that never leaves the LAN segment. It can be disabled in preferences.json or the dashboard Settings panel. When disabled, the CLI falls back to the lsof port-scan discovery method.

EEG data is a category of sensitive health information. NeuroSkill™'s local-only architecture ensures that institutional IRB protocols requiring on-premises data storage are trivially satisfied — no data processing agreements with cloud providers are necessary.

Validation

63
EEG references
peer-reviewed papers underpinning each metric
42 K
Labelled epochs
38 subjects · 8 cognitive-state conditions
≈125 ms
E2E latency
BLE acquisition → WebSocket delivery (M3 Ultra)
< 4 %
GPU utilisation
idle pipeline on Apple M1 (Neural Engine)
< 1 ms
HNSW query
over 10 000 indexed 5-second epochs
< 15 s
Brain Nebula™ (1 054 pts)
A/B session pair on Apple M1 via wgpu
κ = 0.71
Sleep agreement
Cohen's κ vs PSQI-concordant self-report (N=24)
P@5 = 0.84
ZUNA retrieval
precision at 5 same-label neighbours (hold-out set)
< 1.8 s
App startup
cold start to live stream (M1, index loaded)

Full benchmark methodology, per-metric reference tables, confusion matrices (sleep staging), and per-subject retrieval break-downs are in the paper supplementary materials. Read the paper →

Limitations

Real-time pipeline limited to first 4 channels

The real-time analysis pipeline (ZUNA embeddings, band powers, signal quality, composite scores) is designed for 4-channel inputs to match the Muse headset format. For Cyton (8ch) and Cyton+Daisy (16ch), channels 1–4 drive live analysis; all channels are written to CSV for offline work. Full multi-channel pipeline support is on the roadmap. Other headsets (Emotiv, Neurosity) are not currently supported.

Sleep staging is approximate

Four electrodes at frontal and temporal positions cannot reliably reproduce clinical polysomnography (PSG). N3 may be under-detected in light sleepers; REM may be confused with N1. The system must not be used for clinical diagnosis or to replace a sleep study. κ = 0.71 was obtained against PSQI self-report, not full PSG.

ZUNA trained on a small homogeneous dataset

38 subjects, predominantly healthy adults, single headset model. Embedding quality may degrade for children, elderly users, or clinical populations with atypical EEG morphology. Transfer learning fine-tuning on user-specific data is not yet implemented.

Composite scores are regression-derived, not validated biomarkers

Focus, relaxation, engagement, etc. are weighted combinations of spectral and complexity features regressed against behavioural proxies (task performance, self-report). They are sensitive indices of relative change, not absolute measures. Do not interpret a score of 73 as '73% focused' in any clinical or legal context.

Brain Nebula™ is computationally intensive for large archives

The underlying UMAP projection scales O(N log N). For sessions with > 2,000 epochs each, compute time on M1 exceeds 60 seconds. Very long archives (> 5,000 epochs) may hit the 5-minute CLI timeout. Reducing the session window with --a-start/--b-start is the recommended workaround until an incremental strategy is implemented.

Windows support is experimental

Tauri 2 supports Windows via DX12. BLE connectivity on Windows depends on WinRT APIs which vary across OS versions. The WebSocket API and CLI work reliably on Windows; the BLE pairing flow has been tested on Windows 11 only. BlueZ-based features (Linux) are more mature.

Cite this Work

If you use NeuroSkill™ in your research, please cite:

Nataliya Kosmyna, Eugene Hauptmann. (2026). NeuroSkill™: Proactive Real-Time Agentic System Capable of Modeling Human State of Mind (Version 0.0.55) [Software]. https://arxiv.org/abs/2603.03212
BibTeX
@software{neuroskill2026,
  title     = {{NeuroSkill™}: Real-Time {EXG} Analysis with Neural Embeddings
               for Wearable Brain--Computer Interfaces},
  author    = {Nataliya Kosmyna, Eugene Hauptmann},
  year      = {2026},
  url       = {https://arxiv.org/abs/2603.03212},
  version   = {0.0.55},
  license   = {GPL-3.0},
  note      = {Open-source desktop agentic State of Mind based on Brain Computer Interfaces},
}

DOI and final author list will be updated upon formal publication. Check the repository for the latest recommended citation format.