Skip to main content
This integration demonstrates how to use Mem0 with AWS Bedrock and Amazon OpenSearch Service (AOSS) to enable persistent, semantic memory in intelligent agents.

Overview

In this guide, you’ll:
  1. Configure AWS credentials to enable Bedrock and OpenSearch access
  2. Set up the Mem0 SDK to use Bedrock for embeddings and LLM
  3. Store and retrieve memories using OpenSearch as a vector store
  4. Build memory-aware applications with scalable cloud infrastructure

Prerequisites

  • AWS account with access to:
    • Bedrock foundation models (e.g., Titan, Claude)
    • OpenSearch Service with a configured domain
  • Python 3.8+
  • Valid AWS credentials (via environment or IAM role)

Setup and Installation

Install required packages:
Set environment variables. Configure your AWS credentials using environment variables, IAM roles, or the AWS CLI.

Initialize Mem0 Integration

Import necessary modules and configure Mem0:

Memory Operations

Use Mem0 with your Bedrock-powered LLM and OpenSearch storage backend:

Key Features

  1. Serverless Memory Embeddings: Use Titan or other Bedrock models for fast, cloud-native embeddings
  2. Scalable Vector Search: Store and retrieve vectorized memories via OpenSearch
  3. Seamless AWS Auth: Uses AWS IAM or environment variables to securely authenticate
  4. User-specific Memory Spaces: Memories are isolated per user ID
  5. Persistent Memory Context: Maintain and recall history across sessions

AWS Bedrock Cookbook

Complete guide to using Bedrock with Mem0
Enjoying Mem0? Star us on GitHub — it takes two seconds and helps more developers discover open-source memory.