Portal Community

What is Octopus?

Octopus is not a simple chatbot wrapper. It is an enterprise-grade AI agent framework built into the BizFirstGO platform. Octopus agents can maintain multi-session memory, call external tools via the Model Context Protocol (MCP), integrate with Flow Studio workflows, and collaborate with other agents to accomplish complex tasks.

Every Octopus agent is defined by three graph-structured composite objects that capture the agent's identity, the active conversation state, and the user interacting with it. This graph model allows the platform to hydrate a complete agent context from a database record with a single lookup.

Enterprise AI, Not Just a Chatbot

Octopus agents persist their memory across sessions, respect tenant boundaries, integrate with your business workflows, and can be monitored in real time — enterprise concerns that most AI frameworks ignore.

The Three Composite Objects

AgentComposite

The complete definition of an AI agent: its LLM configuration, memory settings, tool registry, plugin list, system prompt, persona, and behavioral constraints. Agents are created once and reused across many conversations.

ConversationComposite

The stateful session object for one conversation. Contains the message history, working memory context, active tool call history, and references to the agent and user. Created when a session begins and closed when it ends.

UserComposite

The human (or system) interacting with the agent. Contains user identity, preferences, accessible agents, tenant membership, and links to conversation history. Users can have multiple concurrent conversations with different agents.

Four Memory Types

Octopus provides four distinct memory systems, each optimized for a different kind of recall:

Memory TypeWhat It StoresStorageLifetime
WorkingCurrent conversation context windowIn-process (RAM)One session
EpisodicPast conversation history by sessionSQL ServerConfigurable TTL
SemanticKnowledge embeddings (vector DB)Qdrant / PGVectorPersistent
ProceduralLearned skill sequences and tool patternsSQL ServerPersistent

Five Built-In Plugins

Octopus is extended through plugins. Five plugins are built into the platform:

PluginAddsRequired For
SqlServerStorageSQL persistence for all memory typesProduction deployments
SemanticKernelMicrosoft SK LLM routing and plannerSK-based LLM integration
WebDriverBrowser automation tools (Playwright)Web scraping agents
ChatbotUIEmbeddable chat widget (SSE streaming)End-user chat interfaces
ProcessFlow Studio workflow integrationAgent-workflow collaboration

Agent Reasoning Loop

1

Receive User Message

The agent receives a user message via the ChatbotUI plugin or direct API call. A ConversationComposite is created or resumed.

2

Assemble Working Memory

MemoryOrchestrator queries episodic memory (past turns), semantic memory (relevant knowledge), and procedural memory (matching procedures). Results are assembled into the context window.

3

Call LLM

The full context — system prompt + retrieved knowledge + message history + current message — is sent to the configured LLM provider via ILLMProvider.CompleteAsync().

4

Handle Tool Calls

If the LLM response contains tool call directives, Octopus executes each tool via the MCP tool registry. Results are appended to the message history and the LLM is called again.

5

Return Response

The final text response is streamed to the user via Server-Sent Events. The episode (user turn + assistant response) is persisted to episodic memory.

LLM Provider Abstraction

Octopus does not hard-code to any single AI provider. The ILLMProvider interface abstracts all LLM calls:

public interface ILLMProvider
{
    Task<LLMResponse> CompleteAsync(
        IReadOnlyList<LLMMessage> messages,
        IReadOnlyList<ToolDefinition>? tools,
        LLMOptions options,
        CancellationToken cancellationToken = default);

    Task StreamAsync(
        IReadOnlyList<LLMMessage> messages,
        IReadOnlyList<ToolDefinition>? tools,
        LLMOptions options,
        Func<LLMStreamChunk, Task> onChunk,
        CancellationToken cancellationToken = default);
}

How Octopus Connects to Flow Studio

Octopus and Flow Studio are bidirectional partners: