Architecture Overview
Last updated
Last updated
The memory retention system consists of the following components:
Frontend (Vult AI Chat UI)
Users interact with AI via the chat interface.
Prompts and responses are stored in the AI Chat Folder.
Backend (AI Processing & Memory Storage)
Handles user queries and processes AI-generated responses.
Uses Mem0 AI API for memory storage and retrieval.
Stores structured chat logs in a database or file system.
Memory Storage Layer (Mem0 AI API)
Stores chat histories and user data.
Retrieves relevant memories based on user input and prompt context.
Ensures quick access to stored interactions for seamless responses.
This struct represents a chat session in Vult AI. The key fields are:
Prompt
: Stores the user’s latest query.
Model
: The AI model used for processing.
OpenAiMessages
: Stores previous interactions with OpenAI models.
DeepSeekMessages
: Stores previous interactions with DeepSeek models.
IsAgentInput
: Indicates if the request is from AI Agent (file-based processing).
This function:
Initializes the Mem0 API client.
Calls SearchMemory()
to fetch previously stored interactions.
If memory exists, it returns retrieved context to be appended to the user prompt.
This function:
Calls retrieveMemory()
to fetch relevant past interactions.
Appends retrieved memory to the current user prompt.
Passes the enriched prompt to the AI model for response generation.
Returns the processed response to the Vult AI UI.