memoryLong-Term Memory

Introduction

GLLM Memory is a flexible and extensible memory system for AI Agents with Mem0 Platformarrow-up-right integration. It's designed to provide a robust foundation for building AI applications that can remember and retrieve information.

Installation

chevron-rightPrerequisiteshashtag

Before installing, make sure you have:

  1. Mem0 Platform Credentials

    1. API Keyarrow-up-right — after logging in to the Mem0 console, you can create an API key from the menu on the left.

  2. gcloud CLIarrow-up-right — required because gllm-memory is a private library hosted in a private Google Cloud repository.

After installing, please run

gcloud auth login

to authorize gcloud to access the Cloud Platform with Google user credentials.

circle-info

Our internal gllm-memory package is hosted in a secure Google Cloud Artifact Registry. You need to authenticate via gcloud CLI to access and download the package during 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"

Environment Setup

Set a Mem0 platform API key as an environment variable.

circle-info

Get a Mem0 API key from Mem0 consolearrow-up-right.

export 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