feat: add x-exa-integration header and modernize ExaTools#7587
Open
tgonzalezc5 wants to merge 1 commit intoagno-agi:mainfrom
Open
feat: add x-exa-integration header and modernize ExaTools#7587tgonzalezc5 wants to merge 1 commit intoagno-agi:mainfrom
tgonzalezc5 wants to merge 1 commit intoagno-agi:mainfrom
Conversation
- Set `x-exa-integration` header on the Exa client so API usage is attributable to this integration. - Surface the `highlights` content mode alongside `text` and `summary`. - Expose `include_text`, `exclude_text`, and `user_location` filters on search/get_contents/find_similar. - Fix the `type` docstring to describe the current search modes (auto/neural/fast/deep/deep-lite/deep-reasoning/instant) instead of the outdated article/blog/video content types. - Add unit tests covering the header, highlights/summary surfacing, new filter propagation, and graceful fallback when the client has no `headers` attribute. Co-Authored-By: Claude Opus 4.7 (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.
Summary
Small follow-up to PR #7099 to align
ExaToolswith current Exa conventions and enable API-usage attribution.x-exa-integrationheader on the Exa client ("agno"). This lets Exa attribute API traffic to this integration; without it, usage from Agno is indistinguishable from rawexa_pycalls. Wrapped in a best-efforttry/exceptso upstream client changes cannot break init.highlightsas a content mode alongsidetextandsummary. The Exa API returns any combination of these; the parser now cascades through each.include_text,exclude_text, anduser_locationfilters tosearch_exa/get_contents/find_similar. These are standard Exa search parameters that were not previously exposed.typedocstring — the currentExaToolsdocstring describestypeas an article/blog/video content filter, but per the Exa docstypeis the search mode (auto/neural/fast/deep/deep-lite/deep-reasoning/instant). Updated to match.Example
Type of change
Files changed
libs/agno/agno/tools/exa.py— header, highlights, new filters, docstringlibs/agno/tests/unit/tools/test_exa.py— tests for the aboveChecklist
./scripts/format.shand./scripts/validate.sh)Duplicate and AI-Generated PR Check
Test plan
pytest libs/agno/tests/unit/tools/test_exa.py— 21 passed (5 new)ruff format+ruff checkon modified files — cleanmypy libs/agno/agno/tools/exa.py— no new errors introduced