Architecture
Nuido AI is composed of two main components:
- Frontend: A node-based graphical UI for building and configuring AI chat logic.
- Backend: Translates node graphs into Semantic Kernel components using dynamic function calls and a registry-based mapping system.
Shared Architecture with Nuido Flow
Nuido AI shares its foundational architecture with Nuido Flow, another experimental project built on the Nuido library. Both systems utilize:
- The same registration mechanism.
- Common UI components, including layout systems, sidebar menus, dialog components, and more.
These shared elements are implemented within the nuido_base
addon, providing modularity and consistency across projects.
Frontend Implementation
Nuido AI’s frontend is built using:
- Nuido: A library for building node-based user interfaces.
- AI Chatbot Base Library: For managing chat-related components.
Section Roles
To ensure proper connectivity between nodes, Nuido AI uses section roles. These roles enforce valid connections by preventing links between incompatible node sections.
Semantic Kernel Nodes
The following node types represent various Semantic Kernel components within the frontend:
ChatCompletionAgentNode
GroupChatNode
OpenAiChatCompletionServiceNode
PromptSelectionStrategyNode
PromptTerminationStrategyNode
PluginNode
(e.g., Date Plugin)
These nodes can be visually configured and interconnected by users.
Backend Implementation
The backend takes advantage of Nuido's ability to export a document
object as a JSON structure. This document is then used to:
- Map components using a registry system.
- Instantiate the appropriate Python classes.
- Drive and manage AI chat sessions.
Chat Execution
Chat sessions are managed by a custom controller, which:
- Loads the chat definition.
- Prepares the appropriate request based on the defined logic.
- Sends messages to the AI engine.
This functionality is encapsulated in the ChitChat
class.
System Integration Example
Nuido AI can be integrated into broader systems. For example, integration with Odoo is demonstrated through the use of the Company
model, allowing enterprise-level usage scenarios.
Extending Nuido AI
New features can be added seamlessly, without modifying core components. Steps to extend the system include:
- Creating new Semantic Kernel plugins (e.g., to process sales data).
- Defining the
build
,post_process
, andcreate
functions. - Registering the new functionality via structured data files.
- Adding matching frontend node components and their corresponding models.
This plugin-based architecture ensures flexibility and scalability.
Limitations & Considerations
- Not all Semantic Kernel features are exposed, in order to maintain a user-friendly UI.
- Exposing AI capabilities to end users should be done cautiously to mitigate potential risks or misuse.