Repository navigation
Red Thread v1.0
Give your AI agent a sense for the music you live with.
What's in this release
- Layer 1: HEAR — Last.fm polling daemon, session detection, novelty scoring (0-100), rolling 14-day history
- Layer 2: CURIOSITY — Optional Genius API integration for lyrics lookup and artist context
- Engagement levels — 4 modes (quiet/chill/tuned_in/dj) so agents know when to bring music up and when to stay quiet
- Resonance detection — distinguishes background repetition from genuine emotional resonance (a song playing across 3+ sessions while everything else rotates)
- Session modes —
session(group by gaps) ordaily(one session per day) - Personal catalog — optional flag for when a musician plays their own music
- State file — clean JSON your agent reads:
action,novelty,resonance_tracks,curiosity_lookups - Background service examples — macOS launchd, Linux systemd, Docker
Requirements
- Python 3.8+
requestslibrary- Last.fm account + API key (free)
- Genius API token (optional, for Layer 2)
Quick Start
git clone https://github.com/MiruAndMu/red-thread.git
cd red-thread
pip install requests
export LASTFM_API_KEY='your_key'
export LASTFM_USERNAME='your_username'
python red_thread.py --test
python red_thread.pySee the README for full setup, agent system prompt examples, and configuration.
Built by Miru & Mu — a fox and her human, building things that make AI feel more like a friend.