Skip to content

feat: add Exa AI-powered search tool#91

Open
tgonzalezc5 wants to merge 1 commit intopolyuiislab:mainfrom
tgonzalezc5:feat/exa-search-tool
Open

feat: add Exa AI-powered search tool#91
tgonzalezc5 wants to merge 1 commit intopolyuiislab:mainfrom
tgonzalezc5:feat/exa-search-tool

Conversation

@tgonzalezc5
Copy link
Copy Markdown

@tgonzalezc5 tgonzalezc5 commented Apr 14, 2026

Summary

  • Adds ExaSearchTool as a new built-in search provider alongside DuckDuckGo and Google Scholar
  • Supports multiple search types (auto, neural, fast, instant), content retrieval modes (highlights, full text, summary), category filtering (company, research paper, news, etc.), domain filtering, text filtering, and date ranges
  • Authenticated via EXA_API_KEY environment variable; gracefully disabled when the key is not set
  • Registered in the tool runtime registry and available in Researcher, OpenCowork, and CheapClaw agent configurations

Usage Example

# Via the tool system (agent-invoked)
tool = ExaSearchTool()
result = tool.execute(task_id, {
    "query": "latest advances in multi-agent systems",
    "max_results": 10,
    "content_mode": "highlights",       # or "text", "summary", "none"
    "category": "research paper",
    "include_domains": ["arxiv.org"],
    "start_published_date": "2025-01-01T00:00:00Z",
    "save_path": "temp/exa_search/results.md"
})

Files Changed

File Change
tool_server_lite/tools/exa_tools.py New Exa search tool implementation
tool_server_lite/tools/__init__.py Added ExaSearchTool import and export
tool_server_lite/registry.py Registered exa_search in the builtin tool factories
requirements.txt Added exa-py>=2.0.0
tool_server_lite/requirements.txt Added exa-py>=2.0.0
config/agent_library/Researcher/level_0_tools.yaml Added exa_search tool definition
config/agent_library/OpenCowork/level_0_tools.yaml Added exa_search tool definition
apps/cheapclaw/assets/.../CheapClawWorkerGeneral/level_0_tools.yaml Added exa_search tool definition
apps/cheapclaw/assets/.../CheapClawSupervisor/level_0_tools.yaml Added exa_search tool definition
tests/test_exa_tools.py 19 unit tests

Test Plan

  • SDK-missing state returns descriptive error
  • API-key-missing state returns descriptive error
  • Missing query parameter returns error
  • Highlights response parsed correctly with metadata (title, URL, author, date)
  • Content fallback cascade: highlights -> summary -> text
  • Empty content fields handled gracefully
  • content_mode=none calls search() instead of search_and_contents()
  • Text/summary/highlights modes pass correct SDK parameters
  • x-exa-integration: infiagent header is set on every request
  • Results saved to file when save_path is provided
  • Optional filters (category, domains, text, dates, search_type) passed through correctly
  • All 19 tests pass locally with pytest tests/test_exa_tools.py

Add ExaSearchTool as a new search provider alongside the existing
DuckDuckGo and Google Scholar tools. Exa provides AI-powered web
search with built-in content retrieval (highlights, full text,
summaries), category filtering, domain filtering, and date ranges.

Changes:
- New tool_server_lite/tools/exa_tools.py with ExaSearchTool
- Registered in tool registry and __init__.py exports
- Tool YAML configs added for Researcher, OpenCowork, and CheapClaw agents
- exa-py>=2.0.0 added to requirements.txt
- 19 unit tests covering response parsing, content fallbacks,
  content mode routing, integration header, and filter pass-through
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant