☁️
Zus Docs
  • About Züs
  • System
    • Providers and Services
      • Miner
      • Sharder
      • Blobber
      • Validator
      • Authorizer
      • Node Locator (0DNS)
    • Storage
      • Architecture and Data Management
      • Protocol
        • Allocations
        • Reference Objects
        • Challenges
        • Write Markers
          • Chain Hashing
          • Two Commit
        • Blobber Repair Protocol
      • ZS3 Server
        • Backup, Recovery and Replication
        • Encryption and Compression
        • S3FS Setup and Usage
        • Backup & Recovery with Restic on Blimp + ZS3 Server
        • Backup & Recovery with Veeam on Blimp + ZS3 Server
      • File Operations
        • Upload
        • Download
        • File Sharing
        • Partial Error Recovery
        • Streaming
        • Rent a Blobber
    • Smart Contracts
      • Storage S.C.
      • Miner S.C.
      • ZCN S.C.
      • ERC-20 S.C.s
      • Bridge Protocol
    • Blockchain & Consensus
      • Entities
    • User Authentication and Wallet Management System
      • OKTA Integration
      • Key Management System (KMS)
  • APIs
    • 0DNS API
    • JS API
    • Mobile API
  • CLIs
    • Storage CLI
      • Quickstart
      • Configuring the tool
    • Wallet CLI
      • Wallet Configuration
      • Quickstart
      • Configuring the tool
  • SDKs
    • Go SDK
      • GO SDK Microservices
    • JS SDK
  • Tokenomics
    • Staking
    • Reward & Penalty
  • ✨Züs Apps
    • 🗝️Vult
      • Getting Started
        • Web
        • Mobile
      • Vult AI
        • Batch Processing
        • Memory Retention
        • Technical Implementation
        • Architecture Overview
      • Login / Register
      • File Management Pages
      • File Sharing
      • Storage Management Dashboard
      • Storage Maintenance and Troubleshooting
      • Züs Subscription
      • Wallet Management
      • Refer a friend
      • Settings
    • 🏗️Blimp
      • Getting Started
      • Login / Register
      • Configure Storage
        • Create Standard Storage Allocation
        • Create Enterprise Allocation
        • Create S3 Server Allocation
        • Create Cloud Migration Allocation
        • Allocation Maintenance and Troubleshooting
      • File Management Pages
      • File Sharing
      • Manage Allocations
      • Upgrade Storage
      • Blimp Vault
      • Refer a friend
      • Settings
      • Launching ZS3 Server
      • Using CLI to backup files into Blimp + ZS3 Server
    • 🏠Chimney
      • Getting Started
      • Login / Register
      • Create New Deployment
      • Manage Your Deployments
      • Homepage
      • Staking Dashboard
      • Rank Dashboard
      • Monitor Dashboard
      • Stats Dashboard
      • Logs Dashboard
      • Wallet Dashboard
      • Operations on your Deployments
      • Restricted Blobbers
      • Settings
        • Manage Profile
        • Wallet Settings
        • Update Blobber Settings
        • Update Blobber Version
        • Refer a friend
        • Help
    • 🌐Atlus
      • Getting Started
      • Home page
      • Service Providers Page
      • Charts Page
        • Market Charts
        • Network Charts
        • Storage Charts
      • Blockchain Page
      • Server Map Page
      • Storage Explainer Page
      • Details Pages
        • Block Details Page
        • Transaction Details Page
        • Wallet Details Page
        • Miner Details Page
        • Sharder Details Page
        • Blobber Details Page
        • Validator Details Page
        • Authorizer Details Page
        • Allocation Details Page
      • Appendix: Common Components
    • ⚡Bolt
      • Getting Started
        • Web
        • Mobile
      • Login / Register
      • Sign In with external wallet
      • Staking Dashboard
      • Staking/Unstaking a provider
      • Claiming Rewards
      • Send/Receive ZCN tokens
      • Buy ZCN
      • Deposit/Withdraw ZCN tokens
      • Activity Dashboard
      • Refer a friend
      • Settings
  • Releases
    • Hardfork
