Skip to content

Conversation

@CShorten
Copy link

@CShorten CShorten commented Oct 1, 2025

Note

Introduces WeaviateQueryAgentAskTool and WeaviateQueryAgentSearchModeTool to query Weaviate via QueryAgent for answers or retrieval results.

  • Tools (Weaviate):
    • New: crewai_tools/tools/weaviate_tool/query_agent.py
      • WeaviateQueryAgentAskTool: asks natural language questions using QueryAgent, returning final_answer.
      • WeaviateQueryAgentSearchModeTool: performs retrieval-only search via QueryAgent.search, returning JSON of object properties and uuid (with limit).
      • Configuration: requires collection_names, weaviate_cluster_url, weaviate_api_key; connects with Auth.api_key and closes client.
      • Dependency handling: prompts to install weaviate-client and weaviate-agents if missing; declares package_dependencies.

Written by Cursor Bugbot for commit acce52f. This will update automatically on new commits. Configure here.

@CShorten CShorten changed the title Add WeaviateQueryAgentAskTool / WeaviateQueryAgentSearchModeTool Add WeaviateQueryAgentAskTool / WeaviateQueryAgentSearchModeTool Oct 1, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

if not WEAVIATE_AVAILABLE:
raise ImportError(
"You are missing the 'weaviate-client' and 'weaviate-agents' packages. Please install them to use this tool."
)
Copy link

Choose a reason for hiding this comment

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

Bug: Dynamic Imports Fail to Update Availability Flag

After dynamically installing missing Weaviate packages in __init__, the WEAVIATE_AVAILABLE flag and module imports aren't re-evaluated. This causes the flag to remain False, leading the _run method in both WeaviateQueryAgentAskTool and WeaviateQueryAgentSearchModeTool to incorrectly raise an ImportError, making the tools unusable within the same process.

Additional Locations (1)

Fix in Cursor Fix in Web

)

if not self.weaviate_cluster_url or not self.weaviate_api_key:
raise ValueError("WEAVIATE_URL or WEAVIATE_API_KEY is not set")
Copy link

Choose a reason for hiding this comment

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

Bug: Mismatched Config Names in Error Messages

The ValueError messages in both _run methods refer to WEAVIATE_URL and WEAVIATE_API_KEY. These don't match the weaviate_cluster_url and weaviate_api_key attributes being checked, which could confuse users debugging configuration.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

1 participant