Redefine Your Focus Strategy: Combat Distractions with Our Game-Changing AI Solution! Effortlessly Orchestrate Your Environment Through Real-Time Gaze Tracking-Experience Zero Cognitive Friction, Enhanced Productivity, and Unmatched Control Over Your Attention!
Attention-aware environment orchestration for deep cognitive flow
A comprehensive system that detects attention states through gaze tracking and orchestrates your entire digital and physical environment to optimize focus, productivity, and cognitive performance.
Artemis is a multi-layered adaptive focus ecosystem that combines:
- Real-time gaze tracking via MediaPipe and EyeTrax integration
- Intelligent environment control across music, lighting, and digital distractions
- Financial incentive system through Visa payment integration
- Chrome tab management with distraction detection
- Adaptive lighting with neuroergonomic presets
- Flow state orchestration with 4-phase cognitive model
The system creates a seamless, invisible layer of environmental adaptation that responds to your cognitive state in real-time.
graph TB
A[🧠 Artemis Core<br/>Electron + React + TypeScript] --> B[🎵 Music Controller<br/>Spotify Web API]
A --> C[💡 Lighting System<br/>WiZ/LIFX Integration]
A --> D[🌐 Chrome Monitor<br/>DevTools Protocol]
A --> E[👁️ Gaze Tracker<br/>MediaPipe + EyeTrax]
B --> G[🎧 Spotify<br/>Real-time Audio Control]
C --> H[💡 Smart Lights<br/>Adaptive Illumination]
E --> J[📱 Chrome Browser<br/>Tab Management]
F --> K[📹 Webcam<br/>Eye Tracking]
style A fill:#A7C7E7,stroke:#333,stroke-width:3px
style B fill:#1DB954,stroke:#333,stroke-width:2px
style C fill:#FF6B35,stroke:#333,stroke-width:2px
style D fill:#1A1F71,stroke:#333,stroke-width:2px
style E fill:#4285F4,stroke:#333,stroke-width:2px
style F fill:#FF4081,stroke:#333,stroke-width:2px
| Input | Processing | Output |
|---|---|---|
| 👁️ Gaze Data | 🧠 AI Analysis | 🎵 Music Adaptation |
| 📱 Tab Activity | 🔍 Distraction Detection | 💡 Light Control |
| ⏱️ Focus Time | 💳 Micro-transactions | |
| 🎯 Attention State | 🔄 State Machine | 🌐 Environment Sync |
| Component | Status | Technology | Description |
|---|---|---|---|
| 🧠 Artemis Dashboard | ✅ Active | Electron + React + TypeScript | Glassmorphic desktop app with gaze tracking |
| 🎵 Music Controller | ✅ Active | Python + Spotify API | Real-time audio adaptation |
| 💡 Lighting System | ✅ Active | Python + WiZ/LIFX | Neuroergonomic light control |
| 🌐 Chrome Monitor | ✅ Active | Chrome DevTools Protocol | Intelligent tab management |
| 🔄 Orchestration | ✅ Active | Python + AsyncIO | Central event coordination |
Glassmorphic Electron desktop application with real-time gaze tracking and environment orchestration.
- ✅ MediaPipe + EyeTrax integration for precise gaze tracking
- ✅ 4-phase state machine (Calibration → Engagement → Flow → Cooldown)
- ✅ Chrome DevTools Protocol integration for tab monitoring
- ✅ Real-time metrics overlay with attention analytics
- ✅ Adaptive UI that responds to cognitive state
- ✅ Session logging and performance tracking
Electron 38 + React 18 + TypeScript
├── TailwindCSS (glassmorphic design)
├── Framer Motion (smooth transitions)
├── MediaPipe Tasks Vision (gaze tracking)
└── Chrome DevTools Protocol (browser integration)
📍 adaptiveLights/adaptiveLights.py |
Real-time Spotify Web API control tied to focus modes with intelligent audio transitions.
- ✅ Smooth crossfades and timed volume ramps — no abrupt cuts
- ✅ Intelligent mode persistence with automatic re-authentication
- ✅ Lightweight threaded polling for fast, responsive transitions
- ✅ Focus-based playlist switching and ambient sound control
- ✅ Volume scaling based on engagement level
Spotify Web API + OAuth2 Authentication
├── Real-time playback control
├── Queue management
└── Adaptive audio based on cognitive phase
📍 adaptiveLights/adaptiveLights.py
Universal WiZ-compatible light controller with research-based neuroergonomic presets.
Features:
- ✅ WiZ-compatible driver (UDP/HTTP shell hooks)
- ✅ Neuroergonomic presets for Deep Focus, Flow, Break, and Fatigue phases
- ✅ Research-based fades using easing and gamma-aware interpolation
- ✅ Robust failsafes — stale-state detection, recovery, and safe no-ops
- ✅ Color temperature adaptation based on time of day and focus state
Presets:
- Deep Focus: Cool white (6500K), 80% brightness
- Flow State: Neutral white (4000K), 90% brightness
- Break Time: Warm white (2700K), 60% brightness
- Fatigue Recovery: Soft amber (2200K), 40% brightness
📍 Artemis/src/services/ChromeMonitor.ts
Intelligent distraction detection and tab control using Chrome DevTools Protocol.
Features:
- ✅ Chrome DevTools Protocol (CDP) integration
- ✅ Real-time tab enumeration with metadata extraction
- ✅ Distraction detection heuristics based on titles and URLs
- ✅ Safe-close logic with activity logging and subprocess cleanup
- ✅ "Focus Lock" protection to prevent accidental tab purges
- ✅ Content analysis for intelligent tab categorization
Capabilities:
- Lists all tabs with metadata (title, URL, favicon)
- Extracts page content (headings, text, code blocks)
- Tracks tab activity (time spent, last active, network status)
- Provides snapshot API for complete Chrome state
📍 main.py
Asynchronous event bus linking all focus signals to environmental controls.
Features:
- ✅ Central event bus linking focus signals → music, tabs, and lights
- ✅ Full asynchronous orchestration — concurrent, non-blocking actions
- ✅ Debounce + hysteresis filters to prevent rapid mode oscillation
- ✅ Deterministic sequencing for synchronized ambient changes
- ✅ Error recovery and graceful degradation
| Requirement | Version | Status |
|---|---|---|
| 18+ | Required | |
| 3.8+ | Required | |
| Latest | Required | |
| API Access | Required | |
| Compatible | Optional |
cd Artemis
npm install
npm run devcd adaptiveLights
pip install -r requirements.txt
python adaptiveLights.py# Terminal 1: Artemis
cd Artemis && npm start
# Terminal 2: Music Controller
cd adaptiveLights && python adaptiveLights.py
# Terminal 3: Payments (optional)
cd payments-service && pnpm dev| Step | Action | Result |
|---|---|---|
| 1️⃣ | Launch Artemis | Glassmorphic UI appears |
| 2️⃣ | Enable Gaze Tracking | Camera activates, calibration begins |
| 3️⃣ | Connect Services | Spotify, lights, and Chrome integrate |
| 4️⃣ | Start Focus Session | Environment adapts to your attention |
stateDiagram-v2
[*] --> Calibration: System Start
Calibration --> Engagement: Gaze Stabilizes
Engagement --> Flow: Deep Focus Achieved
Flow --> Cooldown: Fatigue Detected
Cooldown --> Calibration: Ready for Next Session
Cooldown --> [*]: Session End
note right of Calibration
High saccade rate
Dispersed gaze
Reduce visual clutter
end note
note right of Engagement
Gaze clusters form
Dispersion decreases
Play ambient tone
end note
note right of Flow
Fixation stability > threshold
Blink rate decreases
Lock distractions
end note
note right of Cooldown
Blink rate increases
Saccade rate increases
Fade out music
end note
| From | To | Trigger | Response |
|---|---|---|---|
| 🔄 Calibration | 🎯 Engagement | Gaze clusters form, dispersion ↓ | Play ambient tone, adaptive music |
| 🎯 Engagement | 🧠 Flow | Fixation stability > threshold | Lock distractions, neutral lighting |
| 🧠 Flow | 😴 Cooldown | Blink rate ↑, saccade ↑ | Fade music, brighten lights |
| 😴 Cooldown | 🔄 Calibration | Ready for next session | Reset environment, prepare UI |
"Calm Intelligence" — The system should feel invisible — calm, ambient, and responsive.
- Glassmorphic UI with backdrop blur (
blur(20px)) - Dark theme with
#0D0D0Dbackground - Arctic blue accents (
#A7C7E7) and soft lavender - SF Pro Display typography with Inter fallback
- Smooth fade transitions (0.8s-1.2s) using Framer Motion
- 8pt grid rhythm for consistent spacing
- Single-column layout with center alignment
- Fade transitions only — no pops or bounces
- Large white space for cognitive clarity
- State-responsive UI that adapts to focus phases
Artemis:
# Chrome DevTools
CHROME_DEBUG_PORT=9222
# Spotify Integration
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
SPOTIFY_REDIRECT_URI=http://localhost:3000/callback
# Lighting Control
WIZ_LIGHT_IP=192.168.1.100
LIFX_TOKEN=your_lifx_tokentimestamp_start- Session initiation timephase_transitions- Cognitive state changesfixation_stability_avg- Average focus consistencyblink_rate_trend- Fatigue indicatorsflow_duration- Time in optimal focus stateenvironmental_changes- Music, lighting, and tab adjustments
- Focus Score - Composite metric of attention quality
- Flow Duration - Time spent in optimal cognitive state
- Distraction Recovery - Speed of returning to focus
- Environmental Effectiveness - Impact of adaptations
- Enhanced gaze tracking accuracy
- Improved Chrome tab categorization
- Better error handling and recovery
- Philips Hue integration
- Slack/Discord status control
- Raspberry Pi phone blocking
- Calendar integration for focus scheduling
- Machine learning for personalized adaptations
- Predictive focus state modeling
- Intelligent playlist generation
- Advanced distraction detection
- Focus leaderboards
- Shared focus sessions
- Community pool management
- Advanced payment flows
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE for details.
- MediaPipe for gaze tracking capabilities
- Spotify for music API integration
- WiZ for smart lighting control
- Chrome DevTools Protocol for browser integration