Exa

Search the web, retrieve URL content, find similar pages, and get AI-powered answers with ExaTools.

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 and openai libraries and an API key which can be obtained from Exa.

uv pip install -U agno exa-py openai
export EXA_API_KEY=***

Example

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

cookbook/91_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",
        show_results=True,
        text_length_limit=1000,
    )],
    )
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
researchPerforms deep research on a topic and returns structured results with citations

Toolkit Params

ParameterTypeDefaultDescription
enable_searchboolTrueEnable search functionality
enable_get_contentsboolTrueEnable content retrieval
enable_find_similarboolTrueEnable finding similar content
enable_answerboolTrueEnable AI-powered answers
enable_researchboolFalseEnable research functionality
allboolFalseEnable all functionality
api_keyOptional[str]NoneExa API key. Uses EXA_API_KEY environment variable if not set
textboolTrueInclude text content in results
text_length_limitint1000Maximum length of text content per result
summaryboolFalseRequests provider summaries, but the current result serializer omits them
num_resultsOptional[int]NoneDefault number of results
livecrawlstr"always"Stored but not forwarded to the current provider call
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)
typeOptional[str]NoneSearch strategy (for example auto, fast, or deep), not a content format; use category for supported categories
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]NoneAnswer model used by exa_answer ('exa' or 'exa-pro'), not search strategy
timeoutint30Worker-result timeout; not a strict wall-clock bound and not applied to research polling
research_modelLiteral["exa-research", "exa-research-pro"]"exa-research"Model used by the research function

Categories

Available categories for filtering:

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

Current response and timeout boundaries

livecrawl is not forwarded by this adapter, and requested summaries are dropped from its formatted results. Use the returned text excerpts, or the provider SDK directly when you need those fields.

The timeout wrapper waits for its worker during cleanup, so a slow underlying request can outlast timeout. Research polling follows a separate path. Use provider-level request timeouts in an application that needs a strict deadline. See Exa search parameters for current strategy values.

Developer Resources