Exa
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 bitca.agent import Agent
from bitca.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
Parameter
Type
Default
Description
api_key
str
-
API key for authentication purposes.
search
bool
False
Determines whether to enable search functionality.
search_with_contents
bool
True
Indicates whether to include contents in the search results.
show_results
bool
False
Controls whether to display search results directly.
Toolkit Functions
Function
Description
search_exa
Searches Exa for a query.
search_exa_with_contents
Searches Exa for a query and returns the contents from the search results.
Last updated