Skip to content
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

Integrate Mem0 for providing long-term memory for AI Agents #3389

Merged
merged 18 commits into from
Sep 6, 2024

Conversation

Dev-Khant
Copy link
Contributor

@Dev-Khant Dev-Khant commented Aug 20, 2024

Added documentation and a notebook example demonstrating how to use memory with AI agents. Here Mem0 is used for managing the memory related operations.

Why are these changes needed?

It helps users to have a memory component attached to their agents. So AI agents can remember what user is talking about.

Related issue number

Checks

@Dev-Khant
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Mem0"

@Dev-Khant Dev-Khant changed the title Add Mem0 docs Integrate Mem0 for providing long-term memory for AI Agents Aug 20, 2024
@Hk669
Copy link
Contributor

Hk669 commented Aug 22, 2024

@Dev-Khant thanks for the PR. we would love to have this implementation in a notebook. can you please put the working code on the notebook.

@Dev-Khant
Copy link
Contributor Author

Hi @Hk669, Thanks for reviewing the PR. I have added the colab notebook link, please check.
Let me know if any more changes are required. Thanks!

@Hk669
Copy link
Contributor

Hk669 commented Aug 23, 2024

Hi @Hk669, Thanks for reviewing the PR. I have added the colab notebook link, please check. Let me know if any more changes are required. Thanks!

thanks for adding in the link, we would love to have the notebook in the repository. this should help you: https://github.com/microsoft/autogen/blob/main/notebook/contributing.md#how-to-get-a-notebook-displayed-on-the-website

@Josephrp
Copy link

love mem0 and taranjeet tools :-)

@Dev-Khant
Copy link
Contributor Author

Hey @Hk669 I added the notebook.

@Hk669
Copy link
Contributor

Hk669 commented Aug 23, 2024

Hey @Hk669 I added the notebook.

pre-commit to fix the code formatting. thanks

@Dev-Khant
Copy link
Contributor Author

Hey @Hk669 I added the notebook.

pre-commit to fix the code formatting. thanks

Sorry, I forgot about it. It's done now.

Copy link
Contributor

@Hk669 Hk669 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. thanks @Dev-Khant

@Hk669 Hk669 requested a review from thinkall August 26, 2024 05:56
Copy link
Collaborator

@thinkall thinkall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Dev-Khant for the PR. I've two quick questions.

  1. Why there are changes to autobuild_agent_library.ipynb and lats_search.ipynb?
  2. Can we add memory to Mem0 inside a chat conversations? In the examples, it looks like we can only retrieve memory. Would you like to add support to adding memory automatically? I believe that would bring more value to the users.

Copy link
Collaborator

@gagb gagb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comments.

@gagb
Copy link
Collaborator

gagb commented Aug 26, 2024

@Dev-Khant -- can you also please improve the description of this PR to explain what this PR is doing. Useful to do that in general to speed up the review process.

@Dev-Khant
Copy link
Contributor Author

Thank you @Dev-Khant for the PR. I've two quick questions.

  1. Why there are changes to autobuild_agent_library.ipynb and lats_search.ipynb?
  2. Can we add memory to Mem0 inside a chat conversations? In the examples, it looks like we can only retrieve memory. Would you like to add support to adding memory automatically? I believe that would bring more value to the users.

Hi @thinkall Thanks for reviewing the PR. Answers for your questions:

  1. autobuild_agent_library.ipynb and lats_search.ipynb were affected because of pre-commit checks. Do you want me to remove these files?
  2. Yes we actually wanted to do that but the issue we faced was right now it's not easy to directly alter with input messages for agents, for that we have to update the ConversableAgent class methods to support Mem0. We still wanted to explore the best way to integrate Mem0 with Autogen so we prepared this base example for users to get started.

Please share any feedbacks or suggestions on how can we use Mem0 inside chat conversations.

@Dev-Khant
Copy link
Contributor Author

@Dev-Khant -- can you also please improve the description of this PR to explain what this PR is doing. Useful to do that in general to speed up the review process.

Sorry my bad, should have written proper description. Will take care of this from now on!

Copy link
Collaborator

@thinkall thinkall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Dev-Khant for the updates.

You may want to start with extending ConversableAgent instead of updating it directly. There are some examples under folder agentchat/contrib. But this can be done in a separate PR.

@Dev-Khant
Copy link
Contributor Author

@thinkall We were already planning to extend the ConversibleAgent class itself, but still, we wanted to explore the best way to integrate Mem0 with Autogen so we prepared this base example for users to get started.

@Dev-Khant
Copy link
Contributor Author

@gagb Please let me know if anything is pending from my side for the PR. Thanks!

@Dev-Khant Dev-Khant requested a review from gagb September 4, 2024 10:28
@gagb gagb enabled auto-merge September 5, 2024 20:55
@gagb gagb added this pull request to the merge queue Sep 6, 2024
Merged via the queue into microsoft:main with commit 1ff477f Sep 6, 2024
19 checks passed
@marklysze marklysze mentioned this pull request Sep 13, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants