# nitin-mane/intel-ai-assistant-builder architecture

> Architecture diagram of the GitHub repository nitin-mane/intel-ai-assistant-builder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nitin-mane/intel-ai-assistant-builder
- Repository: https://github.com/nitin-mane/intel-ai-assistant-builder

## Overview

##### Project type and purpose
- This is an open-source Gen-AI reference design platform—a Windows desktop application (Intel® AI Assistant Builder, a.k.a. SuperBuilder) that exposes a local API service for building custom AI assistants.
- It runs entirely on-device, leveraging Intel® OpenVINO for model inference, supports LLMs, RAG pipelines, agentic workflows, and offers sample client code in C#, Go, and Python.

##### File structure
- Top-level docs: README.md, basic_usage.md, special_query.md describe features, usage, API.
- example/ contains three language‐specific client samples:
- example/csharp: .NET Core client calling AssistantService via gRPC
- example/golang: Go client with .pb.go stubs
- example/python: Python client with generated superbuilder_middleware_pb2/_grpc, helpers, and tests
- The presence of .proto-generated code in Go and Python indicates a gRPC API layer.
- No service source code here—clients target a prebuilt binary/service.
- Media/ holds UI screenshots used in docs—reference front-end design.

##### README for architectural insights
- The core entry point is AssistantService (gRPC/REST API)
- Key modules: model management (load, convert, upload), knowledge ingestion/RAG, parameter config, special query functions, agentic workflows
- Hardware acceleration: CPU, GPU (OpenVINO), NPU

