Long Term Memory

Hi,

I’m trying to equip my Crew with Long Term memory with the goal of improving results. It’s a crew that finds leads by browsing online and I want to make sure the lead quality is high.

The docs on crewAI Memory Systems - crewAI only describe a general switch to turn on memory (memory=True), but not how to differentiate between short and long term memory. Also, I don’t see any resources on inspecting the data storage of the stored memory.

Are there any resources for this that dive deeper?

1 Like

Hey there!

That’s a great question! You’re right that in CrewAI, turning on memory with memory=True enables an agent to remember things within a session. But when it comes to differentiating between short-term and long-term memory, or checking the memory data, there are a few extra steps involved that aren’t directly mentioned in the basic docs.

In terms of long term memory you can actually load a doc to your agent before it begins a task, then it can use the information in that document to stick to a predefined outcome.

I use this method for memory in text format.

4 Likes

Memory=True enables a lot of things. Short term, long term, contextual, and entity memory. All in the docs. If you’d like to retain long term memory, but delete short term, etc, you can reset memories individually. The docs tell you how to do it at the cli level. You can do it also by looking at the code and going to the individual methods that reset specific memories( maybe not sanctioned).

1 Like

Thank you, @ScarletAI That is super helpful. I’ll give it a try. Seems straightforward to just read from a file, as it’s not more complex as adding a long Backstory perhaps. I wonder if I should be using other techniques as well to get more specific outcomes.

Thanks @moto Sounds like looking at the source code is the way to go here. I was hoping for some docs that lay out how to interact with the memory, i.e. read write to it.

crewAI Wiki has a memory page you should check out.

Let me know if there is still something missing

1 Like

Hey Bob, I’m glad you found it helpful.

feel free to reach out personally to have a chat if you would like. I am always open for talking about crews.

But I would also recommend building projects using Crew GPT as you can have conversations with the documentation. That has been my main form of troubleshooting in real time while I am building.

2 Likes

Hi Raphael,

I appreciate that. I’ll DM you and will also check out the Crew GPT feature.

1 Like