Music & Agentic
rihAI
Moving past genre filters to map how people actually describe their day into a custom Spotify playlist.
- Timeline
- 2024
- Status
- Shipped
- Stack
- Python, Gemini 2.0 Flash, Agno, Spotify API, Streamlit
- Links
- Private build. This page is the record.
- Problem
- Search "happy" and you get generic pop. Real moods are compound: exhausted, but watching the rain and strangely hopeful.
- Bet
- Read the mood from how people write, then choose tracks by acoustic features, not genre.
- Built
- Gemini 2.0 Flash turns a journal entry into a mood vector, a second Agno agent checks the lyrics, and Spotify gets a published playlist.
- Result
- Playlists in about 3 seconds, with 90% positive feedback from 20+ beta users.
Works today
- Journal text to a mood vector
- A published Spotify playlist in about three seconds
- A lyric check that drops songs whose words fight the mood
Limits
- Publishing needs a Spotify account
- Built and wrapped in 2024
Status
Shipped 2024, no public link
A 1-minute read
Type "happy" into Spotify and it gives you the same upbeat pop it gives everyone, but a mood in plain words is rarely one thing: tired, calm and a little bright at once. rihAI reads what you write about your day, turns it into the numbers a music service understands, searches by feel instead of genre, lets a second agent veto any song whose lyrics argue with the mood, and publishes the playlist to your account about three seconds later.
How it works
Write how you feel, in plain words.
Gemini 2.0 Flash maps the text to a mood array: valence, arousal, energy and acousticness.
Spotify is searched for tracks whose acoustic features match.
A second Agno agent reads lyrics and beat and drops tracks whose words fight the mood.
OAuth token routing creates the playlist, fills it and publishes it, in under three seconds.
What I built
Semantic emotion vectors
Gemini 2.0 Flash maps open-ended text into a structured mood array with indicators like valence, arousal, energy and acousticness.
Token-authorised playlisting
A clean OAuth token routing system searches the Spotify API, creates a playlist, fills it and publishes it in under 3 seconds.
Lyrical sentiment guardrails
A secondary Agno agent cross-checks the chosen songs' lyrics and beats to catch mismatches, like an upbeat track with dark lyrics, that would break the playlist's emotional flow.
Decisions
Mood as numbers
Turning prose into valence, arousal, energy and acousticness makes a fuzzy feeling searchable against Spotify's audio features.
A second opinion on lyrics
Acoustic features can't hear words. The guardrail agent catches cheerful songs with sad lyrics before they break the flow.
Speed as a feature
The loop from text to published playlist stays under three seconds, so it feels like a reply, not a job.
Outcome
- 3 sec
- Text to playlist
- 90%
- Positive feedback
- 20+
- Beta users
Stack
Python, Gemini 2.0 Flash, Agno, Spotify API, Streamlit
Keeper of this file
Lofi
Moody by default. Has a playlist for every one of them.
← Poke it
Review
“Mrrp. I wrote "tired but hopeful, also hungry" and got eleven songs that understood me better than the humans do. Four stars. It would not play the fish song.”