Skip to content

My Independent AI Architecture: Component Overview

This document outlines the high-level responsibilities and logical roles of each component within the distributed hybrid AI system.


1. Local Ecosystem (NAS - Laptop - PC)

Data Importers

Role: Ingestion & Context Extraction
The Data Importers are modular services designed to bridge external data sources (WhatsApp, Gmail, Synology Photos, and local Filesystems) with the AI ecosystem. They are responsible for fetching new updates based on triggers, extracting raw text and metadata, and passing this "raw" context to the Central Orchestrator for further processing.

AI Orchestrator

Role: Central Nervous System & Controller
The AI Orchestrator acts as the main traffic controller for all requests. It manages the lifecycle of data from ingestion to storage and handles user chat requests by coordinating between the local models, the Privacy Core, and the GCP-based vector store. It is the only component that handles both raw and anonymized data.

Privacy Core

Role: PII Redaction & Anonymization
Utilizing tools like Microsoft Presidio, the Privacy Core identifies Personally Identifiable Information (PII) within raw text. It redacts sensitive entities (names, phone numbers, addresses) and replaces them with unique placeholders. This ensures that only anonymized data is ever sent to cloud-based embedding or inference APIs.

Privacy Core MapDB (SQLite)

Role: Identity Mapping Store
The MapDB is a local SQLite database that stores the bi-directional mapping between raw PII and their anonymized placeholders (e.g., "Mario" <-> "User_7"). This database is strictly localized to the node to ensure that the "rehydration" of names can happen during chat without the cloud ever knowing the real identity.

Local Border Control (Guardrails & Routing)

Role: Intent Classification & Safety Enforcement
This component uses a local SLM (Llama 8B) to analyze every incoming user prompt. It performs two critical tasks: it ensures the prompt is safe (guardrail) and determines if the request requires local-only processing or can be routed to cloud models (routing) based on the detected sensitivity of the query.


2. Local Sovereign Models

Local Sovereign Inference (Llama 4 Scout 8B)

Role: Private Reasoning Engine
A local LLM hosted via Ollama or vLLM that provides text generation for sensitive queries. By running on local hardware (PC/NAS), it guarantees that private conversations never leave the user's physical network, providing a "sovereign" alternative to cloud-based LLMs.

Local Embeddings (Nomic-Embed-Text-V2)

Role: Private Vectorization
This specialized encoder model converts text into high-dimensional vectors. Using Nomic-Embed locally allows the system to index sensitive WhatsApp or local document data privately, ensuring the vector representation is created without sending raw text to a cloud embedding provider.


3. Admin Dashboard

System Config & Config DB (SQLite)

Role: Orchestrator Configuration Management
The System Config interface allows users to manage node identities, sync intervals, and importer settings. These settings are persisted in a local SQLite database (Config DB), which acts as the source of truth for the Orchestrator's behavior on that specific hardware node.

Chat Interface

Role: User Interaction Layer
A web-based UI that allows users to interact with the AI. It features manual privacy toggles (Local vs. Cloud) and handles the final display of AI responses. It is designed to receive rehydrated text from the Orchestrator, ensuring the end-user sees real names while the models only see IDs.


4. Google Cloud Platform (GCP)

GCP Buckets & Sync Lock

Role: Encrypted Storage & Distributed Mutex
GCS Buckets provide durable, CMEK-encrypted storage for database backups and raw data archives. The Sync Lock is a specific object used as a distributed mutex to prevent multiple nodes (e.g., NAS and Laptop) from writing to the cloud-synced databases simultaneously.

Cloud Intelligence (Gemini & Vertex AI)

Role: High-Performance Managed Inference
Gemini Pro and Vertex AI Endpoints provide massive reasoning capabilities for non-sensitive tasks. These models are utilized when the Local Border Control determines