#21628: feat(tools): add EXA as web search provider
agents
size: S
Cluster:
Web Search Provider Integrations
## Summary
Add EXA AI as a new search provider for the web_search tool. EXA provides neural search optimized for LLMs with high-quality, context-aware results.
## Changes
- Add EXA to SEARCH_PROVIDERS array
- Add ExaConfig type and resolveExaConfig function
- Add runExaSearch function for API calls
- Update provider type unions in types.tools.ts
- Add EXA config section to zod schema
- Update schema help text
## Why EXA?
EXA is an AI-powered search engine designed specifically for LLMs. It provides:
- Neural search (AI understanding of query intent)
- Better results for complex/abstract queries
- Competitive pricing vs Brave/Perplexity
## Testing
Tested the build locally with `pnpm build` - passes successfully.
## AI-assisted
This PR was AI-assisted (built by Eli Rook, an autonomous AI).
---
Closes: [feature request]
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR adds EXA AI as a fourth web search provider alongside Brave, Perplexity, and Grok. The implementation follows the existing pattern for other providers by adding EXA to the provider array, defining config types, implementing the API call function, and integrating it into the main search flow.
**Critical issues found:**
- Missing EXA case in `missingSearchKeyPayload` function - users will see incorrect Brave error message when EXA API key is missing
- Cache key generation doesn't handle EXA provider - will use wrong grok parameters for cache keys
**Style concerns:**
- EXA API key resolution differs from other providers (inline vs dedicated resolver function)
**Missing updates:**
- Documentation (`docs/tools/web.md`) doesn't mention EXA as a provider option
- No test coverage added for EXA provider
<h3>Confidence Score: 2/5</h3>
- This PR has critical logical errors that will cause incorrect behavior in production
- Two critical bugs found: missing EXA error handling will show wrong error messages to users, and missing cache key logic will cause cache collisions with grok provider. These are functional regressions that must be fixed before merge.
- Focus on `src/agents/tools/web-search.ts` lines 220-242 (error messages) and 650-656 (cache keys)
<sub>Last reviewed commit: 24607d7</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#13814: feat(web-search): add ZAI Search (zsearch) provider
by strelov1 · 2026-02-11
76.0%
#22626: feat(search): add support for SearXNG as a search provider
by sarveshgandhi · 2026-02-21
75.1%
#12304: feat: add DeSearch as web_search provider
by tatjr13 · 2026-02-09
74.7%
#11444: Add extensible search providers for web_search
by dhc02 · 2026-02-07
74.3%
#13665: feat(web-search): add SearXNG as a search provider
by sfo2001 · 2026-02-10
74.0%
#8715: fix(web-search): safer provider resolution & Perplexity auto-detection
by abhijeet117 · 2026-02-04
73.8%
#13370: Tools: rewrite Grok parser, add Tavily provider, multi-provider con...
by a-anand-91119 · 2026-02-10
73.6%
#17703: feat(web-search): add Parallel search provider
by raktim-mondol · 2026-02-16
73.6%
#17632: feat(web-search): add per-call provider override
by cog-bernthiddema · 2026-02-16
73.2%
#16895: feat(web-search): add SearXNG as a search provider
by rustyorb · 2026-02-15
72.9%