Plugin SDK

Extend UniCore with custom AI agents, third-party integrations, messaging channels, workflow templates, and UI themes — all using a single, type-safe SDK.

What is the Plugin SDK?

The UniCore Plugin SDK is an NPM package (@bemindlabs/unicore-plugin-sdk) that provides a typed API for building plugins that run inside a UniCore instance. Plugins are loaded at runtime, can register REST routes, AI agents, webhook handlers, workflow nodes, messaging channels, and dashboard UI panels — all without forking the core platform.

  • Full TypeScript support with JSDoc comments
  • Lifecycle hooks: onInstall, onActivate, onDeactivate, onUninstall
  • Access to core services: database, cache, AI engine, event bus, logger
  • Sandboxed execution — plugins cannot access host filesystem directly
  • Hot-reload in development mode
  • Publish to the Plugin Marketplace (Q3 2026)

Prerequisites

Node.js 20+
pnpm 10+ or npm 10+
TypeScript knowledge
UniCore instance (dev or demo)

Installation

Install the Plugin SDK into your plugin project:

terminalbash
npm install @bemindlabs/unicore-plugin-sdk
# or
pnpm add @bemindlabs/unicore-plugin-sdk

Your First Plugin

Every plugin is defined with definePlugin() — a type-safe factory function that validates your plugin descriptor and provides full IDE autocomplete:

src/index.tstypescript
import { definePlugin } from '@bemindlabs/unicore-plugin-sdk'

export default definePlugin({
  id: 'my-first-plugin',
  name: 'My First Plugin',
  version: '1.0.0',
  description: 'A simple UniCore plugin',

  async onInstall(ctx) {
    ctx.log.info('Plugin installed successfully!')
  },

  async onActivate(ctx) {
    ctx.log.info('Plugin activated!')
    // Register your routes, agents, or hooks here
  },

  async onDeactivate(ctx) {
    // Clean up resources
  },
})

Export the result as the default export from your plugin's entry point. UniCore discovers plugins by their package name prefix (unicore-plugin-*) or via explicit path in unicore.config.ts.

Ready to build?

Follow the step-by-step tutorial to scaffold, develop, and test a real plugin in under 15 minutes.