Add KeenableSearchTool (keyless web search)#2522
Open
ilya-bogin-keenable wants to merge 1 commit into
Open
Conversation
Adds a KeenableSearchTool backed by the Keenable Search API. Unlike the key-gated backends it is keyless by default (public endpoint, rate-limited); an optional KEENABLE_API_KEY only lifts the rate limit. It mirrors ApiWebSearchTool's shape (rate limit + markdown output) and the existing `web_search` tool name, so agents select it like any other search backend. - default_tools.py: KeenableSearchTool + __all__ export - docs: default_tools reference - tests: keyless/keyed endpoint selection + no-results 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.
Adds a
KeenableSearchToolbacked by the Keenable Search API.Unlike the key-gated backends (
GoogleSearchTool,ApiWebSearchTool) it is keyless by default — the public endpoint needs no account or API key (rate-limited to 1,000 req/hour). An optionalKEENABLE_API_KEYonly lifts the rate limit; it is never required. It uses the sharedweb_searchtool name and mirrorsApiWebSearchTool's shape (per-second rate limit + markdown output), so agents select it like any other search backend:Context: the maintainer of txtai suggested smolagents as the right home for this (neuml/txtai#1127) — txtai already adapts smolagents tools, so this unblocks that ecosystem too.
Changes:
default_tools.py—KeenableSearchTool+__all__export (not added toTOOL_MAPPINGsince it shares theweb_searchname, same asApiWebSearchTool/GoogleSearchTool)docs/source/en/reference/default_tools.md— reference entrytests/test_default_tools.py— keyless vs keyed endpoint selection + no-results handlingVerified: 3 new tests pass, ruff clean, and the keyless endpoint was self-tested live.
🤖 Generated with Claude Code