feat: add Exa search tools for AutoGen#7656
Open
10ishq wants to merge 5 commits into
Open
Conversation
Add four tools wrapping the Exa neural search API: - ExaSearchTool: web search with optional text content - ExaFindSimilarTool: discover pages similar to a given URL - ExaGetContentsTool: retrieve full text for known URLs - ExaAnswerTool: AI-generated answer with citations Each tool follows the BaseTool/Component pattern with Pydantic arg/return models, serialisable config, and full test coverage. The Exa client is initialised with integration_source='autogen' for usage tracking. All tools are exposed under the 'exa' optional dependency extra in autogen-ext.
Author
|
@microsoft-github-policy-service agree company="Exa" |
- Add Google-style Args sections to all __init__ docstrings - Remove 'neural' from module-level docstring - Remove unused Type/Union imports - Regenerate uv.lock to include exa-py
The lockfile regeneration pulled in unrelated version bumps across the entire workspace. Drop the change so the PR diff stays focused on the Exa tools.
exa-py v2.12.1 does not accept an integration_source keyword argument. Set the x-exa-integration header on the client directly.
Author
Test ResultsTested locally against the real Exa API (exa-py v2.12.1) and with the existing unit test suite. Unit Tests (17/17 passed)Integration Tests (real Exa API)
|
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.
Why are these changes needed?
AutoGen currently has no built-in web search tool. This PR adds four tools that wrap the Exa search API, giving agents a turnkey way to search the web, discover similar pages, retrieve page content, and get AI-generated answers with citations.
An Exa integration was recently shipped in AG2's beta module (ag2ai/ag2#2714). This PR brings the same capabilities to AutoGen, following the
BaseTool/Componentpatterns used by the existing tools inautogen-ext.Tools
ExaSearchToolExaFindSimilarToolExaGetContentsToolExaAnswerToolEach tool:
BaseToolandComponentwith Pydantic arg/return models_to_config/_from_configintegration_source="autogen"to the Exa client for usage trackingInstallation
pip install -U "autogen-ext[exa]"Quick start
Changes
autogen_ext/tools/exa/—_exa_tools.pyand__init__.pytests/tools/exa/test_exa_tools.py— 17 tests covering all four toolsexaoptional extra (exa-py>=2.0.0,<3) topyproject.tomluv.lockto includeexa-pyRelated issue number
Checks