feat(search): add Exa Search API as a search provider#547
Open
lmorchard wants to merge 1 commit into
Open
Conversation
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 Exa (
exa-api) as a search provider alongside the existingparallel-api/google/bing/duckduckgoproviders. It slots into the existing provider abstraction — no changes to thewebSearchtool,SearchService, or the agent loop.ExaSearchProviderPOSTs tohttps://api.exa.ai/search, opting intocontents.highlightsso results include snippets (Exa returns metadata only by default), and mapsurl/title/highlightsthrough the same markdown + security-wrapper path as the Parallel provider.Changes
config/defaults.ts):"exa-api"added toSEARCH_PROVIDERS; newexa_api_keyfield (envEXA_API_KEY, CLI--exa-api-key).exa-apicase increateSearchProvider; key-required validation guard mirroringparallel-api.run.ts,taskRunner.ts): the agent exposes a single provider-agnosticsearchApiKey, so call sites now pickexa_api_keyvsparallel_api_keyby provider. The server also gainedexa-apiin its inline provider union and a key-required validation branch.--debug, via the[X:debug]console.warn convention):abbreviateForDebughelper)Note: highlights-only, text/summary intentionally not enabled
Exa can also return
text(full page markdown) andsummary(an LLM-generated abstract) viacontents.text/contents.summary. This PR intentionally requests onlyhighlightsto keep parity with the Parallel provider'sexcerptsand avoid the extra token/cost overhead (Exa bills forsummarygeneration). The debug response sample confirms Exa otherwise returnsid/image/faviconbeyond what we map; Parallel returns onlyurl/title/excerpts. Enabling text/summary later is a one-line change in the request body, ideally behind a config knob.Testing
pilo run ... --search-provider exa-api --debug), confirming the search step, key wiring, and debug output.🤖 Generated with Claude Code