This project provides a lightweight, extensible library for dynamically selecting the most relevant tools for your AI agent based on user queries.
npm install ai-tool-retrieverconst retriever = await ToolRetriever.create({
tools: allMyTools,
embeddingProvider: anyEmbeddingProvider,
store: inMemoryOrPersistentStore,
})
const relevantTools = await retriever.retrieve(userPrompt)This repo contains the following packages:
packages/ai-tool-retriever: The core library for semantic tool retrieval.packages/benchmarkA package to benchmark the performance of embedding and search operations.packages/e2eA package to validate behavior in real-world scenarios.