Memory is never saved when running the crew

Hi everyone!

I tried adding the use of memories in my crew using memory=True.
The files of the db seem to be created correctly with the tables and indexes (embedchain.db, long_term_memory_storage.db, etc…) but they are all empty and the agents don’t write there.

This is the crew creation:

@crew
def crew(self) -> Crew:
    """Creates the Aiagents crew"""
    return Crew(
        agents=self.agents,  
        tasks=self.tasks,  
        process=Process.sequential,
        verbose=True,
        memory=True
    )

My agents are interacting with each other, but not in a chat with a user if that changes anything.
I expected their answers or outputs to be saved in the memory but it doesn’t seem to work. The only data I see saved is in the ‘latest_kickoff_task_outputs.db’ file, and it is deleted in the beginning of every run.

Am I doing something wrong? Should I have added something except for memory=True in the crew?

Also, where exactly should I see if the memory was saved? (file, db name and table)

4 Likes

do you have memory=true for each agent? that might help

good luck

1 Like

Yes, I also set it to each agent

I have the same issue and I think this feature has unintentionally been removed in a bigger refactoring. Seems to be this issue.

1 Like