Installation
OpenSearch support requires an additional client library. Install the one for your SDK:Prerequisites
Before using OpenSearch with Mem0, you need to set up a collection in AWS OpenSearch Service.AWS OpenSearch Service
You can create a collection through the AWS Console:- Navigate to OpenSearch Service Console
- Click “Create collection”
- Select “Serverless collection” and then enable “Vector search” capabilities
- Once created, note the endpoint URL (host) for your configuration
Usage
Configuration Options
- Python
- TypeScript
The defaults above match a local OpenSearch instance. The AWS OpenSearch Serverless
example earlier on this page intentionally overrides them with
port=443, use_ssl=True,
and verify_certs=True, which are required when connecting to a Serverless collection.For AWS OpenSearch Serverless, keep
auto_refresh=False (the default).
The indices.refresh() API is not supported on Serverless collections.Add Memories
Search Memories
Features
- Fast and Efficient Vector Search
- Can be deployed on-premises, in containers, or on cloud platforms like AWS OpenSearch Service
- Multiple authentication and security methods (Basic Authentication, API Keys, LDAP, SAML, and OpenID Connect)
- Automatic index creation with optimized mappings for vector search
- Memory optimization through disk-based vector search and quantization
- Real-time analytics and observability