Skip to content

Plugin System

PRX supports a WebAssembly (WASM) plugin system that allows extending agent capabilities without modifying the core codebase. Plugins run in a sandboxed WASM runtime with controlled access to host functions.

Overview

The plugin system provides:

  • Sandboxed execution -- plugins run in WASM with memory isolation
  • Host function API -- controlled access to HTTP, filesystem, and agent state
  • Hot reloading -- load and unload plugins without restarting the daemon
  • Multi-language support -- write plugins in Rust, Go, C, or any language that compiles to WASM

Plugin Types

TypeDescriptionExample
Tool pluginsAdd new tools to the agentCustom API integrations
Channel pluginsAdd new messaging channelsCustom chat platform
Filter pluginsPre/post-process messagesContent moderation
Provider pluginsAdd new LLM providersCustom model endpoints

Quick Start

bash
# Install a plugin from a URL
prx plugin install https://example.com/my-plugin.wasm

# List installed plugins
prx plugin list

# Enable/disable a plugin
prx plugin enable my-plugin
prx plugin disable my-plugin

Configuration

toml
[plugins]
enabled = true
directory = "~/.local/share/openprx/plugins"
max_memory_mb = 64
max_execution_time_ms = 5000

[[plugins.registry]]
name = "my-plugin"
path = "~/.local/share/openprx/plugins/my-plugin.wasm"
enabled = true

Released under the Apache-2.0 License.