Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Conversation

@EwanTauran
Copy link

Summary

Adds two new tools for searching across connected data sources via Airweave:

  • AirweaveSearchTool - Basic semantic search
  • AirweaveAdvancedSearchTool - Advanced search with filtering and AI reranking

What is Airweave?

Open-source platform providing unified search across 50+ data sources (Stripe, GitHub, Notion, Slack, etc.) with semantic search capabilities.

Changes

  • Added crewai_tools/tools/airweave_tool/ with both tools
  • Comprehensive README with examples and use cases
  • 18 unit tests with full coverage
  • Added airweave-sdk to optional dependencies
  • Updated package exports

Implementation

  • Mirrors Airweave Python SDK design (search() and search_advanced())
  • Full async support (_run() and _arun())
  • Follows all CrewAI tool patterns (BaseTool, Pydantic schemas, env vars)
  • Type-safe with comprehensive error handling

Testing

pytest tests/tools/airweave_tool_test.py

All 18 tests passing. No linting errors.

Related Issue

Closes issue #482

- Introduced AirweaveAdvancedSearchTool and AirweaveSearchTool to the tools module.
- Added airweave-sdk dependency in pyproject.toml.
cursor[bot]

This comment was marked as outdated.

- Updated offset parameter handling to remove unnecessary conditional checks in AirweaveAdvancedSearchTool and AirweaveSearchTool.
- Adjusted recency_bias parameter to accept values directly without conditions.
cursor[bot]

This comment was marked as outdated.

- Added framework name and version to client initialization in AirweaveAdvancedSearchTool and AirweaveSearchTool.
- Implemented safe retrieval of package version using importlib.metadata, defaulting to "unknown" if not available.
return "No results found for your query."

if response.status == "no_relevant_results":
return "Search completed but no sufficiently relevant results were found."
Copy link

Choose a reason for hiding this comment

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

Bug: Async Methods Lack Useful Error Guidance

The async _arun methods in both Airweave search tools return less helpful error messages than their sync _run counterparts. When no AI completion or relevant results are found, the async messages omit suggestions for next steps, like rephrasing the query or adjusting search parameters.

Additional Locations (2)

Fix in Cursor Fix in Web

offset=offset,
response_type=response_type,
recency_bias=recency_bias
)
Copy link

Choose a reason for hiding this comment

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

Bug: Airweave SDK Parameter Validation Mismatch

The AirweaveSearchTool's _run and _arun methods consistently pass default values of recency_bias=0.0 and offset=0 to the Airweave SDK. However, the current tests incorrectly assert that recency_bias is None and offset is omitted when these parameters are not explicitly provided, leading to a mismatch in validation.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant