Skip to content

Conversation

@azaddhirajkumar
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 11, 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.

5 Notebook Files Modified:

Notebook File Frontmatter Included?
capella-model-services/haystack/RAG_with_Couchbase_Capella.ipynb
capella-model-services/haystack/query_based/RAG_with_Capella_Model_Services_and_Haystack.ipynb
crewai-short-term-memory/gsi/CouchbaseStorage_Demo.ipynb
crewai-short-term-memory/query_based/CouchbaseStorage_Demo.ipynb
crewai-short-term-memory/search_based/CouchbaseStorage_Demo.ipynb

5 Frontmatter Files Modified:

Frontmatter File
capella-model-services/haystack/query_based/frontmatter.md
capella-model-services/haystack/search_based/frontmatter.md
crewai-short-term-memory/gsi/frontmatter.md
crewai-short-term-memory/query_based/frontmatter.md
crewai-short-term-memory/search_based/frontmatter.md
Note: frontmatter will be checked and tested in the Test Frontmatter workflow.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @azaddhirajkumar, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly updates and reorganizes the CrewAI Short Term Memory tutorials for Couchbase. It introduces a new, more advanced tutorial showcasing the use of Couchbase's Hyperscale and Composite Vector Indexes for efficient memory storage and retrieval in AI agents. Concurrently, the existing tutorial, which previously used FTS, has been refined and renamed to align with the concept of Search Vector Index, ensuring all examples leverage the most current and performant Couchbase vector search capabilities. These changes aim to provide clearer, more up-to-date guidance for integrating Couchbase as a memory backend for CrewAI.

Highlights

  • Tutorial Restructuring: The tutorial structure for CrewAI Short Term Memory with Couchbase has been reorganized, deprecating the GSI-based approach and introducing new 'query_based' and 'search_based' directories to better categorize vector index types.
  • New Query-Based Tutorial: A new tutorial (crewai-short-term-memory/query_based/CouchbaseStorage_Demo.ipynb) has been added, demonstrating the implementation of CrewAI short-term memory using Couchbase's Hyperscale and Composite Vector Indexes, complete with performance testing and agent memory demos.
  • Search-Based Tutorial Updates: The existing FTS-based tutorial has been updated, renamed to 'search_based', and enhanced with dependency updates, Google Colab setup instructions, and clarified terminology for Search Vector Index.
  • Dependency Updates: Key Python package dependencies, specifically 'langchain-couchbase' and 'langchain-openai', have been updated to their latest versions in the 'search_based' tutorial to ensure compatibility and leverage recent improvements.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request provides a significant update to the CrewAI short-term memory tutorials, aligning them with the latest documentation by replacing the previous gsi and fts based examples with new query_based (Hyperscale/Composite indexes) and search_based (Search Vector Index) tutorials. The restructuring and content updates are well-executed and improve the overall quality and clarity of the documentation. I've included a few review comments to enhance code robustness, ensure consistency in configuration, and correct a minor inaccuracy in the documentation.

" ping_result = self.cluster.ping()\n",
" query_available = False\n",
" for service_type, endpoints in ping_result.endpoints.items():\n",
" if service_type.name == 'Query': # Query Service for Hyperscale and Composite Vector Indexes\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Checking the service type by its string name (service_type.name == 'Query') is less robust than comparing with the enum member directly. Using service_type == ServiceType.Query is safer against potential future changes and is more consistent with the approach in the search_based notebook.

                if service_type == ServiceType.Query:  # Query Service for Hyperscale and Composite Vector Indexes

Comment on lines +741 to +742
" print(\"Waiting for index to become available...\")\n",
" time.sleep(5)\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Using a fixed time.sleep(5) to wait for the index to become available is not robust and can lead to flaky behavior, as index creation time can vary. A more reliable approach is to poll for the index status until it's ready. For a production-ready example, you could implement a loop that periodically checks the index status using the Couchbase SDK's QueryIndexManager.

@azaddhirajkumar azaddhirajkumar changed the title Updated the CrewAI Short Term Mem tutorial according to the latest docs DA-1318 Updated the CrewAI Short Term Mem tutorial according to the latest docs Dec 11, 2025
Copy link
Contributor

@VirajAgarwal1 VirajAgarwal1 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Just a couple of minor changes are needed before merging.

Comment on lines +743 to +748
" \n",
"except Exception as e:\n",
" if \"already exists\" in str(e).lower():\n",
" print(f\"Vector index '{storage.index_name}' already exists, proceeding...\")\n",
" else:\n",
" print(f\"Error creating vector index: {str(e)}\")"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better to have the output of the test performance section code blocks.

"id": "fa3af5ad",
"metadata": {},
"source": [
"## Introduction"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably add some text under the Introduction.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to H2

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.

3 participants