Introduction

DeepSeek Harness (DSH) supports extending the usage of the harness via plugins. In existing approaches, environmental audio typically requires manual playback and manual track switching; if you want the audio to follow the agent’s current state, you need to integrate session events into the playback logic.

dsh-plugin-audiolib focuses on a specific task: driving environmental music based on DSH’s session events, using AudioLib.ai as the audio source, and avoiding hard cuts in the middle of the currently playing track.

What is it

dsh-plugin-audiolib is a plugin for DeepSeek Harness, maintained by yangyue1974, and is licensed under the MIT license.

Its one-sentence positioning is: providing DSH with agent-state-driven environmental background audio, using AudioLib.ai as the audio source. AudioLib.ai provides 100,000+ fully-cleared tracks, with each track corresponding to a single API call.

Core Features

  • Drives environmental music based on the agent’s session events (turn open/close).
  • State changes do not interrupt the currently playing track; playback stops only when explicitly calling music_stop().
  • Provides three tools: music_play(library), music_stop(), and music_status().
  • Supports URL streaming players like mpv/ffplay; when these players are absent, it falls back to macOS afplay and pre-downloads tracks.
  • The API key is stored in the DSH credential store: ~/.dsh/.credentials.yaml, with a file mode of 600; it is not written to configuration files.
  • Temporary failures (network, 5xx, timeout, rate limiting) will retry with backoff; it pauses on bad keys, exhausted quotas, missing players, or unreadable responses.
  • Closes the player and deletes temporary files when the plugin is uninstalled.

Installation and Activation

DSH uses pnpm to manage profile plugins; a missing pnpm will cause a rejection. First, enable pnpm, then add the plugin in the web profile:

corepack enable pnpm
npx @deepseek-ai/dsh plugin --profile web add dsh-plugin-audiolib

After adding, restart DSH:

npx @deepseek-ai/dsh web

Open Settings → Plugins → Plugin configuration and paste the AudioLib API key into the AudioLib soundtrack card. The key will be stored in the DSH credential store and will not be written to configuration files.

If you prefer using environment variables, you can also set it up like this:

export AUDIOLIB_API_KEY=alp_your_key

Here, two prerequisites need to be noted:

  • A valid AudioLib API key is required; the free quota is 300 requests/month.
  • Node engines require ^22.19 || >=24.

Typical Usage

If you want to specify the working/idle library, you can override it in the profile’s cordis.patch.yml:

- id: audiolib
  name: dsh-plugin-audiolib
  config:
    workingLibrary: audio.focus
    idleLibrary: audio.ambient

The library pickers in the card are currently read-only; to set libraries, use the profile’s cordis.patch.yml.

If you want to play tracks in a streaming manner, it is recommended to install mpv or ffplay:

brew install mpv
# or: apt install mpv

When there is no streaming player, afplay will pre-download each track; this is a usable fallback but may stall when switching libraries mid-way.

The plugin provides three tools:

  • music_play(library): Plays the specified library.
  • music_stop(): Stops playback.
  • music_status(): Queries the playback status.

Use Cases and Notes

It is suitable for users using the DSH web profile who want to automatically switch environmental audio based on the agent’s session state. It does not decide for you whether the music is appropriate; it only maps session events to AudioLib libraries and provides explicit tools for playback, stopping, and status querying.

Before using, the following should be noted:

  • The plugin runs with the permissions of the current DSH process; it is recommended to check the source code, dependencies, and license before installation.
  • A valid AudioLib API key is required; the free quota is 300 requests/month.
  • Temporary failures will retry with backoff; it pauses on bad keys, exhausted quotas, missing players, or unreadable responses.
  • The library pickers in the card are currently read-only; to set libraries, use cordis.patch.yml.
  • It is recommended to use mpv or ffplay to support streaming playback; the afplay fallback will download each track and may stall when switching libraries mid-way.
  • Node engines require ^22.19 || >=24.
  • The license is MIT; the maintainer is yangyue1974.

Conclusion

The value of dsh-plugin-audiolib lies in converting the session state of DeepSeek Harness into non-intrusive environmental sound: turn open/close drives the music state, state changes do not hard-cut the currently playing track, and it retains explicit control tools like music_play, music_stop, and music_status.

GitHub: dsh-plugin-audiolib

The community directory page is an independent site with no official affiliation to DeepSeek/QuantStudio; this article has verified the information but did not provide a specific directory page URL. When searching, you can use the plugin name dsh-plugin-audiolib.