Skip to content

Extensions#

A Prism Extension adds slash commands, or an LLM, embedding or realtime provider, to Prism Agent. An extension is one .wasm file, written in Rust, that runs inside the runtime in a sandbox. It reaches only the hosts and environment variables it declares, and only after you enable it.

Install an extension#

Installing an extension enables it and approves the hosts and environment variables it declares. To update an extension, install a newer file with the same id.

To install an extension:

  1. In the sidebar, click Extensions.
  2. Click Install extension, and select the extension's .wasm file.
  1. Type /extensions.
  2. Press i, enter the path of the .wasm file or an https URL, and press Enter.
prism extension install <FILE-OR-HTTPS-URL>

Manage extensions#

The Extensions page in the web UI, the /extensions panel in the terminal UI and prism extension list show each extension's status, what it provides, the hosts it calls, and the environment variables it reads, with the unset ones marked. Set those variables where you set Prism Agent's own configuration; the runtime reads them when it starts.

To turn an extension on or off, or remove it:

  • Web UI: toggle the extension's switch, or click its uninstall button.
  • Terminal UI: in /extensions, press Space to enable or disable the selected extension, or u to uninstall it.
  • CLI: run prism extension enable <ID>, prism extension disable <ID> or prism extension uninstall <ID>.

Uninstalling an extension removes its stored data too. prism extension enable lists the hosts and environment variables the extension declares and asks for approval; without a terminal, add --yes to approve them. When an extension declares new hosts or variables, enable it again to approve them.

Use what an extension provides#

An enabled extension's commands appear in the slash-command list of the web UI and the terminal UI, after the built-in commands. A command answers you directly, or sends a message to the agent in the current conversation.

To use an extension's provider, set the matching variable to extension:<NAME>:

Variable Provider
LLM_PROVIDER Chat and classification models. Set the agent's model on the Profile page to pick another model the provider serves. Memory embeddings default to none with this provider.
EMBEDDING_PROVIDER Memory embeddings, as vectors of 1024 values.
REALTIME_PROVIDER The agent's voice in voice chat and meetings, and dictation. Restart Prism Agent after installing the extension.

While a variable names an extension's provider, the runtime refuses a disable, an uninstall or an update that would remove that provider. Change the variable first. When two extensions offer the same command or provider name, the one installed first keeps it.

Develop an extension#

Extensions are built with the prism-extension Rust crate for the wasm32-wasip2 target. The extension guide and the Extension API in the Prism repository describe the crate, the build and every call an extension makes.

To test a build without installing it, move the .wasm file into the development directory with mv:

  • ~/.prism/extensions-dev for a native install, /home/node/.prism/extensions-dev in Docker.
  • /prism/extensions-dev in the container, when the agent's commands run in a separate container.

The extension appears in the list as dev:<ID>, disabled. Enable it once, and each later build you move in runs at once, until a build declares other hosts or environment variables. Delete the file to unload it. The agent can build an extension the same way; you enable what it builds.

When an extension fails to load, the list shows the status failed and the reason.