-
-
Notifications
You must be signed in to change notification settings - Fork 4
Developing Plugins
CortexPrism edited this page Jun 17, 2026
·
1 revision
Full guide at: docs/plugins/developing.md
my-plugin/
├── manifest.json # Plugin identity, capabilities, entry point
├── mod.ts # Entry point — exports tools, hooks, providers
└── README.md
{
"name": "my-plugin",
"version": "1.0.0",
"description": "An example plugin",
"kind": "esm",
"entryPoint": "./mod.ts",
"runtime": "deno",
"capabilities": ["tools", "network:fetch"]
}import type { Tool, PluginContext } from 'cortex/plugins';
const myTool: Tool = {
definition: {
name: 'my_tool',
description: 'Does something useful',
params: [{ name: 'input', type: 'string', description: 'Input', required: true }],
capabilities: ['network:fetch'],
},
execute: async (args, ctx) => {
return { toolName: 'my_tool', success: true, output: 'result', durationMs: 0 };
},
};
export const tools = [myTool];export const onLoad = async (ctx: PluginContext) => { /* init */ };
export const onUnload = async (ctx: PluginContext) => { /* cleanup */ };
export const onActivate = async (ctx: PluginContext) => { /* tools live */ };
export const onDeactivate = async (ctx: PluginContext) => { /* tools removed */ };cortex plugins install ./my-plugin
cortex plugins enable my-plugin
cortex plugins list
cortex chat # test your tool- Plugin System — System overview
- Manifest Reference — Complete schema
- Plugin Best Practices — Design principles
- Publishing Plugins — Marketplace submission
CortexPrism — Open-source agentic AI harness · MIT License · Built with Deno 2.x + TypeScript