Skip to content

Build a plugin ​

Take a Python function your team already relies on, expose it behind ReliaForge authentication, and attach a console page when operators need a UI. The backend's step-by-step tutorial walks through a runnable service-ownership lookup API with complete files.

What you will get ​

After wiring the example router, calling:

bash
curl "http://127.0.0.1:8000/api/v1/plugins/sample_tool/owner?service_name=payments"

returns:

json
{"service": "payments", "team": "payments-ops"}

Files to touch ​

Generate sample_tool from Quick start, then edit only what your tool needs:

GoalFile or settingAction
Add your logicownership.pyPut your lookup or automation function here
Expose an endpointrouter.pyParse inputs with FastAPI, call the function, return JSON
Configure via env varssettings.pySubclass PluginSettings to read RELIAFORGE_SAMPLE_TOOL_*
Load in devRELIAFORGE_PLUGIN_PATHSPoint to ./local-plugins and restart reliaforge
Add a console page (optional)manifest.json (frontend)Bundle an ESM workspace with @reliaforge/plugin-sdk

plugin.py generated by the scaffold already hooks up initialization, startup, shutdown, and health checks. See the complete backend plugin guide when your tool opens async HTTP pools, WebSockets, or background tasks.

Verify the failure cases ​

Run three checks before shipping:

  1. Valid input returns HTTP 200.
  2. Missing or unknown input returns HTTP 404 or 422 (never a raw 500 traceback).
  3. Stop sample_tool in the console and repeat the request; it must return HTTP 503. Start it again and confirm 200 returns without restarting the backend process.

In local development, browse generated OpenAPI routes at http://127.0.0.1:8000/api/v1/docs.

Package and share ​

  • Installable Python package: Add an entry under [project.entry-points."reliaforge.plugins"] in pyproject.toml and pip install it into the backend environment. Browse reliaforge-plugins for six production examples combining Python routers with @reliaforge/plugin-sdk views.
  • Mounted folder: Copy the plugin directory to the server, install its Python requirements, and add the parent directory to RELIAFORGE_PLUGIN_PATHS.

For minimal service sharing between two plugins, read the bundled demo and runbook plugins.

Released under the MIT License.