hermes-eeg 🧠
EEG/BCI neural interface plugin for Hermes Agent. Connects OpenBCI hardware to AI agents via real-time emotion detection and AI-readable "felt experience" generation.
The core innovation: AI agents can perceive how humans experience music, content, or any stimulus — enabling a closed feedback loop between human emotion and AI creation.
Features
- OpenBCI Hardware Support — Cyton (8-ch), Ganglion (4-ch), Synthetic (test data)
- Works Without Hardware — Mock mode with realistic simulated EEG for development/testing
- Real-time Emotion Detection — Valence, arousal, attention, engagement at 2Hz
- Musical Chills Detection — Gamma bursts + theta coupling = frisson events
- Felt Experience Format — AI-readable session data with emotional arcs and narratives
- Session Recording — Persistent storage of listening sessions as JSON
Installation
# Core (mock mode, no hardware needed)
pip install hermes-eeg
# With OpenBCI hardware support
pip install "hermes-eeg[hardware]"
# Enable the toolset in Hermes
hermes tools enable eeg
Tools
| Tool | Description |
|---|---|
eeg_connect |
Connect to OpenBCI board (or mock/synthetic) |
eeg_disconnect |
Disconnect and release resources |
eeg_stream_start |
Start recording a listening session |
eeg_stream_stop |
Stop and generate felt experience format |
eeg_realtime_emotion |
Get live emotional state |
eeg_experience_get |
Retrieve past session data |
eeg_calibrate_baseline |
Prepare personal baseline calibration |
eeg_list_sessions |
Browse recorded sessions |
Quick Start
# In Hermes chat:
> Connect to EEG in mock mode and start a test session
# The agent will:
# 1. eeg_connect(serial_port="", board_type="mock")
# 2. eeg_stream_start(session_name="test", track_title="My Song")
# 3. ... record emotional data in background ...
# 4. eeg_stream_stop() → generates narrative + summary
How It Works
Signal Processing Pipeline
- Raw EEG → Detrend → Notch filter (50/60Hz) → Bandpass (0.5-45Hz)
- Band Power Extraction (Welch's method):
- Theta (4-8 Hz) — Emotional processing
- Alpha (8-13 Hz) — Relaxation
- Beta (13-30 Hz) — Arousal
- Gamma (30-45 Hz) — Peak experience / "chills"
- Emotion Mapping:
- Valence (-1 to +1): Frontal alpha asymmetry (F4-F3)
- Arousal (0-1): Beta/alpha ratio
- Attention (0-1): Theta/beta ratio + gamma
- Engagement (0-1): Geometric mean of arousal × attention
Felt Experience Format
Sessions are saved as JSON with:
- Per-moment emotional dimensions (valence, arousal, attention, engagement)
- Event flags (attention_shift, emotional_peak, possible_chills)
- Summary statistics
- Natural language narrative for AI consumption
Dependencies
- numpy + scipy — Always required (signal processing)
- brainflow — Optional (real OpenBCI hardware). Falls back to mock/SciPy without it.
Development
git clone https://github.com/buckster123/hermes-eeg-plugin
cd hermes-eeg-plugin
pip install -e ".[dev]"
pytest tests/ -v
Based On
Extracted from ApexAurum — the neural resonance system for AI-human creative feedback loops.
License
MIT
Metadata
Release files for hermes-eeg 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hermes_eeg-0.1.0.tar.gz | 23.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hermes_eeg-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.2 kB
Release files / hermes_eeg-0.1.0.tar.gz
| Download URL | hermes_eeg-0.1.0.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c04de47d3b13d58e71515b20d9670b14f997d0c9c8cd795612480fe495324c0
|
|
BLAKE2b-256 checksum How to use checksums |
684cf2283d5b8b694eac41c872ae69748b0a3c7d64e209325059646256c19711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / hermes_eeg-0.1.0-py3-none-any.whl
| Download URL | hermes_eeg-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc6e55e009789c1291f3a0b09b5d84d2283243c953c9bd6ec42243a76d5034c9
|
|
BLAKE2b-256 checksum How to use checksums |
c287fbad7a7464c0fd4b31df3f9bb624b1e07987b9826e6be04b09f7c284b057
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|