General Introduction
Memora is an agent designed to replicate human memories for each personalized AI. It helps AIs remember details of past interactions, emotions, and shared experiences as humans do through features such as timestamped memories, emotion markers, and multimodal memories.Memora supports multi-tenancy, can handle millions of users and interactions, and has a highly scalable and developer-friendly modular architecture that facilitates easy customization and feature integration.
Related items:Zep: Building a long-term memory layer for AI applications, extracting and updating user information, business data
Function List
- Temporal memory recall: enables AI to remember timestamped memories of past interactions.
- Multi-tenant support: Accommodate multiple organizations, agents and users.
- Flexible name handling: Use placeholders to facilitate updating of user and agent names.
- Scalability: designed to handle millions of users, interactions and memories.
- Developer Friendly: Modular architecture for easy customization and feature integration.
- Emotionally labeled memories: allows the AI to remember memories with emotions.
- Multi-modal Memory: Supports the memorization of video and audio clips.
Using Help
Installation process
- Installation of Neo4j database::
- Option A: Install Neo4j locally (free).
- Option B: Use Neo4j AuraDB Cloud (free option available).
- Installation of Qdrant Vector Database::
- Option A: Install Qdrant locally (free).
- Option B: Use Qdrant Cloud (free option available).
- Get LLM Provider API Key::
- Select one of the following providers and get an API key: OpenAI, Azure OpenAI, Together AI, Groq.
- Installing Memora::
pip install memora-core
Basic settings
- Initialize Memora with the database and LLM provider:
from memora import Memora
from qdrant_client import AsyncQdrantClient
from memora.vector_db import QdrantDB
from memora.graph_db import Neo4jGraphInterface
from memora.llm_backends import GroqBackendLLM
# Initialize the database
vector_db = QdrantDB(async_client=AsyncQdrantClient(url="QDRANT_URL", api_key="QDRANT_API_KEY"))
graph_db = Neo4jGraphInterface(uri="Neo4jURI", username="Username", password="Password", database="DBName")
Using Memora
- Creating new memories::
memora = Memora(vector_db=vector_db, graph_db=graph_db, llm_backend=GroqBackendLLM(api_key="YOUR_API_KEY"))
memora.create_memory(user_id="user123", content="This is a new memory content", timestamp="2025-01-16T00:00:00Z")
- retrieve memory::
memories = memora.retrieve_memories(user_id="user123")
for memory in memories.
memories = memora.retrieve_memories(user_id="user123")
- Updating memories::
memora.update_memory(memory_id="memory123", content="Updated memory content")
- Deletion of memories::
memora.delete_memory(memory_id="memory123")
Advanced Usage
- emotional marker memory: Add emotional tags when creating memories.
- multimodal memory: Supports memory storage and retrieval of video and audio clips.
With the above steps, users can quickly get started with Memora and take full advantage of its powerful memory management features to provide a more natural and humanized interaction experience for AI.