Files
crewAI/lib/crewai-tools/src/crewai_tools/tools/exa_tools/README.md
Ishan Goswami 07c4a30f2e
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
feat(crewai-tools): add highlights to ExaSearchTool, rename from EXASearchTool
* feat(crewai-tools): add highlights to ExaSearchTool, rename from EXASearchTool

- Add a highlights init param so agents can get token-efficient excerpts instead of full pages
- Rename EXASearchTool to ExaSearchTool; keep EXASearchTool as a deprecated alias so existing imports keep working
- Update the docs and example to use highlights as the recommended option
- Add a small note that says Exa is the fastest and most accurate web search API
- Add tests for the new highlights param and the deprecation alias

* fix(crewai-tools): import order and module-level Exa for tests

- Reorder std-lib imports so ruff is happy with force-sort-within-sections.
- Import Exa at module level (with a fallback) so the existing test mocks resolve.
  The lazy install prompt still works if exa_py is missing.
- Allow content and summary to be a dict, matching highlights.
- Trim test file to the cases this PR introduces (highlights param and the
  EXASearchTool deprecation alias). Existing init-shape tests stay.

Co-Authored-By: ishan <ishan@exa.ai>

* chore(crewai-tools): drop self-explanatory comment on schema alias

Co-Authored-By: ishan <ishan@exa.ai>

* docs(crewai-tools): default highlights to True, drop summary from examples

Co-Authored-By: ishan <ishan@exa.ai>

* docs(crewai-tools): simplify highlights examples to highlights=True

Co-Authored-By: ishan <ishan@exa.ai>

* feat(crewai-tools): add x-exa-integration header for usage tracking

Co-Authored-By: ishan <ishan@exa.ai>

* docs(crewai-tools): add Exa MCP section and resources links

Co-Authored-By: ishan <ishan@exa.ai>

---------

Co-authored-by: ishan <ishan@exa.ai>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-05-01 21:25:23 +08:00

1.4 KiB

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.