Collects and processes transient messages like screenshots, voice clips, and text for ingestion into agent memory pipelines.
# Source: https://github.com/mperkins0155/MIRIX | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
import asyncio
import copy
import logging
import os
import time
from datetime import datetime, timedelta
from mirix.agent.app_constants import (
GEMINI_MODELS,
SKIP_META_MEMORY_MANAGER,
TEMPORARY_MESSAGE_LIMIT,
)
from mirix.agent.app_utils import encode_image
from mirix.constants import CHAINING_FOR_MEMORY_UPDATE, CHAINING_FOR_META_AGENT
from mirix.voice_utils import convert_base64_to_audio_segment, process_voice_files
def get_image_mime_type(image_path):
"""Get MIME type for image files."""
if image_path.lower().endswith((".png", ".PNG")):
return "image/pn
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key