Powered by GitBook
On this page
  • 1. AI Chat Request Handling
  • 2. Backend API Endpoints
  • 3. Backend Implementation Details
  • 4. Batch Processing Implementation
  • 5. Database & Storage Design
  1. Züs Apps
  2. Vult
  3. Vult AI

Technical Implementation

PreviousMemory RetentionNextArchitecture Overview

Last updated 1 month ago

The AI integration in Vult is structured to provide real-time AI chat, file-based AI processing, memory retention, and batch processing. The technical implementation consists of frontend components, backend APIs, database interactions, and AI model processing pipelines.

This section details how chat requests, file processing, batch execution, and memory retention are handled within Vult AI.

1. AI Chat Request Handling

Step 1: User Submits a Chat Request

Users interact with the Vult AI Chat Interface by entering a text prompt, selecting an AI model. and optionally attaching a file.

Step 2: File Processing (If Applicable)

If the user attaches a file:

  • The file is privately shared using AuthTicket & LookupHash.

  • AI downloads the file securely.

  • The file content is analyzed using the selected AI model.

Step 3: AI Model Processing

The request is sent to the backend API for processing and the selected AI model generates a response.

Step 4: Response Storage

Chat responses are saved in AI Chat Folder and File-based responses are stored in AI Agent Folder.

2. Backend API Endpoints

1. Create Chat API

Handles real-time AI chat interactions.

Endpoint:

POST /api/chat/create

Request Payload:

{
  "shareInfoUrls": "string",
  "prompt": "string",
  "model": "string",
  "isFileProcessing": "bool",
  "fileType": "string"
}

Response:

{
  "status": "success",
  "data": {
    "response": "AI generated response",
    "fileUrl": "https://vult.ai/file/response.pdf"
  }
}

2. Batch Processing API

Processes multiple files in one request for AI-based batch execution.

Endpoint:

POST /api/batch/process

3. Memory API (Mem0 AI)

Retrieves past user interactions to maintain context across sessions.

Endpoint:

POST /api/memory/search

3. Backend Implementation Details

File Upload & Secure Sharing

Files are not uploaded to third-party AI models. Instead, a secure private share is created using an AuthTicket, which is a unique Base64-encoded authentication token, and a LookupHash, which serves as a reference hash to identify the file.

The AI model then downloads and processes the file.

AI Model Processing Pipeline

The process begins with the user prompt and any attached file being sent to the Backend API. The backend determines the selected AI model. If a file is attached, it is downloaded from Vult Storage.

The AI model then generates a response, which can be text, image, or document-based. This response is stored and displayed in the user interface.

Memory Retention (Mem0 AI Integration)

The Mem0 AI API stores previous chat sessions. When a user starts a new conversation, the AI retrieves contextually relevant past interactions.

The retrieved memory is appended to the current prompt before the AI processes it.

4. Batch Processing Implementation

Step 1: User Initiates a Batch Request

The user begins by selecting a folder containing multiple files. The AI Agent then creates a batch request for processing these files.

Step 2: Backend Processing

All selected files are securely downloaded. These files, along with any user-defined instructions, are packaged into a JSONL file. This JSONL file is then sent to the OpenAI Batch API for processing.

Step 3: Response Handling

The batch API processes each file independently. The AI responses are stored as individual text files in the AI Agent Folder. For large batches, processing can take up to 24 hours.

5. Database & Storage Design

AI Chat Storage (NoSQL Database Schema)

Chat interactions between users and the AI agent are stored in a NoSQL database. The schema is designed to be flexible, allowing for variable message formats, timestamps, metadata, and session grouping.

{
  "user_id": "123456",
  "session_id": "abc789",
  "messages": [
    {
      "timestamp": "2025-03-17T12:34:56Z",
      "user_input": "What is my name?",
      "ai_response": "Your name is Jack."
    }
  ]
}

AI Agent Storage (File System-Based)

While conversations are stored in the database, media assets and outputs generated by the AI agent are saved on the file system for efficient retrieval, archival, and offline access.

  • Responses are stored in the AI Agent Folder for future retrieval.

  • Text responses are stored as .txt or .pdf files.

  • Image-based responses are processed and saved in the AI Image Directory.

✨
🗝️