AWS Bedrock and AOSS
📢 Announcing our research paper: Mem0 achieves 26% higher accuracy than OpenAI Memory, 91% lower latency, and 90% token savings! Read the paper to learn how we're revolutionizing AI agent memory.
This example demonstrates how to configure and use the mem0ai
SDK with AWS Bedrock and OpenSearch Service (AOSS) for persistent memory capabilities in Python.
Installation
Install the required dependencies:
Environment Setup
Set your AWS environment variables:
Configuration and Usage
This sets up Mem0 with AWS Bedrock for embeddings and LLM, and OpenSearch as the vector store.
Usage
Add a memory:
Search a memory:
Get all memories:
Get a specific memory:
Conclusion
With Mem0 and AWS services like Bedrock and OpenSearch, you can build intelligent AI companions that remember, adapt, and personalize their responses over time. This makes them ideal for long-term assistants, tutors, or support bots with persistent memory and natural conversation abilities.