Introduction¶
Under DSH’s “everything is a plugin” philosophy, Agents can connect to local tools based on scenarios. For developers, a specific need is: there is a batch of music files on the computer, and the goal is for the Agent to not only provide playback instructions but also search, play, pause, skip songs, and view the current playback status on the web. dsh-music-plugin targets this scenario: it adds a local music toggle to DeepSeek Harness.
What is this¶
syy-shark/dsh-music-plugin is a DSH plugin, named dsh-music-plugin in package.json, version 0.1.0, MIT license, maintained by syy-shark.
It connects songs in the local folder to an interface available to the Agent: The Agent can use tool calls to search for songs, play, pause, resume, skip to the next, and query status. When the plugin is disabled, the sound will also stop.
Core Features¶
The verified plugin capabilities are listed below:
- Search: The Agent can call
music_search. - Play: The Agent can call
music_play. - Pause / Resume: The Agent can call
music_pause/music_resume. - Next: The Agent can call
music_skip. - Status: The Agent can call
music_statusto query what is currently playing. - Queue: Requests during playback will be queued instead of interrupting the current track.
- Audio Output: Uses
afplay; ifmpvis installed, it is preferred, andflacis more stable. - Plugin Reuse: Other DSH plugins can write
inject: ['music']and then callctx.music.play / pause / search.
Installation and Activation¶
-
First, put the songs into a local directory. The default
libraryDiris~/Music. -
Install the plugin. The command provided in the documentation uses a local path:
npx @deepseek-ai/dsh plugin --profile web add /Users/shark/项目/DSH-music-plugin
The documentation does not provide a command for installing from a general repository; if you are not on the same machine or directory, you need to handle it according to the actual local path.
- Start the DSH Web:
npx @deepseek-ai/dsh web
- Open:
http://127.0.0.1:3080
A “Local Music” panel will appear on the right. You can see the playlist, and click Play / Pause / Next; you can also continue to tell the Agent “play xxx”.
Typical Usage¶
- Search: Tell the Agent “find a song”, corresponding to
music_search. - Play: Tell the Agent “play xxx”, corresponding to
music_play. - Pause / Resume: Corresponding to
music_pause/music_resume. - Next: Corresponding to
music_skip. - Query Current: Corresponding to
music_status. - Matching Multiple: The Agent will list the paths; you need to play again using the exact path.
- Development Debugging: You can use
--patchto temporarily mount the source code without writing it to the configuration.
Configuration¶
Configuration is in cordis.yml; reload after changing:
libraryDir: The folder where music files are located, default~/Music.backend: Can be set toauto/afplay/mpv.extensions: File extensions used to identify music files.
Removal¶
npx @deepseek-ai/dsh plugin --profile web remove dsh-music-plugin
Version and Dependencies¶
Relevant information in package.json:
name:dsh-music-pluginversion:0.1.0license:MITpeerDependencies:@deepseek-ai/cordis >=4.0.0@deepseek-ai/dsh-tools *@deepseek-ai/schemastery *
Suitable Scenarios and Notes¶
Suitable for developers who need to control local music within DSH: songs are already in a local folder, and the Agent needs to be able to directly call playback controls, or a simple local music panel is needed on the web interface.
Currently not implemented: NetEase Cloud Music, progress bar dragging, lyrics.
Usage notes:
- The plugin runs with the permissions of the current
dshprocess. - You should check the source code, dependencies, and license before installing.
- The installation command provided in the documentation is a local path; a command for installing from a general repository is not provided.
- The community directory is an independent site, not equivalent to the official app store; do not interpret this as having an official affiliation with DeepSeek or HF.
Related Links¶
- GitHub: https://github.com/syy-shark/dsh-music-plugin
- Directory Page Link: https://www.skillhub.cn/plugins/syy-shark/dsh-music-plugin (Found in clues, did not appear directly in the scraped data)