mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-15 20:08:29 +00:00
Fixes #4030 The local mem0 Memory class expects simple dict filters like {'user_id': 'bob'} instead of {'AND': [{'user_id': 'bob'}]}. The AND/OR filter format was being incorrectly converted to a RediSearch query like '@AND:{[{"user_id": "bob"}]} @user_id:{bob}' which caused the error 'Invalid filter expression'. This change: - Adds a for_local_memory parameter to _create_filter_for_search() - Returns simple dict filters for local Memory instances - Keeps AND/OR format for MemoryClient (cloud API) - Adds tests covering the issue scenario with valkey/redis Co-Authored-By: João <joao@crewai.com>