@meetopenbot/spotify
v0.0.1
Published
Spotify agent plugin for OpenBot
Readme
Spotify OpenBot Plugin
An "agent kind" plugin for OpenBot that suggests Spotify playlists based on natural language input.
Features
- Natural Language Search: Suggests playlists based on user mood, activity, or genre.
- Rich UI: Displays playlists in a clean list widget with images and direct links to Spotify.
- Agent Kind: Acts as a standalone agent runtime within OpenBot.
Configuration
To use this plugin, you need to provide your Spotify API credentials and an OpenAI API key. You have three ways to do this:
- Agent Configuration: Add them to your
AGENT.mdor via the OpenBot UI:{ "plugins": [ { "id": "@meetopenbot/spotify", "config": { "clientId": "YOUR_SPOTIFY_CLIENT_ID", "clientSecret": "YOUR_SPOTIFY_CLIENT_SECRET", "openaiApiKey": "YOUR_OPENAI_API_KEY" } } ] } - Environment Variables: Set
SPOTIFY_CLIENT_ID,SPOTIFY_CLIENT_SECRET, andOPENAI_API_KEYin your environment. - Interactive Setup: If no keys are found, the agent will automatically present a form in the chat to collect and save them securely as OpenBot variables.
How it works
The plugin uses the Vercel AI SDK to provide a smart conversational experience.
- Intent Extraction: When you send a message, an LLM (GPT-4o) analyzes your intent, mood, or activity.
- Tool Calling: The AI uses a
searchPlayliststool to query the Spotify Web API with optimized search terms. - Conversational Response: The AI explains why it chose specific playlists and presents them in a rich
listwidget.
