ExaTools enable an Agent to search the web using Exa.

Prerequisites

The following examples requires the exa-client library and an API key which can be obtained from Exa.

pip install -U exa-client
export EXA_API_KEY=***

Example

The following agent will run seach exa for AAPL news and print the response.

cookbook/tools/exa_tools.py
from phi.agent import Agent
from phi.tools.exa import ExaTools

agent = Agent(tools=[ExaTools(include_domains=["cnbc.com", "reuters.com", "bloomberg.com"])], show_tool_calls=True)
agent.print_response("Search for AAPL news", markdown=True)

Toolkit Params

ParameterTypeDefaultDescription
api_keystr-API key for authentication purposes.
searchboolFalseDetermines whether to enable search functionality.
search_with_contentsboolTrueIndicates whether to include contents in the search results.
show_resultsboolFalseControls whether to display search results directly.

Toolkit Functions

FunctionDescription
search_exaSearches Exa for a query.
search_exa_with_contentsSearches Exa for a query and returns the contents from the search results.

Information