Skip to main content

What is a Plugin?

A Plugin defines a custom message type. It controls:
  1. What data a message carries via an input schema (what fields the agent sends)
  2. How that message renders as HTML/CSS/JS in a sandboxed iframe
  3. What logic runs client-side such as HTTP requests, data fetching, user interactions
  4. What configuration it needs like environment variables (API keys, URLs, etc.)
A Plugin does NOT control:
  • Whether a message requires a review/response (that’s the agent’s decision per message)
  • The approve/reject buttons (that’s the review system, orthogonal to plugins)
  • Authentication or routing (that’s the platform)

Plugin vs Review

These are two independent axes on a message:

Plugin Structure

Each plugin lives in packages/plugins/<name>/ and consists of:
  • plugin.json: Manifest with metadata, input schema, env variables, and permissions
  • render.html: HTML + CSS + JS rendered inside a sandboxed iframe
  • icon.svg/.png (optional): Icon shown in the Settings UI
Plugins are discovered automatically on backend startup. No build step required, just add the directory and restart.

Built-in Plugins

Placet ships with two example plugins you can use as reference:

Data Flow

Security Model

Available in Plugins

Inside the iframe, plugins access the Bridge API via the Placet global: Methods: Placet.fetch(), Placet.getFile(), Placet.getFileUrl(), Placet.toast(), Placet.respond(), Placet.resize(), Placet.emit(), Placet.on(). See the full Bridge API reference for details.