Skip to content

fixes mem0 with valkey/redis issue#4055

Open
MatthiasHowellYopp wants to merge 2 commits intocrewAIInc:mainfrom
MatthiasHowellYopp:mh/fix/valkey
Open

fixes mem0 with valkey/redis issue#4055
MatthiasHowellYopp wants to merge 2 commits intocrewAIInc:mainfrom
MatthiasHowellYopp:mh/fix/valkey

Conversation

@MatthiasHowellYopp
Copy link

@MatthiasHowellYopp MatthiasHowellYopp commented Dec 9, 2025

changes to support using mem0 with valkey/redis as external memory provider for crewai

fixes #4031


Note

Medium Risk
Changes query filter shape sent to local Mem0 backends for Valkey/Redis, which can affect search results/partitioning if misapplied. Risk is mitigated by extensive new tests covering provider and cloud/local combinations.

Overview
Fixes Mem0Storage search filtering for local Mem0 backends using Valkey/Redis by flattening a single AND condition (e.g., { "AND": [{...}] } -> {...}) since those vector stores don’t support Mem0’s AND/OR filter structure.

Adds regression coverage around Valkey/Redis vs other providers, ensures MemoryClient (cloud) never flattens filters even if local_mem0_config is present, and hardens config parsing for None local_mem0_config/vector_store. Test isolation is also improved by resetting the last event ID in conftest.py.

Written by Cursor Bugbot for commit fe7a87e. This will update automatically on new commits. Configure here.

@Vidit-Ostwal
Copy link
Contributor

Vidit-Ostwal commented Feb 3, 2026

Hey @MatthiasHowellYopp, maybe you can collapse all the commits into one for a cleaner git history

Try this

git checkout feature-branch
git reset --soft main
git commit -m "Add <feature-name>"
git push --force-with-lease

I am not a maintainer, feel free to ignore this...

@greysonlalonde
Copy link
Contributor

Hey @MatthiasHowellYopp, maybe you can collapse all the commits into one for a cleaner git history

Try this

git checkout feature-branch
git reset --soft main
git commit -m "Add <feature-name>"
git push --force-with-lease

I am not a maintainer, feel free to ignore this...

This would be great!

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@MatthiasHowellYopp
Copy link
Author

@greysonlalonde changes done, looks like I need you (or someone) to let the checks run.

@MatthiasHowellYopp
Copy link
Author

@greysonlalonde can you review - or recommend someone who can? tks.

@MatthiasHowellYopp
Copy link
Author

@greysonlalonde Can we try again? looks lIke I need workflow approval and a review.

@MatthiasHowellYopp MatthiasHowellYopp force-pushed the mh/fix/valkey branch 4 times, most recently from e095719 to 8bc007d Compare February 6, 2026 19:14
@MatthiasHowellYopp
Copy link
Author

@greysonlalonde Is there something I can do to get this to the other side of merged? Seems I'm back to needing the checks permitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants