DocsPlugin DevelopmentCreating Plugins

Creating Plugins

A minimal plugin is a manifest plus one entry point.

Anatomy of a Plugin

  1. Manifest — name, version, what the plugin provides, and the permissions it needs.
  2. Entry point — code that registers the plugin's models or tools with BlackBox at load time.
  3. Handlers — the functions BlackBox calls when a model or user invokes the plugin.

Principles

  • Ask for the minimum permissions you need; users see them before installing.
  • Fail gracefully — return an error the model can explain, don't crash.
  • Keep state in the plugin's own storage, not in session files.

When it works locally, see Publishing.