Mem0
Use Mem0 with Oracle AI Vector Search to store and retrieve long-term user and agent memories in Oracle AI Database.
Mem0 extracts useful facts from conversations, creates embeddings for those facts, and retrieves relevant memories during later interactions. The Oracle provider stores the embeddings and memory payloads in an Oracle table.
What This Guide Covers
This guide explains how to configure the Mem0 oracledb vector store and use it from Python, JavaScript, or TypeScript.
Both language guides cover the following tasks:
- Install Mem0 and the Oracle AI Database drivers.
- Configure an Oracle connection or reuse an application-managed connection pool.
- Add memories and search for relevant memories.
- Configure HNSW or IVF vector indexes.
- Filter search results by metadata.
- Review provider configuration options and search-score operations.
Select a Language
Select the guide for the language used by your application. The provider uses the same Oracle AI Vector Search capabilities, but configuration names and SDK calls differ by language.
| Language | Mem0 package | Oracle driver | Detailed guide |
|---|---|---|---|
| Python | mem0ai |
oracledb |
Mem0 Python |
| JavaScript or TypeScript | mem0ai |
oracledb |
Mem0 JavaScript and TypeScript |
Before You Begin
Prepare the following before you configure Mem0:
- Oracle AI Database 23.4 or later.
- An Oracle user that can create tables and vector indexes.
- An embedding model and its vector dimension. The default dimension is
1536. - An OpenAI API key or credentials for the LLM and embedding providers selected by your Mem0 configuration.
Python applications use the python-oracledb driver. JavaScript and TypeScript applications use the node-oracledb driver. Thick mode requires Oracle Client 23.4 or later.
Integration Workflow
The provider follows this workflow:
- Your application sends conversation messages to Mem0.
- Mem0 extracts useful memories and creates embeddings.
- The Oracle provider stores the memory text, embedding vectors, and JSON payloads in an Oracle table.
- Mem0 searches the stored vectors and applies user, agent, or metadata filters.
- Your application uses the returned memories to provide context to an LLM or agent.
Mem0 can create an HNSW or IVF vector index for approximate nearest-neighbor search. Set the provider option that disables index creation when you want exact search or manage the index yourself.
Learn More
- Mem0 Python: Configure the Oracle provider with Python.
- Mem0 JavaScript and TypeScript: Configure the Oracle provider with the Node.js SDK.
- Mem0 Oracle AI Vector Search documentation: Upstream provider reference.
- Oracle AI Vector Search: Oracle vector-search concepts and capabilities.