Plugins Overview
Plugins are the primary extension mechanism in Octopus. They provide services, tools, memory backends, and UI capabilities that extend the core agent framework. Five plugins are built in; you can add custom plugins without modifying the core.
What Is a Plugin?
An Octopus plugin is any class implementing IOctopusPlugin. It has three lifecycle methods:
public interface IOctopusPlugin
{
// Called once at startup: register DI services
void OnRegister(IServiceCollection services, OctopusConfig config);
// Called after DI container is built: initialise services, register tools
Task OnStartAsync(IServiceProvider serviceProvider, CancellationToken ct);
// Called on shutdown: clean up resources
Task OnStopAsync(CancellationToken ct);
}
Built-In Plugins
SqlServerPlugin
All SQL-backed memory storage. Episodes, procedures, agents, areas. EF Core migrations. Required for production.
SemanticKernelPlugin
Semantic memory (vector store), embedding providers, RAG retrieval pipeline, reranking.
WebDriverPlugin
Browser automation tools for agents. Playwright-based web scraping and UI interaction.
ChatbotUIPlugin
Streaming SSE responses, form rendering, rich card display, file upload in chat.
ProcessPlugin
Flow Studio integration — trigger workflows, request approvals, agent handoff to workflow actors.
Plugin Registration Order
// Program.cs — register plugins in dependency order
builder.Services.AddOctopus(config =>
{
// Core plugins first (provide storage that others depend on)
config.AddPlugin<SqlServerPlugin>(); // Must be first — provides DbContext
config.AddPlugin<SemanticKernelPlugin>(); // Requires SqlServerPlugin agent store
// Feature plugins (depend on core)
config.AddPlugin<ChatbotUIPlugin>();
config.AddPlugin<ProcessPlugin>();
config.AddPlugin<WebDriverPlugin>();
// Custom plugins last
config.AddPlugin<MyHRPlugin>();
});
Plugin vs. Tool vs. AI Function
| Extension Point | Purpose | Deployment |
|---|---|---|
| Plugin | Register services, memory backends, tools at startup | Compiled C# — requires deployment |
| Custom MCP Tool | Add a callable function for agents | Compiled C# — requires deployment |
| AI Function | Lightweight JS logic stored in DB | Database change — no deployment |