crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
18.98k stars 2.61k forks source link

Add the ability to store CrewAI's memory (short and long) in a database other than Chroma and SQLLite #967

Closed RyannosaurusRex closed 1 month ago

RyannosaurusRex commented 1 month ago

I'm trying to ship a CrewAI application into production. The current implementation of short and long-term memory use SqlLite and ChromaDB and don't allow the ability to swap out these stores with anything else.

More specifically, I'd like to use CosmosDB as the store for these, but I don't have a mechanism to write my own implementation. Currently there's not an interface, but the actual methods that store and retrieve data don't seem specific to Chroma/SQLLite at first glance.

I'd really like memory classes like LongTermMemory to be able to accept an overriding implementation instead of CrewAI creating it directly, like this:

storage = LTMSQLiteStorage()

I would want the ability to pass my own implementation into the LongTermMemory constructor, and then, if I don't override it with something, it would default to LTMSQLiteStorage to have a great experience out of the box as it currently does today.

TL;DR: As someone shipping a CrewAI app to production, I want the ability to write my own implementation for short-term and long-term storage, so that I can store this information externally to support more scaling options as well as to have the option to not have to introduce a new database technology within my organization.

ryanc4ai commented 1 month ago

This is the discord post related: https://discord.com/channels/1192246288507474000/1250488576404226078

slavakurilyak commented 1 month ago

You could use mem0 by @mem0ai as it supports both Qdrant and Chroma (vector stores) and SQLite (traditional datastore) out of the box