your mind, in tune. A privacy-first brain-computer interface for AI agents. A Muse headband + a Mac app teach your tools — Claude, Cursor, custom MCP clients — when you're focused and when to back off. Raw EEG never leaves your Mac.
Resona stops guessing. It reads your focus state from a Muse headband, locally, and tells your AI agents when to back off. Notifications hush. The Coach speaks slower. The Skeptic stops second-guessing your flow state. Two interlocking waves — brain and agent — meet at a single luminous point: phase lock, not noise on top.
4 EEG channels (TP9/AF7/AF8/TP10) → bandpass + Welch FFT → α/β/θ/δ/γ powers → Focus Coefficient F = β/α. End-to-end under 500 ms. Plotted with Swift Charts in real time.
60 s eyes-open + eyes-closed wizard saves your baseline (mean F, std F) to ~/.nao/baseline.json. All labels are user-relative — your "deeply focused" is your number, not a population average. Stale past 7 days; the app nags you to redo it.
Start / Stop with a label (deep_work / reading / meditate / meeting / sleep / custom) + notes. Every frame appended to ~/.nao/sessions/<id>.jsonl. A dedicated Sessions tab lists them sortably and opens a detail view: focus timeline with biggest-drop pinned, frontal-asymmetry chart, per-quartile means, slope, calibration z-score, and delta vs prior sessions of the same label.
Ask "where did I lose focus in this two-hour study?" or "how did this compare to my reading sessions?" The local LLM answers with citations to real numbers from your actual recording — current FocusFrame, recent trend, per-channel quality, and a session-scoped digest are auto-injected. Forbidden from fabricating numbers.
Frontal alpha asymmetry (Davidson, AF8 vs AF7) for approach/withdrawal valence + arousal index (β + γ) / α for activation. A defensible 2-axis emotional read — without over-claiming that 4 dry electrodes can classify discrete emotions.
Muse PPG → bandpass + peak detection → heart_rate_bpm (±2 bpm at rest) and hrv_rmssd parasympathetic proxy. Two independent physiologies at once — "calm brain, racing heart" is visible instead of averaged into one number.
Frontal-γ reward-spike detector with Welford rolling baseline, refractory + warmup gates, artifact-clean frames only. Surfaces a caution flag when an agent is about to affirm something you're already rewarding — a brake on flattery loops.
Pure-logic FSM (OPEN ↔ QUIET) exposed to cooperating agents via should_interrupt(urgency). 12 s clean engaged-or-better → QUIET; 8 s sub-engaged → OPEN; persistent bad contact forces fail-open. Drives macOS Focus on edge transitions through user-installed Shortcuts.
Accelerometer (gravity deviation) + gyroscope (angular velocity, > 60 °/s) + EEG quality flags (BLINK / JAW / BAD_CONTACT) gate every frame. Dirty windows label uncertain — agents must not act. When a sensor lifts off your mastoid, the app tells you which channel and how to reseat it.
A single MCP server — nao-mcp — exposes the brain. Wire it into Claude Desktop, Cursor, or your own MCP client and your tools start asking before they interrupt.
Tools the agent gets:
get_user_cognitive_load() — single label (deeply_focused · engaged · neutral · resting · uncertain).get_current_brain_state() — full FocusFrame with band powers, per-channel α/β/γ, frontal-F, asymmetry, arousal, heart rate, HRV, latency.get_focus_history(seconds) — recent labeled trend.should_interrupt(urgency) — Gatekeeper's verdict before pinging you.get_appraisal_state() — Skeptic's caution flag + cooldown when frontal-γ just spiked.get_queued_pings() — what agents have parked while you're in QUIET.get_calibration() — your personal F baseline + age in days + is_stale.:8765); local models optional (Ollama). The Coach can run entirely offline.
brew install ollama).After install, the menu-bar app lives at /Applications/NaoBrain.app and the sidecar runs under launchd (~/Library/LaunchAgents/com.nao.sidecar.plist, RunAtLoad + KeepAlive). You run zero commands; the brain comes up with the Mac.
AI tools are too eager. Calendars don't know when you're thinking. Focus modes are crude — on/off, not continuous, not personal. Wearables tell you about your day; they don't change it.
The other lever — coaching the user — has been done to death. Resona coaches the user's agents instead. A brain-computer interface for the rest of your stack.