feat: add Exa AI-powered search tool#3
Open
tgonzalezc5 wants to merge 1 commit intocodeany-ai:mainfrom
Open
Conversation
Adds an ExaSearch tool that queries Exa (https://exa.ai) and returns high-quality web results with optional highlights, summaries, and full text. Supports category filtering, domain filtering (include/exclude), published-date ranges, user location, and all current Exa search types. Registered in the default tool registry.
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
ExaSearchbuilt-in tool that queries Exa, an AI-powered search engine that understands natural-language queries and returns high-quality web results.auto,neural,fast,deep-lite,deep,deep-reasoning,instant), content modes (highlights, full text, summary), category filtering, include/exclude domain filters, published-date ranges, and user location.EXA_API_KEYfor authentication (loaded lazily on each call) and setsx-exa-integration: open-agent-sdk-goso Exa can attribute traffic to this SDK.tools.DefaultRegistry()alongside the existingWebSearchplaceholder; fits the sametypes.Toolinterface as every other built-in tool.net/httpimplementation, no new Go module dependencies.Usage
Set
EXA_API_KEYbefore running. Get a key at https://exa.ai/.Files Changed
tools/exasearch.go— newExaSearchToolimplementing thetypes.Toolinterface.tools/exasearch_test.go— unit tests covering request shape, response parsing, snippet fallback logic, API error handling, missing-key state, and registry registration.tools/registry.go— registerNewExaSearchTool()inGetAllBaseTools().README.md— documentEXA_API_KEYand addExaSearchto the built-in tool list.Test Plan
go build ./...passesgo vet ./...passesgo test ./...passes (full suite green, including pre-existing tests)go test ./tools/ -run Exa -vpasses (6 new tests, all subtests green)gofmt -lclean on all new/modified filesDefaultRegistry().Get("ExaSearch")EXA_API_KEY)