Repository navigation
feat(search): add Keenable as a search engine, keyless by default - #1180
Open
KGKallasmaa wants to merge 1 commit into
Open
KGKallasmaa wants to merge 1 commit into
KGKallasmaa wants to merge 1 commit into
Conversation
Author
|
@VinciGit00 @lurenss this adds an optional |
Author
|
@VinciGit00 @lurenss gentle ping: checks are green and it's mergeable. Let me know if you'd like any changes. |
This branch has not been deployed
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.
What this changes
Adds
keenableas asearch_engineforSearchGraph/SearchInternetNode(search_on_web), next toduckduckgo,bing,searxngandserper. Keenable is an independent web index built for agents. It works without an API key, which makes it the second zero-credential engine after DuckDuckGo. It also returns structured JSON from an API, so there's no HTML scraping and noddgsdependency.research_web.py: new_search_keenable().KEENABLE_API_KEYenv var), it calls the public endpointPOST https://api.keenable.ai/v1/search/public. That endpoint is rate-limited per IP and requires anX-Keenable-Titleapp header, which is set toscrapegraphai.POST /v1/searchwithX-API-Key.max_resultsis capped at Keenable's per-call limit of 50.SearchRequestError.SearchConfiggainskeenable_api_keyand accepts"keenable".SearchInternetNodereadskeenable_api_keyfrom the node config, andSearchGraphpasses it through, the same wayserper_api_keyis handled.API reference: https://docs.keenable.ai/api-reference/search (see "Without a key").
Tests
tests/utils/research_web_keenable_test.py: 6 mock-based tests with no network. They cover the keyless endpoint and title header, the keyed endpoint, the env-var key, the 50 cap, trimming tomax_results, and HTTP error →SearchRequestError.unit-testslist in.github/workflows/test-suite.yml, because my token can't push workflow changes. If you'd like it in CI, it's one line undertests/utils/parse_state_keys_test.py.uv run pytest …).ruff checkandblack --checkare clean on the changed files.search_on_web("Lightpanda headless browser for AI agents", search_engine="keenable", max_results=5)returned 5 URLs, starting withhttps://github.com/lightpanda-io/browser.The same keyless pattern is the default search engine in Lightpanda's headless browser (lightpanda-io/browser#3265). Disclosure: I work with the Keenable team. Targeting
pre/betaper the repo's flow.