plugins/ folder as a plugin — a small Python module that can register custom formulas, specialist agents, and provider models alongside the built-ins. Plugins are the intended way to extend GridOS without touching core, so your extensions survive upgrades and can be shipped as standalone directories.
Why plugins exist
The kernel draws a hard line between “platform” (the grid engine, the preview/apply flow, the LLM orchestration) and “content” (specific formulas, domain agents, model endpoints). Content changes frequently — new financial primitives, niche industry agents, new Groq models appearing weekly. Platform changes rarely. Plugins let content live outside the core tree, so:- A plugin author can ship a real-estate copilot without negotiating a PR into the main repo.
- Users can mix and match — enable
black_scholes+real_estate, skip the rest. - Core upgrades don’t risk breaking your customizations, and your customizations don’t risk regressing core tests.
Anatomy of a plugin
manifest.json
plugin.py
The three seams
| Seam | Call | What it does |
|---|---|---|
| Formulas | @kernel.formula("NAME") | Registers a callable into the global formula registry. Available from any cell as =NAME(...) alongside =SUM / =AVERAGE / etc. |
| Agents | kernel.agent({...}) | Adds a specialist agent the router can pick. Same shape as the built-in agents/*.json files. |
| Models | kernel.model({...}) | Extends the model catalog the UI reads. Entry appears in the picker on next page load, assuming the owning provider has a configured key. |
Example plugins shipped with GridOS
The repo includes three reference plugins to copy as starting points:hello_world
Minimal template: one formula (
=GREET(name)) and one agent. A 30-line plugin.py is all you need to register both.black_scholes
=BLACK_SCHOLES(S, K, T, r, sigma, type) options pricer. Demonstrates how to ship a single well-defined primitive.real_estate
Full specialist agent (Real Estate Copilot) plus domain primitives
=CAP_RATE and =DSCR. Demonstrates a multi-seam plugin.Trust model
Plugins run in-process with full Python access — no sandbox, no capability system.- Self-hosted / OSS: you own the process, so you own the trust decision. Plugins in
plugins/auto-load on boot. - Hosted SaaS (gridos.onrender.com): plugin auto-loading is gated behind the
GRIDOS_PLUGINS_ENABLEDenvironment variable; only operator-vetted plugins ship in that directory. The in-app Marketplace lets users toggle which vetted plugins apply to their workbook — it’s a visibility/discovery layer, not a sandbox.
Error isolation
A bad plugin can’t take down the server. If a plugin’sregister() raises, the loader records the error and continues with the remaining plugins. Check plugin status at runtime:
Developer map — where to look in core
- Formula registry:
core/functions.py—@register_tooldecorator andFormulaEvaluator. Your plugin’s formula becomes a first-class primitive alongsideSUM,AVERAGE, etc. - Agent registry:
agents/__init__.py— how built-in agents load. Plugin-registered agents merge into the sameAGENTSdict at boot. - Model catalog:
core/providers/catalog.py— the static list the chat composer reads. See also Supported models. - Plugin loader:
core/plugins.py— thePluginKernelfacade anddiscover_and_load()walker.
Distribution
For now, plugins are distributed as plain directories — paste them intoplugins/ and restart. A published package registry is on the roadmap but not built. In practice the friction is low: real-world plugins are ~50–200 lines of Python and don’t need a package manager.