ExaToolkit
autogen.beta.tools.search.exa.ExaToolkit #
Bases: Toolkit
Toolkit that exposes the Exa neural search engine as four related tools sharing one HTTP client.
The four tools mirror Exa's primary endpoints: - exa_search: neural/keyword/hybrid web search with optional text content - exa_find_similar: find pages similar to a given URL - exa_get_contents: fetch full text for specific URLs - exa_answer: get an AI-generated answer with citations
By default, passing the whole toolkit to an agent registers all four tools. To use a subset, or to customise per-tool parameters, call the factory methods directly and pass the returned tools to the agent::
toolkit = ExaToolkit(api_key=...)
# all four tools
agent = Agent("a", config=config, tools=[toolkit])
# only two, with custom parameters
agent = Agent(
"a",
config=config,
tools=[
toolkit.search(num_results=5, search_type="neural"),
toolkit.answer(),
],
)
The constructor reads EXA_API_KEY from the environment when api_key is omitted (handled by the underlying exa_py.Exa SDK).
Source code in autogen/beta/tools/search/exa.py
search #
search(*, num_results=None, max_characters=None, search_type=None, category=None, include_domains=None, exclude_domains=None, start_published_date=None, end_published_date=None, start_crawl_date=None, end_crawl_date=None, use_autoprompt=None, livecrawl=None, name='exa_search', description="Search the web using Exa's neural search engine. Returns ranked results with titles, URLs, relevance scores, and optional text content.", middleware=())
Source code in autogen/beta/tools/search/exa.py
find_similar #
find_similar(*, num_results=None, exclude_source_domain=None, name='exa_find_similar', description='Find web pages similar to a given URL. Useful for discovering related content, competitors, or alternative sources.', middleware=())
Source code in autogen/beta/tools/search/exa.py
get_contents #
get_contents(*, name='exa_get_contents', description='Get the full text content of specific URLs. Useful when you already know which pages you need and want to read them.', middleware=())
Source code in autogen/beta/tools/search/exa.py
answer #
answer(*, name='exa_answer', description='Generate an AI-powered answer to a question with citations from web sources.', middleware=())
Source code in autogen/beta/tools/search/exa.py
set_provider #
schemas async #
register #
tool #
tool(function=None, *, name=None, description=None, schema=None, sync_to_thread=True, middleware=())