Skip to main content
Mem0 is a memory engine designed to maintain contextual conversations, ensuring users don’t have to repeat themselves and that your agents provide consistent, continuous responses. It offers an adaptive memory solution tailored for teams who want to manage everything on their own infrastructure. You retain full control over the stack, data, and customizations.

Prerequisites

Before starting, ensure you have:

Installation and setup

Clone the repository

git clone https://github.com/sambanova/integrations.git
cd integrations/mem0

Create a virtual environment

python -m venv .venv
source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

Set environment variables

Create a .env file in the project directory with your API key:
SAMBANOVA_API_KEY=your-sambanova-api-key
Or export it directly:
export SAMBANOVA_API_KEY="your-sambanova-api-key"

Run the example

python main.py
For the complete source code, see the Mem0 integration example on GitHub.

Mem0 documentation

For more information about Mem0, see the official Mem0 documentation.