Skip to content

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
Touches query filter construction for Mem0Storage.search, which can change what memories are returned for Valkey/Redis backends. Scope is limited to local Memory instances and is covered by new edge-case tests.

Overview
Mem0Storage now conditionally flattens search filters for local mem0.Memory instances when the configured vector store provider is valkey or redis, converting a single-condition {"AND": [...]} into a plain dict to match backends that don’t support AND/OR.

Adds targeted tests covering Valkey/Redis flattening, non-flattening for other providers and OR cases, safe handling of None local_mem0_config/vector_store, and ensuring cloud MemoryClient calls keep the structured AND/OR filter format even if a Valkey config is present.

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

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.

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.

2 participants