Plugin Architecture Overview
Understand how Botonom's plugin architecture enables extensibility and integration.
This guide begins with Overview, continues through Plugin architecture, Plugin manifest, Plugin code, and finishes with Plugin configuration.
Overview
Botonom's plugin architecture allows you to extend the platform's functionality with custom plugins. Plugins can add new features, integrate with external systems, or modify existing behavior.
Plugin architecture
A plugin consists of:
- Plugin manifest — metadata about the plugin
- Plugin code — the logic that implements the plugin
- Plugin configuration — settings that can be adjusted by users
Plugin manifest
The manifest file (plugin.json) describes the plugin:
{
"name": "My Custom Plugin",
"description": "A custom plugin for Botonom agents.",
"version": "1.0.0",
"author": "Your Company",
"license": "MIT",
"dependencies": {
"botonom-sdk": "^1.0.0"
},
"config": {
"api_key": {
"type": "string",
"description": "Your API key for the external service.",
"required": true
}
}
}
Plugin code
The plugin code is written in any language that can run in a Docker container. Here's an example in Node.js:
import { Botonom } from 'botonom-sdk';
const botonom = new Botonom({
apiKey: process.env.BOTONOM_API_KEY,
workspaceId: process.env.BOTONOM_WORKSPACE_ID
});
export async function handleTask(task) {
const result = await botonom.agents.sendTask(task.agentId, {
instruction: task.instruction
});
return result;
}
Plugin configuration
Users can configure the plugin through the Botonom dashboard. Define configuration options in the manifest:
{
"config": {
"api_key": {
"type": "string",
"description": "Your API key for the external service.",
"required": true
}
}
}
Deployment
Package your plugin as a Docker image and push it to a container registry. Use the Botonom CLI to deploy:
# Build the Docker image
docker build -t my-custom-plugin .
# Tag the image
docker tag my-custom-plugin botonom/my-custom-plugin:1.0.0
# Push to Docker Hub
docker push botonom/my-custom-plugin:1.0.0
# Deploy to Botonom
botonom plugin deploy botonom/my-custom-plugin:1.0.0
