Long-Term Memory
Introduction
GLLM Memory is a flexible and extensible memory system for AI Agents with Mem0 Platform integration. It's designed to provide a robust foundation for building AI applications that can remember and retrieve information.
Installation
Run the following command to install
pip install --extra-index-url "https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/" "gllm-memory"Step 1: Add the gen-ai-internal source to your pyproject.toml
poetry source add gen-ai-internal "https://asia-southeast2-python.pkg.dev/gdp-labs/gen-ai-internal/simple/" --priority supplementalStep 2: Configure the authentication
poetry config http-basic.gen-ai-internal oauth2accesstoken "$(gcloud auth print-access-token)"Step 3: Add to projects
poetry add "gllm-memory[mem0ai]"Environment Setup
Set a Mem0 platform API key as an environment variable.
Get a Mem0 API key from Mem0 console.
export MEM0_API_KEY="m0-..."$env:MEM0_API_KEY = "m0-..."set MEM0_API_KEY="m0-..."Core Methods
Init Memory — Start the memory client. Use this first.
Add Memory — Save a new memory item for a user or agent.
Search Memory — Find and return the most relevant memories for a query.
List Memory — Get memories based on the provided parameters.
Delete Memory — Deletes multiple memories based on the provided parameters.
Delete Memory by User Query — Remove memories that match a query.
Last updated