This document outlines the process of storing memory objects in the Omi AI system.
Memory object is processed
Object is converted to a dictionary
Data is organized into specific fields
Memory is saved to Firestore
process_memory
function in utils/memories/process_memory.py
processes a new or updated memoryupsert_memory
function in database/memories.py
upsert_memory
function converts the Memory object into a Python dictionaryThe dictionary contains the following key fields:
Field | Description |
---|---|
id | Unique ID of the memory |
created_at | Timestamp of memory creation |
started_at | Timestamp when the associated event started |
finished_at | Timestamp when the associated event ended |
source | Source of the memory (e.g., “omi”, “openglass”, “workflow”) |
language | Language code of the conversation |
structured | Dictionary of structured information (see below) |
transcript_segments | List of transcript segments (see below) |
geolocation | Location data (if available) |
plugins_results | Results from any plugins run on the memory |
external_data | Additional data from external integrations |
postprocessing | Information about post-processing status |
discarded | Boolean indicating if the memory is low-quality |
deleted | Boolean indicating if the memory has been deleted |
visibility | Visibility setting of the memory |
The structured
field contains:
title
: Topic of the memoryoverview
: Summary of the memoryemoji
: Representing emojicategory
: Category (e.g., “personal”, “business”)action_items
: List of derived action itemsevents
: List of extracted calendar eventsEach segment in transcript_segments
includes:
speaker
: Speaker label (e.g., “SPEAKER_00”)start
: Start time in secondsend
: End time in secondstext
: Transcribed textis_user
: Boolean indicating if spoken by the userperson_id
: ID of a person from user’s profiles (if applicable)The postprocessing
field contains:
status
: Current status (e.g., “not_started”, “in_progress”)model
: Post-processing model used (e.g., “fal_whisperx”)fail_reason
: (Optional) Reason for failuredatabase/memories.py
uses the Firebase Firestore API to store the memory data dictionarymemories
collection within the user’s documentUsers Collection
This structure allows for efficient querying and management of user-specific memory data.