Database Memory Agent
We're building a Database Memory Agent with RAG (Retrieval Augmented Generation) capabilities that integrates MongoDB Atlas Vector Search for semantic document retrieval, Voyage AI for embeddings, and OpenAI for intelligent responses. The agent uses tools (vector search and calculator) to answer questions from uploaded documents and perform calculations, with context-aware memory across conversations.
We use:
- MongoDB Atlas Vector Search for semantic search and document storage
- Voyage AI for generating embeddings (voyage-3-large model)
- OpenAI for LLM responses (gpt-4o)
- Streamlit to wrap the logic in an interactive UI
Set Up
Prerequisites
You must have the following:
One of the following MongoDB cluster types:
An Atlas cluster running MongoDB version 6.0.11, 7.0.2, or later. Ensure that your IP address (Internet Protocol address) is included in your Atlas project's access list.
A local Atlas deployment created using the Atlas CLI. To learn more, see Create a Local Atlas Deployment.
A MongoDB Community or Enterprise cluster with Search and Vector Search installed.
A Voyage AI API key.
An OpenAI API key.
Configure Environment Variables
Copy .env.example to .env and configure the following environment variables: