Repository navigation
tools/keenable: add Keenable web search tool (works without an API key) - #1567
Open
KGKallasmaa wants to merge 3 commits into
Open
KGKallasmaa wants to merge 3 commits into
KGKallasmaa wants to merge 3 commits into
Conversation
Author
|
@tmc could you take a look when you have a moment? It's a keyless JSON alternative to the DuckDuckGo tool, with an httprr recording that can be re-recorded without credentials. Thanks! |
Co-authored-by: Karl-Gustav Kallasmaa <KGKallasmaa@users.noreply.github.com>
Replace hand-rolled net/http search with github.com/keenableai/keenable-sdk/go. Map tool options to SDK Client/SearchOptions, keep DDG-style formatting and ErrNoGoodResult behavior, and re-record keyless httprr traces. Co-authored-by: Karl-Gustav Kallasmaa <KGKallasmaa@users.noreply.github.com>
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.
Adds
tools/keenable, atools.Toolfor the Keenable web search API. It follows the shape oftools/duckduckgo.Why: like DuckDuckGo it needs no API key, but it's a JSON API rather than HTML scraping, and each result carries a long page excerpt rather than a one-line snippet. That makes it a sturdier zero-setup search tool for agents.
POST https://api.keenable.ai/v1/search/public(rate limited per IP), sending theX-Keenable-Title: langchaingoheader that endpoint requires.WithAPIKeyorKEENABLE_API_KEYswitches it to/v1/searchwithX-API-Key.WithMaxResults(clamped to 1–50),WithSite(single-domain filter),WithHTTPClient,WithBaseURLandWithAppTitle.Title / Description / URLblocks, plus aPublished:line when available. Results without a URL are skipped, and an empty result returns the same "No good … Results" message as DDG.docs/parity_matrix.md: adds a Tools row.Tests (
tools/keenable/keenable_test.go):TestKeenableToolis an httprr test. The recording was made live against the keyless endpoint (go test -httprecord=. ./tools/keenable/), and since no credentials are needed it can be re-recorded at any time. It usesrr.Replaying()beforet.Parallel(), perlint -testing.go test ./tools/keenable/passes,go vetandgofmtare clean, andgo run ./internal/devtools/lint -testingreports nothing for the new package.API docs: https://docs.keenable.ai/api-reference/search. Disclosure: I work with the Keenable team.