Portal Community

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.

Full guide →

SemanticKernelPlugin

Semantic memory (vector store), embedding providers, RAG retrieval pipeline, reranking.

Full guide →

WebDriverPlugin

Browser automation tools for agents. Playwright-based web scraping and UI interaction.

Full guide →

ChatbotUIPlugin

Streaming SSE responses, form rendering, rich card display, file upload in chat.

Full guide →

ProcessPlugin

Flow Studio integration — trigger workflows, request approvals, agent handoff to workflow actors.

Full guide →

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 PointPurposeDeployment
PluginRegister services, memory backends, tools at startupCompiled C# — requires deployment
Custom MCP ToolAdd a callable function for agentsCompiled C# — requires deployment
AI FunctionLightweight JS logic stored in DBDatabase change — no deployment