Skip to content

Write a plugin for PrismR

PrismR is the free Plexus monitor — the operator console and daemon. Its daemon embeds a Python interpreter and acts as a general-purpose plugin host, so you can write a Python module that taps straight into the live bus: forecasting, machine learning, trading signals, or your own algorithmic strategy logic.

This is the open builder path

You get the bus, dispatch, caching, and persistence for free from the Rust host. You write only your logic. It's real — and deliberately the entry-level path. For proven, production edge, the sealed Axon models live at PlexusTraders.com.

Built in Python, reforged in Rust

PRISM began life as a Python engine — fast to prototype, quick to prove. Once the ideas were battle-tested in live markets, we rewrote the core in Rust for high-speed, low-latency processing and rock-solid reliability under real trading load. But we kept what made it flexible: PRISM embeds a Python interpreter, so the entire plugin ecosystem stays in the language data scientists and quants already use — Rust speed where it counts, Python ergonomics where you build.

The plugin contract

A plugin is a small Python class. On load, it registers handlers with the host:

class MyForecaster:
    name = "myforecaster"

    def on_load(self, host, config=None):
        # register an RPC the bus will route to you
        host.register_rpc("forecast", self._forecast)

    def _forecast(self, payload):
        closes  = payload["closes"]
        horizon = payload["horizon"]
        # cache + persistence come from the Rust host — no DB code in your plugin
        key = f"{closes[-1]}:{horizon}"
        if (hit := host.cache_get("forecast", key)) is not None:
            return hit
        cone = run_model(closes, horizon)      # your model here
        host.cache_put("forecast", key, cone)
        return cone

    def describe(self):                         # optional — powers the console panel
        from prism_host import ModuleInfo, Stat
        return ModuleInfo(status="LOADED", stats=[Stat("model", lambda: "forecaster-v1")])

The host hands you three bus hooks plus caching/persistence:

Call What it does
host.register_rpc(name, fn) route bus RPC name to your function
host.register_event_handler(type, fn) subscribe to a bus event type
host.publish(event) publish an event onto the bus
host.cache_get / cache_put / cache_clear namespaced cache + DuckDB persistence

The full host API and plugin lifecycle reference lives in the prismr-plugin-sdk wiki (coming soon).

How it runs

sequenceDiagram
  participant Bus as Plexus Bus
  participant Host as PrismR host (Rust)
  participant Plug as Your plugin
  Note over Host,Plug: on_load(host) registers your RPCs
  Bus->>Host: RPC "forecast" {closes, horizon}
  Host->>Plug: fn(payload)
  Plug->>Host: host.cache_get / cache_put
  Plug-->>Host: forecast cone (p10/p50/p90)
  Host-->>Bus: reply

Tutorial: a forecasting plugin

A complete worked example — a small forecaster plugin that turns recent bars into a probabilistic price cone — is coming as the first end-to-end guide. It registers a forecast RPC, caches through the host, and returns a p10/p50/p90 cone you can render right in the console. (Full walkthrough coming soon.)


Want proven edge instead of DIY? The premium Axon models are trained, sealed, and transparently priced. See PlexusTraders.com