feat: add Tavily as a pluggable internet search backend#1332
Closed
ParakhJaggi wants to merge 2 commits intoMemTensor:dev-20260323-v2.0.11from
Closed
feat: add Tavily as a pluggable internet search backend#1332ParakhJaggi wants to merge 2 commits intoMemTensor:dev-20260323-v2.0.11from
ParakhJaggi wants to merge 2 commits intoMemTensor:dev-20260323-v2.0.11from
Conversation
added 2 commits
March 23, 2026 13:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TavilySearchRetrieverclass using thetavily-pythonSDK, following the sameretrieve_from_internetinterface andTextualMemoryItemmetadata schema asBochaAISearchRetrieverTavilySearchConfiginInternetRetrieverConfigFactory.backend_to_classand wired instantiation inInternetRetrieverFactory.from_config()APIConfig.get_internet_config()to auto-select Tavily whenTAVILY_API_KEYis set andBOCHA_API_KEYis absenttavily-pythonas an optional dependency under a newtavilyextra and in theallgroupTAVILY_API_KEYFiles changed
src/memos/memories/textual/tree_text_memory/retrieve/tavilysearch.py(new)src/memos/configs/internet_retriever.pysrc/memos/memories/textual/tree_text_memory/retrieve/internet_retriever_factory.pysrc/memos/api/config.pypyproject.tomlexamples/basic_modules/textual_memory_internet_search_example.pyDependency changes
tavily-python (>=0.5.0,<1.0.0)as optional dependency under newtavilyextratavily-pythonto theallextras groupEnvironment variable changes
TAVILY_API_KEY— API key for Tavily Search (additive; existingBOCHA_API_KEY,GOOGLE_API_KEY,GOOGLE_SEARCH_ENGINE_IDunchanged)Notes for reviewers
TAVILY_API_KEYis set andBOCHA_API_KEYis not set, Tavily is used; otherwise BochaAI remains the defaultsearch_depth="basic"for cost efficiency; can be changed to"advanced"for higher relevanceAutomated Review