Avagenc Yori
2026 — An AI agent who finds music on Spotify and plays it for you
01 One song, several Spotify calls
Playing one song on Spotify takes more than one step. Something has to find the song's address, find a device to play on, and start it, and what comes back from one step can change the next. Yori is an AI agent who does those steps when a person asks for music. Behind it is a language model, which on its own only reads text and writes text. It cannot hear what is playing and it cannot press play.
Yori can act because it has eleven tools. A tool is a small Go function the program runs when the model asks for it by name, and each of these calls Spotify. Three find music, two report what is playing and which devices are available, and six control playback.
So answering one request is a loop. The model reads the request, asks for a tool, reads what the tool returns, and decides again, until the request is done and it writes its reply. An error is one more thing to read, so a first try that fails can still end with the song playing. The conversations in the middle column show those tool calls between each request and its reply.
02 What its instruction says
What the model does in that loop is shaped by a written instruction it reads on every request. It is written in Indonesian in Yori's own first person, it opens with "Saya adalah Yori", I am Yori, and most of it is about acting.
Before playing anything, Yori must already have the URI, the address Spotify gives every track and playlist, and the instruction tells it to get that from search_tracks or my_playlists. "Jangan pernah menebak uri", it says, never guess a URI.
Yori may not trust the conversation for what is playing, which playlists exist, or which devices are on, because any of that can change outside the conversation. It calls now_playing or my_devices and looks. Every request to find, play, or change the music has to trigger a tool call, and answering from memory is forbidden.
03 When it said it couldn't
Those rules did not stop Yori from telling people it could not do things Spotify can do. A note committed to the repository on 5 July 2026, written after tracing real conversations down through the tools, records two cases and places each limit in Avagenc's own code, not in Spotify.
The first case was about devices. A device only has to be available, which means Spotify is open on it, and play can start on it when given its ID even if it is not the active one. In the traced conversation my_devices listed a Safari web player as inactive next to another device that was active, and Yori said it could not activate a device. That limit was only words. The description of the play tool, the text the model reads to learn how to use it, nudged the model toward asking the person to open Spotify.
The second case was about playlists. On a song called Kacamata in a playlist named 🌌, Yori said it could play that one track or the whole playlist from the start, and could not start at the song and keep next and previous inside the playlist. Spotify can do this when it receives the playlist and the song together, but the spotify library that the tools call sent one or the other and never both. So Yori described its own tools correctly, and what was missing was in the library.
The fix went into the library, the tools, and the instruction. The library learned to send both, and play gained a context_uri for the playlist. A new transfer_playback tool moves a running session onto an idle device. The instruction gained a paragraph on playing inside a playlist, and its rule on devices now opens with "Perangkat tidak aktif ≠ tidak ada perangkat", an idle device is not a missing one. Yori has to call my_devices and retry play on what it finds, and it asks the person to open Spotify only when that list is empty. The error from a tool still offers both, opening Spotify or checking my_devices, and the description and the instruction decide the order.
The note keeps what Yori said but not what the person typed, so in the conversations below Yori's lines come from the note and the person's lines are written for this page. Under them is the part of the play description that changed, before and after.
- before the fix
- Human: play it on my Safari web player
- Yori: I can't activate a Spotify device myself; you must open Spotify on a device first.
- before the fix
- Human: play Kacamata from my 🌌 playlist, and keep the playlist going after
- Yori: play can only play one track directly, or the whole playlist from the start. I can't start a playlist at a specific track and keep skip next/prev in the playlist context.
Before
- No active device? Spotify can't place the sound; ask the human to open Spotify somewhere, or check my_devices.
After
- No active device? Don't give up and don't ask the human yet. Call my_devices:
if it lists ANY available device, retry play with that device's device_id —
an available device can be idle and still be targeted, no human action needed.
Only ask the human to open Spotify when my_devices comes back empty. To move an
already-playing session onto an idle device while keeping its queue/position,
prefer transfer_playback.04 Use in Avagenc
Yori ships as one Go module that puts those tools and that instruction together, with no server and no users of its own. Its name is fixed in the code, and its description and instruction are files built into the module, so a caller cannot rename it or rewrite who it is. A caller passes only a model, a Spotify client that acts for each person, and any extra instruction to add at the end. Avagenc Chat is the only product importing the module today, and it hands Yori to Avagenc Ava, the lead of the agents, as one of her specialists.
05 Where it stops
Every tool acts for the person who asked, using the permission they gave when they connected Spotify. When a tool says the account is not connected, Yori says so as it is and does not keep trying. Its instruction also keeps it to Spotify music. It does not make or edit playlists and does not handle podcasts, audiobooks, or other music services, and when asked it says so clearly and stops there.
The larger stop is Spotify's. Only Premium accounts can control playback, so when a tool reports that an account is not Premium, Yori passes that on and does not try to get around it. An app stays in development mode, open only to accounts added by hand, until Spotify grants it extended access, which it gives only to organizations with an active service and at least 250,000 monthly users. An individual does not qualify, so Yori stays in development mode.
Avagenc Yori
Turns one request into the Spotify calls it takes, after a fix for saying it couldn't when it could