ExaTools enable an Agent to search the web using Exa, retrieve content from URLs, find similar content, and get AI-powered answers.

Prerequisites

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

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

Example

The following agent will search Exa for AAPL news and print the response.

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

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

Toolkit Functions

FunctionDescription
search_exaSearches Exa for a query with optional category filtering
get_contentsRetrieves detailed content from specific URLs
find_similarFinds similar content to a given URL
exa_answerGets an AI-powered answer to a question using Exa search results

Toolkit Parameters

ParameterTypeDefaultDescription
searchboolTrueEnable search functionality
get_contentsboolTrueEnable content retrieval
find_similarboolTrueEnable finding similar content
answerboolTrueEnable AI-powered answers
textboolTrueInclude text content in results
text_length_limitint1000Maximum length of text content per result
highlightsboolTrueInclude highlighted snippets
summaryboolFalseInclude result summaries
num_resultsOptional[int]NoneDefault number of results
livecrawlstr"always"Livecrawl behavior
start_crawl_dateOptional[str]NoneInclude results crawled after date (YYYY-MM-DD)
end_crawl_dateOptional[str]NoneInclude results crawled before date (YYYY-MM-DD)
start_published_dateOptional[str]NoneInclude results published after date (YYYY-MM-DD)
end_published_dateOptional[str]NoneInclude results published before date (YYYY-MM-DD)
use_autopromptOptional[bool]NoneEnable autoprompt features
typeOptional[str]NoneContent type filter (e.g., article, blog, video)
categoryOptional[str]NoneCategory filter (e.g., news, research paper)
include_domainsOptional[List[str]]NoneRestrict results to these domains
exclude_domainsOptional[List[str]]NoneExclude results from these domains
show_resultsboolFalseLog search results for debugging
modelOptional[str]NoneSearch model to use (‘exa’ or ‘exa-pro’)

Categories

Available categories for filtering:

  • company
  • research paper
  • news
  • pdf
  • github
  • tweet
  • personal site
  • linkedin profile
  • financial report

Developer Resources