Remedia

Plugins overview

What plugin hosts are, the two ways Remedia uses them, and how to set one up.

A plugin host exposes application-defined operations. Use one to resolve playable media at playback time or return JSON data such as catalog results. The server operator registers each host and chooses the callable operations.

Applications using a remote Remedia node need only its configured host ID. Direct callers of @remedia/plugin-host own their local host and invoke it without RPC.

Two ways to use a plugin host

Playing audio through a pluginExecuting a plugin operation
What it doesThe server asks the host for audio and plays itYour application asks the host a question and gets JSON back
Typical useA source whose audio URL must be resolved right before playbackCatalog, metadata, or lyrics lookups defined by your application
You callvoice.play({ hostId, pluginId, operation, input })client.plugins.execute({ ... })
ResultAudio decoded and sent to DiscordWhatever JSON the operation returns
GuidePlaying audio through pluginsExecuting plugin operations

Both use the same host, the same server-side allowlist, and the same security rules.

Set one up

  1. Build the host with @remedia/plugin-host: Creating a plugin host.

  2. Register it on the Remedia server and choose which operations are allowed:

    remedia-server plugins install https://plugins.example.com --token-env REMEDIA_PLUGIN_TOKEN

    See Server CLI. Restart the server afterwards.

  3. Use it from your application with @remedia/client.

Registering a host records where it is and what Remedia may run. It never installs or executes plugin code on the Remedia server.

On this page