User isolation in crewai memory

Hi,

I’m presenting some problems with my agent application. I have a crew with different agents and tasks, but I need to implement a robust memory management for different users, I’m working with fastapi to reach the endpoints, but when multiple users try to access to the information sometimes be mix, then I applied some solutions, like save the task outputs in a persistent memory, specifically in json format, to be accessed before to make the context to another tasks What way can take to manage different user querys, sessions memory storages, that allow information isolation?

Hi welcome to the community

Some good reading here Memory - CrewAI

for user based memory, maybe mem0 would be a good place to start. Memory - CrewAI

crew = Crew(
    agents=[agent],
    tasks=[task],
    verbose=True,
    process=Process.sequential,
    external_memory=ExternalMemory(
        embedder_config={"provider": "mem0", "config": {"user_id": "U-123"}} # you can provide an entire Mem0 configuration
    ),
)
1 Like