##### Main components
a. Front-End Reference UI (Windows Desktop App or Custom Web UI)
- Provides chat interface, settings pages, model management screens
b. SuperBuilder Service API (AssistantService)
- gRPC/REST server exposing endpoints for chat, config, ingestion, conversion, model mgmt
c. Core Modules inside the service
- Model Manager & Converter (OpenVINO, ModelScope, Hugging Face integrations)
- Knowledge Base / RAG Pipeline (file ingestion, embedding store, retriever)
- Chat Engine (LLM orchestration, context management, conversation history)
- Special Query Modules (tabular data, image, resume match, etc.)
- Agentic Workflow Engine (multi-step pipelines, MCP support upcoming)
d. Data Stores
- Local File System: uploaded docs, model binaries, converted models, configuration profiles
- (Optionally) Embedded DB or key-value store for embeddings/indexes
e. External Libraries & Services
- Intel® OpenVINO runtime
- gRPC Framework & Protobuf stubs
- OS Drivers (Intel® Graphics & NPU drivers)
f. Hardware Acceleration
- CPU, GPU, NPU blocks invoked by OpenVINO at inference time
g. Sample Clients (C#, Go, Python)
- Integration via generated stubs calling AssistantService

##### Relationships and data flow
- User interacts with Front-End → sends gRPC/HTTP requests to AssistantService
- AssistantService routes requests to appropriate module:
- Chat request → Chat Engine → Model Manager → OpenVINO → Hardware
- Ingestion request → Knowledge Base → File System + Embedding Store
- Conversion/upload requests → Model Manager → OpenVINO conversion utilities
- Special Query → Special Query Modules → Data Parsers → Model Manager
- Outputs flow back through AssistantService → Front-End → User

##### Architectural patterns & design principles
- Modular Monolith: discrete modules/plugins within a single service process
- API-First Design: gRPC/REST interface as the integration contract
- Layered Architecture: Presentation (UI) → API Layer → Domain Modules → Infrastructure (OpenVINO, FS)
- Plugin/Extension Points: special queries, workflows, model conversion, sample clients

##### Essential architectural elements
- Core modules (model mgmt, chat engine, RAG, special queries)
- Hardware acceleration path (OpenVINO → GPU/NPU/CPU)
- Plugin nature of sample clients and extensibility points

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Front-End Layer
    FrontEnd["Front-End Reference UI<br/>(Windows Desktop App)"]:::frontend
    click FrontEnd "https://github.com/nitin-mane/intel-ai-assistant-builder/tree/main/media/"

    %% API Layer
    SuperBuilderAPI["SuperBuilder Service API<br/>(AssistantService)"]:::api
    click SuperBuilderAPI "https://github.com/nitin-mane/intel-ai-assistant-builder/blob/main/README.md"

    BasicUsage["Basic Usage & API Documentation"]:::doc
    click BasicUsage "https://github.com/nitin-mane/intel-ai-assistant-builder/blob/main/basic_usage.md"
    SpecialQueryDocs["Special Query Modules Documentation"]:::doc
    click SpecialQueryDocs "https://github.com/nitin-mane/intel-ai-assistant-builder/blob/main/special_query.md"

    %% Core Modules
    subgraph "Core Modules" 
        direction TB
        ModelManager["Model Manager & Converter"]:::module
        RAGPipeline["Knowledge Base / RAG Pipeline"]:::module
        ChatEngine["Chat Engine"]:::module
        SpecialQueryModules["Special Query Modules"]:::module
        AgenticEngine["Agentic Workflow Engine"]:::module
    end

    %% Data Stores
    subgraph "Data Stores"
        direction TB
        FS["Local File System"]:::storage
        DB["Embedded DB / Key-Value Store"]:::storage
    end

    %% External Libraries & Services
    subgraph "External Libraries & Services"
        direction TB
        OpenVINO["Intel® OpenVINO runtime"]:::external
        gRPC["gRPC & Protobuf Framework"]:::external
        ModelScope["ModelScope & Hugging Face"]:::external
        OSDrivers["OS Drivers (GPU / NPU)"]:::external
    end

    %% Hardware Acceleration
    subgraph "Hardware Acceleration"
        direction TB
        CPU["CPU"]:::hardware
        GPU["GPU"]:::hardware
        NPU["NPU"]:::hardware
    end

    %% Sample Clients
    subgraph "Sample Clients"
        direction TB
        CSharp["C# Client"]:::client
        click CSharp "https://github.com/nitin-mane/intel-ai-assistant-builder/tree/main/example/csharp/CSharpClientExample/"
        GoClient["Go Client"]:::client
        click GoClient "https://github.com/nitin-mane/intel-ai-assistant-builder/tree/main/example/golang/"
        PyClient["Python Client"]:::client
        click PyClient "https://github.com/nitin-mane/intel-ai-assistant-builder/tree/main/example/python/"
    end

    %% Connections
    FrontEnd -->|API calls| SuperBuilderAPI

    SuperBuilderAPI -->|routes to| ChatEngine
    ChatEngine -->|orchestrates LLM| ModelManager
    ModelManager -->|inference via| OpenVINO
    OpenVINO --> CPU
    OpenVINO --> GPU
    OpenVINO --> NPU

    SuperBuilderAPI -->|routes to| RAGPipeline
    RAGPipeline --> FS
    RAGPipeline --> DB

    SuperBuilderAPI -->|routes to| SpecialQueryModules
    SpecialQueryModules --> FS
    SpecialQueryModules --> ModelManager

    SuperBuilderAPI -->|routes to| AgenticEngine

    CSharp -->|calls| SuperBuilderAPI
    GoClient -->|calls| SuperBuilderAPI
    PyClient -->|calls| SuperBuilderAPI

    %% Documentation references
    SuperBuilderAPI --- BasicUsage
    SpecialQueryModules --- SpecialQueryDocs

    %% External integrations
    ModelManager --- ModelScope
    SuperBuilderAPI --- gRPC
    OpenVINO --- OSDrivers

    %% Styles
    classDef frontend fill:#D6EAF8,stroke:#21618C,color:#1B2631
    classDef api fill:#AED6F1,stroke:#1A5276,color:#1B2631
    classDef module fill:#A9DFBF,stroke:#239B56,color:#1B2631
    classDef storage fill:#F9E79F,stroke:#B7950B,color:#1B2631
    classDef external fill:#E5E8E8,stroke:#909497,color:#1B2631
    classDef hardware fill:#D5DBDB,stroke:#707B7C,color:#1B2631
    classDef client fill:#FADBD8,stroke:#C0392B,color:#1B2631
    classDef doc fill:#E8DAEF,stroke:#7D3C98,color:#1B2631
```
