crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[FEATURE]Unable to use `user_memory` with custom provider.

Open Saicheg opened this issue 8 months ago • 2 comments

Feature Area

Core functionality

Is your feature request related to a an existing bug? Please link it here.

https://github.com/crewAIInc/crewAI/blob/8df104218098dfcbd9cf85c3dfadd6d577962a24/src/crewai/memory/contextual/contextual_memory.py#L38

Currently there is a hard-coded condition, checking if provider of mem0 is assigned when using user memory. Which sounds very limiting. I would love to use any provider for user memories similar to other types of memory.

Describe the solution you'd like

    user_memory = UserMemory(
        storage=CustomLTMSQLiteStorage(
            db_path="/my_crew1/user_memory_storage.db",
            user_id=self.user_id
        )
),

Describe alternatives you've considered

No response

Additional context

No response

Willingness to Contribute

Yes, I'd be happy to submit a pull request

Saicheg avatar Mar 13 '25 16:03 Saicheg

Hey @Saicheg! I brought up a very similar topic to the CrewAI team recently. I believe we’ll be addressing your request soon. 🙌

lucasgomide avatar Mar 28 '25 13:03 lucasgomide

@lucasgomide I want to use my local mem0 configuration but I guess there is no support for it in the crew. Is there any other solution or I am wrong about this?

Jainish-S avatar Apr 11 '25 07:04 Jainish-S

https://docs.crewai.com/concepts/memory#using-external-memory-with-custom-storage

Saicheg avatar May 08 '25 16:05 Saicheg