feat: add Keenable as a configurable internet search backend#2072
Open
ilya-bogin-keenable wants to merge 2 commits into
Open
feat: add Keenable as a configurable internet search backend#2072ilya-bogin-keenable wants to merge 2 commits into
ilya-bogin-keenable wants to merge 2 commits into
Conversation
Add Keenable alongside the existing bocha / tavily / google / bing / xinyu internet retrievers, following the Tavily backend pattern. - retrieve/keenablesearch.py: InternetKeenableRetriever. Keyless by default (no SDK, a thin requests call): with no key it hits /v1/search/public (rate-limited); a key switches to /v1/search with an X-API-Key header. Attribution via X-Keenable-Title. Results map into TextualMemoryItem exactly like the Tavily retriever. - configs/internet_retriever.py: KeenableSearchConfig (api_key optional) and registration in InternetRetrieverConfigFactory. - retrieve/internet_retriever_factory.py: register "keenable" + constructor. - api/config.py: INTERNET_SEARCH_BACKEND=keenable branch (KEENABLE_API_KEY optional, keyless by default). py_compile and ruff pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Adds Keenable as a new internet search backend alongside the existing Bocha / Tavily / Google / Bing / Xinyu retrievers, following the Tavily backend pattern (#1357). Additive and opt-in via
INTERNET_SEARCH_BACKEND=keenable; existing backends are untouched.Keenable is a web search API built for AI agents. Unlike the key-required backends it is keyless by default: with no key it calls the public endpoint (rate-limited), and an optional
KEENABLE_API_KEYonly lifts the cap.Files changed
src/memos/memories/textual/tree_text_memory/retrieve/keenablesearch.py(new):InternetKeenableRetriever. No SDK dependency, a thinrequestscall. Keyless requests hit/v1/search/public; a configured key switches to/v1/searchwith anX-API-Keyheader. Attribution viaX-Keenable-Title. Results map intoTextualMemoryItemthe same way the Tavily retriever does.src/memos/configs/internet_retriever.py:KeenableSearchConfig(API key optional) + registration inInternetRetrieverConfigFactory.src/memos/memories/textual/tree_text_memory/retrieve/internet_retriever_factory.py: registerkeenable+ constructor branch.src/memos/api/config.py:INTERNET_SEARCH_BACKEND=keenablebranch (KEENABLE_API_KEYoptional).Testing
python -m py_compileon all changed files: passes.ruff checkon all changed files: passes.