Overview
The Exa Search tool is a tool that allows you to search the web and retrieve content using the Exa API.How It Works
Getting Started
1
Simple Usage
- Install dependencies (see Overview above)
- Set required API keys in your environment
- Run the agent example in Overview
2
With Configuration
Use the same tool with an agent — see the Overview example, or pass env vars from the sections above.
Best Practices
Keep the API key in the environment
Keep the API key in the environment
Read the key with
os.environ["EXA_API_KEY"] and set it in your shell or .env. Never hard-code it in the tool function.Cap num_results
Cap num_results
search_and_contents accepts num_results=5. Keep it low so the agent processes fewer tokens — raising it retrieves full page text for every hit.Handle rate limits
Handle rate limits
Exa returns HTTP 429 when the plan quota is exceeded. Wrap the call in
try/except so the agent can fall back to another search tool instead of crashing.Related Tools
Exa
Neural search (praisonai-tools)
Tavily
AI-powered search
Serper
Google search API

