Skip to content

feat: Add VaultSearchTool for consensus-based knowledge retrieval#5712

Open
aszv wants to merge 1 commit intocrewAIInc:mainfrom
aszv:feat/add-vault-search-tool
Open

feat: Add VaultSearchTool for consensus-based knowledge retrieval#5712
aszv wants to merge 1 commit intocrewAIInc:mainfrom
aszv:feat/add-vault-search-tool

Conversation

@aszv
Copy link
Copy Markdown

@aszv aszv commented May 5, 2026

Description:
This tool perserves resolved queries into a persistent database (Knowledge Vault).
It enables agents to query the vault for existing solutions before triggering expensive LLM reasoning loops.

Furthermore, the tool tracks community consensus via upvotes/downvotes and timestamps to ensure knowledge remains current and reliable.

When used by collaborative teams or enterprise, the cost-saving potential scales significantly with the organization's size.

Key Features:
Token saving: This tool mitigates Knowledge Redundancy within organizations. By leveraging previously resolved queries, the tool foregoes the requirement for repetitive execution of expensive multi-step agent reasoning.

Expert-in-the-Loop Consensus: User can leverage expert upvotes/downvotes to prioritize information vetted by senior members, effectively bridging the domain knowledge gap and calibrating trust.

Testing:
[x] Unit Tests: Full coverage in lib/crewai-tools/tests/tools/test_vault_search_tool.py using responses for API mocking.

[x] Dependencies: Added responses to lib/crewai-tools/pyproject.toml for dev-testing.

[x] Schema Validation: Verified args_schema compatibility with Pydantic and CrewAI BaseTool standards.

[x] Integration: Manually verified compatibility with CrewAI agent execution loops.

🔗 Reference Implementation (Backend)
To help users and reviewers test this tool, a reference implementation of the Knowledge Vault API server (FastAPI + Vector DB) is available at: aszv/CrewAI_Vault

Usage Example (frontEnd + backEnd):
A user requests a "Cloud Migration Strategy".
Instead of immediately triggering a multi-step Agent search (which consumes tokens), the tool first retrieves verified consensus from the Vault:

(a) Intercept & Retrieve
The Vault displays existing records ranked by semantic similarity and community trust:

=== 📚 Vault Search Results ===
[1] (Sim: 0.8045 | 👍1 👎0) Strategy for migrating from local Data Centers to AWS Serverless...
[2] (Sim: 0.7976 | 👍5 👎0) Step-by-step strategy for migrating from On-Premise to AWS...

(b) Expert-Led Decision Making (Trust Calibration)
Even if the user lacks deep domain knowledge, they can examine the voter metadata for each record.
If Record [2] was upvoted by a Lead Cloud Architect, the user can confidently select it.

Outcome:
The user gains a high-quality, expert-vetted answer in seconds, saving 100% of the tokens that would have been spent on a fresh Agent-led research cycle.

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