AI / CrewAI Interview Questions II
Explain the internal working of CrewAI's memory system when memory=True is set?
- When a Crew is instantiated with
memory=True, CrewAI automatically constructs default instances of ShortTermMemory, LongTermMemory, and EntityMemory rather than requiring each to be built manually - The crew's embedder configuration is passed into the ShortTermMemory and EntityMemory constructors, since both rely on embeddings for similarity-based retrieval
- LongTermMemory is initialized without an embedder, since it isn't built around embedding-based similarity search the way the other two are
- ChromaDB serves as the default vector storage backend underlying this memory system, persisting the embedded data
This automatic wiring is what lets a single boolean flag produce a fully functioning three-tier memory system, while still leaving the door open to override any individual memory type with a custom instance when the defaults don't fit.
More Related questions...