Skip to content

INTPYTHON-481 MongoDB integration for mem0 #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,20 @@ tasks:
params:
file: src/langchain-js/langchainjs/libs/langchain-mongodb/results.xml

- name: test-mem0-python-local
tags: [ local ]
commands:
- func: "fetch repo"
- func: "setup local atlas"
- func: "execute tests"

- name: test-mem0-python-remote
tags: [ remote ]
commands:
- func: "fetch repo"
- func: "setup remote atlas"
- func: "execute tests"

buildvariants:
- name: test-semantic-kernel-python-rhel
display_name: Semantic-Kernel RHEL Python
Expand Down Expand Up @@ -416,3 +430,14 @@ buildvariants:
# tasks:
# - name: test-langchain-js-local
# - name: test-langchain-js-remote

- name: test-mem0-python-rhel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, this was mainly a "see what others were running on (and their confid) and copy that" so if i chose incorrectly lmk!
Similarly, not 100% about the whole batchtime -- some variants have batchtime, others dont...but I think since the integration is done, we do want it?

display_name: mem0 RHEL Python
expansions:
DIR: mem0-python
run_on:
- rhel87-small
tasks:
- name: test-mem0-python-local
- name: test-mem0-python-remote
batchtime: 10080 # 1 week
3 changes: 3 additions & 0 deletions .evergreen/setup-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ case $DIR in
langchain-js)
MONGODB_URI=$LANGCHAIN_MONGODB_URI
;;
mem0-python)
MONGODB_URI=$MEM0_URI
;;
*)
echo "Missing config in setup-remote.sh for DIR: $DIR"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions mem0-python/config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REPO_NAME=mem0
REPO_ORG=mem0ai
DATABASE=mem0_test_db
24 changes: 24 additions & 0 deletions mem0-python/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -eu

# Get the MONGODB_URI.
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
ROOT_DIR=$(dirname $SCRIPT_DIR)
. $ROOT_DIR/env.sh

. $ROOT_DIR/.evergreen/utils.sh

PYTHON_BINARY=$(find_python3)

$PYTHON_BINARY -m venv venv_pipeline
source venv_pipeline/bin/activate

pip install hatch
make install_all

# Run tests.
export MONGODB_URI=$MONGODB_URI
pip install pytest
pip install .
pytest tests/vector_stores/test_mongodb.py