Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DA-644: Short-Term Memory with Crew-AI and Couchbase #23

Merged
merged 15 commits into from
Apr 3, 2025

Conversation

teetangh
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Jan 15, 2025

Caution

Notebooks or Frontmatter Files Have Been Modified

  • Please ensure that a frontmatter.md file is accompanying the notebook file, and that the frontmatter is up to date.
  • These changes will be published to the developer portal tutorials only if frontmatter.md is included.
  • Proofread all changes before merging, as changes to notebook and frontmatter content will update the developer tutorial.

1 Notebook Files Modified:

Notebook File Frontmatter Included?
crewai-short-term-memory/CouchbaseStorage_Demo.ipynb

1 Frontmatter Files Modified:

Frontmatter File
crewai-short-term-memory/frontmatter.md
Note: frontmatter will be checked and tested in the Test Frontmatter workflow.

@teetangh teetangh self-assigned this Jan 15, 2025
@teetangh teetangh added the enhancement New feature or request label Jan 15, 2025
@teetangh teetangh marked this pull request as ready for review January 15, 2025 11:19
@teetangh teetangh requested a review from nithishr February 27, 2025 09:32
@deniswsrosa
Copy link
Contributor

@teetangh I would like to congratulate you on the 2 months anniversary of your PR

@teetangh
Copy link
Collaborator Author

Hey @deniswsrosa,
Apologies for the delay in getting this PR merged. I'm still waiting for the final review and feedback from @nithishr. I'm following up to get it reviewed ASAP and will address any required changes quickly. Hoping to get it merged soon.

@nithishr
Copy link
Contributor

@teetangh Few things to improve:

  • Please explain what memory is & how it is useful in an Agent.
  • Typo in Load Sensitive Information
  • The example mentions that Couchbase does not have Vector Search, which we should not publish in the tutorial.
  • Are you sure that the crew ai agent is using Couchbase as the short-term memory? There are references to ChromaDB in the logs. I suspect that ChromaDB is the default & being used for the memory. Only the explicit memory reference is being powered by Couchbase.
  • [Minor] You don't need to install couchbase SDK. It will get installed with langchain-couchbase.
  • Conclusion/summary is missing

…AI memory types, specifically focusing on short-term and long-term memory. Updated agent roles and tasks to reflect a sports analysis context, including recent comments from Pep Guardiola on Manchester City's performance. Improved installation instructions and corrected minor typos.
…ved performance scores. Adjusted Pep Guardiola's commentary for clarity and consistency, reflecting recent insights on Manchester City's form. Enhanced memory handling configuration for better data management.
@teetangh
Copy link
Collaborator Author

@nithishr Done:

  • Explained what memory is and how it helps an Agent.
  • Fixed the typo in "Load Sensitive Information."
  • Removed the statement about Couchbase not having Vector Search.
  • Verified memory usage in Crew AI—ChromaDB was the default memory storage in the crew class. Now changed it to use the CouchbaseStorage class.
  • Removed the separate Couchbase SDK installation step since it's included with langchain-couchbase.
  • Added a conclusion/summary section.

@nithishr
Copy link
Contributor

@teetangh Looks much better. A couple of suggestions:

  • Can we show the information that is stored in Couchbase when the Agent is running? Could be a single SQL++ query or even a simple screenshot of the data that is being stored in Couchbase with an explanation. It is still not clear to me without running the code about the information being stored in the memory when the agent is running.
  • Also, I believe the Couchbase Storage that you have written can be used for long term storage as well. If so, please add a note on the same.
  • I think the memory section is coming from the CrewAI docs. If so, please add a reference to it.

@teetangh
Copy link
Collaborator Author

@nithishr added both notes and attached screenshot as you mentioned

@nithishr
Copy link
Contributor

@teetangh Are you sure that something is getting stored in Couchbase during the execution of the Crew AI agent? The response I see in the memory is the one that you store earlier. You are getting two results but only one from before is returned with a score threshold of 0 which I interpret as nothing got stored in the Memory during the agent run.
Can you double check?

Also, with the note on CrewAI documentation, please add the link to their docs.

… for initialization, reset, and memory operations. Updated demo notebook to reflect recent changes in agent roles and tasks, focusing on sports analysis and Pep Guardiola's insights on Manchester City's performance. Improved memory handling and search functionality for better data management and retrieval.
…agent-specific information. Implemented cleanup for LLM response formats and improved memory entry previews for better debugging. Updated main function to display agent and timestamp details in memory listings.
…y handling and logging. Improved response format cleanup for LLM outputs and added detailed previews for memory entries. Removed outdated image asset and refined content to reflect recent insights on Manchester City's performance under Pep Guardiola.
… performance and enhance content clarity. Refined analysis of Manchester City's current form under Pep Guardiola, emphasizing tactical insights and player contributions. Added a markdown section confirming successful document storage in Couchbase.
@nithishr
Copy link
Contributor

@teetangh Can you add a note on:

  • The parameters for initializing the store are hardcoded/read from the environment variables. There should be info on setting them in the tutorial/notebook.
  • Also, in the ideal scenario the Memory storage should be using the SDK directly instead of LangChain. You should add a note that it is done for simplicity & link to how to do it using the Couchbase SDK.

@teetangh
Copy link
Collaborator Author

teetangh commented Apr 1, 2025

@nithishr added both notes

nithishr
nithishr previously approved these changes Apr 2, 2025
Copy link
Contributor

@nithishr nithishr left a comment

Choose a reason for hiding this comment

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

Please add the open items & merge the PR

@teetangh teetangh merged commit 121ab5c into main Apr 3, 2025
5 checks passed
@nithishr nithishr deleted the DA-644-short-term-memory-with-crew-ai-and-couchbase branch April 3, 2025 09:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants