Skip to content

feat: add x-exa-integration header and modernize ExaTools#7587

Open
tgonzalezc5 wants to merge 1 commit intoagno-agi:mainfrom
tgonzalezc5:feat/exa-integration-header
Open

feat: add x-exa-integration header and modernize ExaTools#7587
tgonzalezc5 wants to merge 1 commit intoagno-agi:mainfrom
tgonzalezc5:feat/exa-integration-header

Conversation

@tgonzalezc5
Copy link
Copy Markdown

Summary

Small follow-up to PR #7099 to align ExaTools with current Exa conventions and enable API-usage attribution.

  • Set the x-exa-integration header on the Exa client ("agno"). This lets Exa attribute API traffic to this integration; without it, usage from Agno is indistinguishable from raw exa_py calls. Wrapped in a best-effort try/except so upstream client changes cannot break init.
  • Surface highlights as a content mode alongside text and summary. The Exa API returns any combination of these; the parser now cascades through each.
  • Add include_text, exclude_text, and user_location filters to search_exa / get_contents / find_similar. These are standard Exa search parameters that were not previously exposed.
  • Fix the type docstring — the current ExaTools docstring describes type as an article/blog/video content filter, but per the Exa docs type is the search mode (auto / neural / fast / deep / deep-lite / deep-reasoning / instant). Updated to match.

Example

from agno.tools.exa import ExaTools

tools = ExaTools(
    highlights=True,
    include_text=["quarterly revenue"],
    user_location="US",
)
# API calls from here now include `x-exa-integration: agno`

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Files changed

  • libs/agno/agno/tools/exa.py — header, highlights, new filters, docstring
  • libs/agno/tests/unit/tools/test_exa.py — tests for the above

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Duplicate and AI-Generated PR Check

  • I have searched existing open pull requests and confirmed that no other PR already addresses this issue
  • If a similar PR exists, I have explained below why this PR is a better approach
  • Check if this PR was entirely AI-generated (by Copilot, Claude Code, Cursor, etc.)

Test plan

  • pytest libs/agno/tests/unit/tools/test_exa.py — 21 passed (5 new)
  • ruff format + ruff check on modified files — clean
  • mypy libs/agno/agno/tools/exa.py — no new errors introduced

- 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>
@tgonzalezc5 tgonzalezc5 requested a review from a team as a code owner April 19, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant