Skip to content

feat: add Tavily search as configurable alternative to Serper#149

Open
tavily-integrations wants to merge 1 commit intoMiroMindAI:mainfrom
Tavily-FDE:feat/tavily-migration/miroflow-serper-tavily-parallel
Open

feat: add Tavily search as configurable alternative to Serper#149
tavily-integrations wants to merge 1 commit intoMiroMindAI:mainfrom
Tavily-FDE:feat/tavily-migration/miroflow-serper-tavily-parallel

Conversation

@tavily-integrations
Copy link
Copy Markdown

Summary

  • Added Tavily as a configurable search provider running in parallel with the existing Serper/Google search integration
  • Users can opt-in to Tavily via Hydra config (agent=tavily_search) without affecting existing Serper workflows
  • All existing Serper files, dependencies, and env vars remain untouched

Files Changed

New files

  • libs/miroflow-tools/src/miroflow_tools/mcp_servers/tavily_mcp_server.py — FastMCP server exposing tavily_search tool using tavily-python SDK, with retry logic and HuggingFace URL filtering (mirrors serper_mcp_server.py interface)
  • libs/miroflow-tools/src/miroflow_tools/mcp_servers/searching_tavily_mcp_server.py — Orchestrator wrapper with stdio MCP forwarding and retry logic (mirrors searching_google_mcp_server.py structure), includes scrape_website tool
  • apps/miroflow-agent/conf/agent/tavily_search.yaml — Agent config variant substituting tool-tavily-search for tool-google-search in the browsing sub-agent

Modified files

  • libs/miroflow-tools/pyproject.toml — Added tavily-python to dependencies
  • apps/miroflow-agent/src/config/settings.py — Added TAVILY_API_KEY env var, tool-tavily-search MCP server block, and has_tavily_api_key to env info
  • apps/miroflow-agent/.env.example — Added TAVILY_API_KEY entry
  • apps/gradio-demo/.env.example — Added TAVILY_API_KEY entry

Dependency changes

  • Added tavily-python to libs/miroflow-tools/pyproject.toml

Environment variable changes

  • Added TAVILY_API_KEY to apps/miroflow-agent/.env.example and apps/gradio-demo/.env.example

Notes for reviewers

  • This is an additive change — no existing search functionality is modified
  • Tavily output is normalized to a serper-compatible structure (organic array with title, link, snippet fields) for downstream compatibility
  • To use Tavily, set TAVILY_API_KEY and run with agent=tavily_search Hydra override

🤖 Generated with Claude Code

Automated Review

  • Passed after 1 attempt(s)
  • Final review: The migration correctly adds Tavily as a parallel search provider alongside the existing Serper/Google search. All seven reported files are present and properly implemented. The new MCP servers mirror the established patterns in serper_mcp_server.py and searching_google_mcp_server.py, Tavily SDK usage is correct, the output format is serper-compatible, retry logic is consistent, and the agent config variant is well-formed. Two minor issues are noted, one of which is a pre-existing dependency gap already present in the codebase.

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