Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

1.4 KB
Raw Blame

ExaSearchTool Documentation

Description

This tool lets CrewAI agents search the web using Exa, the fastest and most accurate web search API. By default the tool returns token-efficient highlights of the most relevant results for any query; you can also opt in to full page content.

Installation

To incorporate this tool into your project, follow the installation instructions below:

uv add crewai[tools] exa_py

Example

The following example demonstrates how to initialize the tool and run a search:

from crewai_tools import ExaSearchTool

# Default: results with token-efficient highlights
tool = ExaSearchTool(api_key="your_api_key", highlights=True)

Steps to Get Started

To effectively use the ExaSearchTool, follow these steps:

  1. Package Installation: Confirm that the crewai[tools] package is installed in your Python environment.
  2. API Key Acquisition: Get an Exa API key from the Exa dashboard.
  3. Environment Configuration: Store your API key in an environment variable named EXA_API_KEY so the tool can pick it up automatically.

For details on choosing between highlights and full content, see the Exa search best practices.

Note

EXASearchTool is a deprecated alias for ExaSearchTool. Existing imports continue to work but emit a deprecation warning; please migrate to ExaSearchTool.