[feat] Support domain filters in Tavily search configuration
Before you start
- I searched existing issues and this is not a duplicate.
Problem / motivation
Tavily supports filtering search results by domain, but DeerFlow's Tavily web_search only forwards max_results and the optional time_range. Adding include_domains or exclude_domains to the tool configuration has no effect.
A deployment that needs searches limited to documentation sites, or wants to exclude particular sources, currently has to modify the tool implementation.
Proposed solution
Read optional include_domains and exclude_domains from the Tavily web_search entry in config.yaml:
tools:
- name: web_search
group: web
use: deerflow.community.tavily.tools:web_search_tool
max_results: 5
include_domains:
- docs.python.org
- developer.mozilla.org
exclude_domains: []
Keep these as deployment settings. The model-facing arguments should remain query and optional time_range.
Either list should work on its own. Omitted options should leave the existing request unchanged; an explicit empty list should impose no restriction of that kind. For a non-empty include list, use Tavily's explicit include_domains_mode="filter" so results are restricted to the selected domains.
Affected area(s)
Config / setup; backend community tools; Docs.
Alternatives considered
A site: clause in the query depends on the agent adding it to each search. A custom tool works, but duplicates the existing Tavily integration for two provider options.
Additional context
Tavily's search API documents both domain lists and the filter mode. The locked Python SDK, 0.7.23, accepts the mode through its keyword arguments.
Live checks found that forwarding include_domains alone could still return results outside the selected domain. Explicit filter mode restricted the same query to that domain.
Source: bytedance/deer-flow