SQL Server Storage Plugin
The SqlServerPlugin replaces Octopus's default in-memory storage with durable SQL Server persistence. Without it, all agent configurations, conversations, and memory are lost on every restart.
What It Persists
Agent Configurations
System prompt, LLM model, memory settings, tool assignments, area memberships. The source of truth for all agent behaviour.
Episodic Memory
Conversation episodes and individual messages — the long-term conversation history recalled into context on each turn.
Procedural Memory
Named skill sequences that guide agents through multi-step processes. Matched by intent and injected as system instructions.
AI Functions
JavaScript snippets stored in the database and exposed to agents as MCP tools. Editable at runtime without deployment.
Areas
Logical deployment boundaries grouping agents, knowledge, and users. Each area is a row with its routing and isolation config.
In-Memory vs SQL Server
| Aspect | In-Memory (default) | SqlServerPlugin |
|---|---|---|
| Data survives restart | No | Yes |
| Multi-instance deployment | No (per-process state) | Yes (shared DB) |
| Production use | Dev/test only | Required |
| EF Core migrations | Not applicable | Run on each startup |
| Tenant isolation | Not enforced | TenantId on every row |
Plugin Registration
// Program.cs — SqlServerPlugin must be the first plugin registered
builder.Services.AddOctopus(config =>
{
config.AddPlugin<SqlServerPlugin>(); // Must be first
config.AddPlugin<SemanticKernelPlugin>();
config.AddPlugin<ChatbotUIPlugin>();
// ... other plugins
});
Services Provided to Other Plugins
| Service Interface | Implementation | Consumers |
|---|---|---|
OctopusDbContext | EF Core DbContext | All plugins that access Octopus tables |
IEpisodicMemoryStore | SqlEpisodicMemoryStore | MemoryOrchestrator, conversation engine |
IProceduralMemoryStore | SqlProceduralMemoryStore | MemoryOrchestrator, agent reasoning loop |
IAgentStore | SqlAgentStore | All agent resolution paths |
IAIFunctionStore | SqlAIFunctionStore | AI Function runtime, tool registry |
IAreaStore | SqlAreaStore | Area routing, user access checks |
SqlServerPlugin. The in-memory fallback is intentionally limited and loses all data on restart.