-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Azure CosmosDB MongoDB vCore option for agent memory #3187
Conversation
This is pretty much an exact duplication of the current teachability code, except it uses MongoDB vCore instead of ChromaDB. Why? Because ChromaDB stores all its information in memory, so it is not ideal for long conversations or for containers/vms that delete everything on restart. This allows memories to be stored and recalled via a permanent database rather than an ephemeral one, and it is not stored in memory on the virtual machine so it will not slow down the execution of the agent workflow.
I like the idea of extending to different vector DBs. Can we do it without code duplication? @thinkall does the current vector DB abstraction allow an extensible design here? |
@sonichi thank you for your response. I would love to do this without any code duplication, but the original memory module has ChromaDB entangled in the code, no abstractions or interfaces at all. I had to pretty much rewrite everything from scratch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we've a vectordb abstraction here https://github.com/microsoft/autogen/tree/main/autogen/agentchat/contrib/vectordb, it would be nice to update the code of teachability to leverage the vectordb abstraction, then we can support different vectordbs easily like we've done with RAG agent.
Hi @tyler-suard-parker - it looks like things have evolved quite a bit since you sent in this valuable contribution. Think about whether you would like to update with @thinkall's suggestions or perhaps engage with us on the new 0.4 codebase. Closing for now and please reopen if you want to revive this work. |
@rysweet That is the nicest closing message I have ever received on a pull request. Thank you! |
This is pretty much an exact duplication of the current teachability code, except it uses MongoDB vCore instead of ChromaDB. Why? Because ChromaDB stores all its information in memory, so it is not ideal for long conversations or for containers/vms that delete everything on restart. This allows memories to be stored and recalled via a permanent database rather than an ephemeral one, and it is not stored in memory on the virtual machine so it will not slow down the execution of the agent workflow.
@sonichi @victordibia
Why are these changes needed?
Currently, AutoGen stores memories using ChromaDB. While easy to use and capable, ChromaDB must store information in memory, which is difficult for low-memory virtual machines like Azure WebApps or FuntionApps (they have around 500mb). These files allow AutoGen to store memories in an external vector database using Azure CosmosDB for MongoDB vCore and perform vector searches on them.
The code automatically sets up the vector databases and creates vector indexes on them.
Related issue number
Closes Issue #3066
Checks