From 51669087c56c674dc3e0240d03507225c9fdf77e Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Thu, 16 Jul 2026 19:26:57 +0530 Subject: [PATCH 1/6] docs: widen tavily search_depth to include fast and ultra-fast --- tools/toolkits/search/tavily.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/toolkits/search/tavily.mdx b/tools/toolkits/search/tavily.mdx index de31e9a39..69938f75d 100644 --- a/tools/toolkits/search/tavily.mdx +++ b/tools/toolkits/search/tavily.mdx @@ -42,7 +42,7 @@ agent.print_response("Search tavily for 'language models'") | `all` | `bool` | `False` | Enable all available functions in the toolkit. | | `max_tokens` | `int` | `6000` | Maximum number of tokens to use in search results. | | `include_answer` | `bool` | `True` | Whether to include an AI-generated answer summary in the response. | -| `search_depth` | `Literal['basic', 'advanced']` | `'advanced'` | Depth of search - 'basic' (1 credit) for faster results or 'advanced' (2 credits) for more comprehensive search. | +| `search_depth` | `Literal['basic', 'advanced', 'fast', 'ultra-fast']` | `'advanced'` | Depth of search - 'basic' (1 credit), 'advanced' (2 credits), 'fast', or 'ultra-fast'. | | `extract_depth` | `Literal['basic', 'advanced']` | `'basic'` | Extraction depth - 'basic' (1 credit/5 URLs) or 'advanced' (2 credits/5 URLs). | | `include_images` | `bool` | `False` | Include images in extracted content. | | `include_favicon` | `bool` | `False` | Include favicon in extracted content. | From e907c7b65134ffb6b3bfc8b69b71839a0d59f453 Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Thu, 16 Jul 2026 19:28:03 +0530 Subject: [PATCH 2/6] docs: add tavily advanced search parameter rows Documents the 11 new TavilyTools constructor params from agno-agi/agno#8896. --- tools/toolkits/search/tavily.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/toolkits/search/tavily.mdx b/tools/toolkits/search/tavily.mdx index 69938f75d..5c75206dc 100644 --- a/tools/toolkits/search/tavily.mdx +++ b/tools/toolkits/search/tavily.mdx @@ -49,6 +49,17 @@ agent.print_response("Search tavily for 'language models'") | `extract_timeout` | `Optional[int]` | `None` | Timeout in seconds for extraction requests. | | `extract_format` | `Literal['markdown', 'text']` | `'markdown'` | Output format for extracted content. | | `format` | `Literal['json', 'markdown']` | `'markdown'` | Output format - 'json' for raw data or 'markdown' for formatted text. | +| `topic` | `Optional[Literal['general', 'news', 'finance']]` | `None` | Search category - general, news, or finance. Uses the Tavily default when `None`. | +| `time_range` | `Optional[Literal['day', 'week', 'month', 'year', 'd', 'w', 'm', 'y']]` | `None` | Time window for results - day, week, month, year (or d/w/m/y). | +| `start_date` | `Optional[str]` | `None` | Only include results published after this date (YYYY-MM-DD). | +| `end_date` | `Optional[str]` | `None` | Only include results published before this date (YYYY-MM-DD). | +| `days` | `Optional[int]` | `None` | Number of days back to include results. Applies to the news topic only. | +| `include_domains` | `Optional[List[str]]` | `None` | Restrict results to these domains. | +| `exclude_domains` | `Optional[List[str]]` | `None` | Exclude these domains from results. | +| `country` | `Optional[str]` | `None` | Boost results from this country (e.g. 'united states'). | +| `auto_parameters` | `bool` | `False` | Let Tavily auto-tune search parameters; explicitly set parameters (including the always-sent `search_depth` and `include_answer`) take precedence. | +| `chunks_per_source` | `Optional[int]` | `None` | Number of content chunks per source (1-3). Advanced search only. | +| `search_params` | `Optional[Dict[str, Any]]` | `None` | Additional parameters merged into web search requests; overrides the named parameters on key collision. | ## Toolkit Functions From 498a2d7e75993670e42ef7e6d9f3df8e46d79344 Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Thu, 16 Jul 2026 19:28:03 +0530 Subject: [PATCH 3/6] docs: add tavily-tools-advanced example page Generated with scripts/examples_sync/generate.py from cookbook/91_tools/tavily_tools_advanced.py. --- examples/tools/tavily-tools-advanced.mdx | 95 ++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 examples/tools/tavily-tools-advanced.mdx diff --git a/examples/tools/tavily-tools-advanced.mdx b/examples/tools/tavily-tools-advanced.mdx new file mode 100644 index 000000000..67f32876d --- /dev/null +++ b/examples/tools/tavily-tools-advanced.mdx @@ -0,0 +1,95 @@ +--- +title: "Tavily Tools - Advanced Search Parameters" +description: "Demonstrates scoping Tavily web search with the advanced parameters: domain restriction, recency, topic, and country localization." +source: cookbook/91_tools/tavily_tools_advanced.py +--- + +```python tavily_tools_advanced.py +""" +Tavily Tools - Advanced Search Parameters +============================= + +Demonstrates scoping Tavily web search with the advanced parameters: +domain restriction, recency, topic, and country localization. +""" + +from agno.agent import Agent +from agno.tools.tavily import TavilyTools + +# --------------------------------------------------------------------------- +# Create Agent +# --------------------------------------------------------------------------- + + +# Domain-restricted research, limited to the last month, US-localized +research_agent = Agent( + tools=[ + TavilyTools( + include_domains=[ + "arxiv.org", + "github.com", + ], # restrict results to these domains + exclude_domains=["reddit.com"], # drop results from these domains + time_range="month", # only results from the last month + country="united states", # boost results from this country + ) + ], + markdown=True, +) + +# Recent news from the last few days (days applies to the news topic only) +news_agent = Agent( + tools=[ + TavilyTools( + topic="news", # general, news, or finance + days=3, # only news from the last 3 days + ) + ], + markdown=True, +) + +# --------------------------------------------------------------------------- +# Run Agent +# --------------------------------------------------------------------------- +if __name__ == "__main__": + research_agent.print_response( + "Find recent papers on mixture-of-experts language models" + ) + + news_agent.print_response("What are the latest developments in AI?") +``` + +## Run the Example + + + + + + ```bash + uv pip install -U agno openai tavily-python + ``` + + + + + ```bash Mac/Linux + export OPENAI_API_KEY="your_openai_api_key_here" + export TAVILY_API_KEY="your_tavily_api_key_here" + ``` + + ```bash Windows + $Env:OPENAI_API_KEY="your_openai_api_key_here" + $Env:TAVILY_API_KEY="your_tavily_api_key_here" + ``` + + + + + Save the code above as `tavily_tools_advanced.py`, then run: + ```bash + python tavily_tools_advanced.py + ``` + + + +Full source: [cookbook/91_tools/tavily_tools_advanced.py](https://github.com/agno-agi/agno/blob/main/cookbook/91_tools/tavily_tools_advanced.py) From 26b9f67995dc7b8b2152b098b8104e165001cf50 Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Thu, 16 Jul 2026 19:28:03 +0530 Subject: [PATCH 4/6] docs: add nav entry for tavily-tools-advanced --- docs.json | 1 + 1 file changed, 1 insertion(+) diff --git a/docs.json b/docs.json index 745a0fb69..1ad7089fd 100644 --- a/docs.json +++ b/docs.json @@ -7368,6 +7368,7 @@ "examples/tools/scavio-tools", "examples/tools/scheduler-tools", "examples/tools/sofya-tools", + "examples/tools/tavily-tools-advanced", "examples/tools/tool-calls-accesing-agent", "examples/tools/twelvelabs-tools", "examples/tools/websearch-tools-advanced", From 6bc25e02ff611e3e2f9d871b5f64636bbc000b28 Mon Sep 17 00:00:00 2001 From: Himanshu Singh Date: Thu, 16 Jul 2026 20:05:52 +0530 Subject: [PATCH 5/6] docs: move tavily-tools-advanced nav entry to Search & Web --- docs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.json b/docs.json index 1ad7089fd..e37d3e673 100644 --- a/docs.json +++ b/docs.json @@ -7240,6 +7240,7 @@ "examples/tools/serper-tools", "examples/tools/spider-tools", "examples/tools/tavily-tools", + "examples/tools/tavily-tools-advanced", "examples/tools/trafilatura-tools", "examples/tools/web-tools", "examples/tools/webbrowser-tools", @@ -7368,7 +7369,6 @@ "examples/tools/scavio-tools", "examples/tools/scheduler-tools", "examples/tools/sofya-tools", - "examples/tools/tavily-tools-advanced", "examples/tools/tool-calls-accesing-agent", "examples/tools/twelvelabs-tools", "examples/tools/websearch-tools-advanced", From 3869e6d13894d69dbb5db79627e3ac92043233f2 Mon Sep 17 00:00:00 2001 From: Harsh Sinha Date: Fri, 17 Jul 2026 09:25:22 +0530 Subject: [PATCH 6/6] update --- examples/tools/tavily-tools-advanced.mdx | 2 +- tools/toolkits/search/tavily.mdx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/tools/tavily-tools-advanced.mdx b/examples/tools/tavily-tools-advanced.mdx index 67f32876d..db4efe137 100644 --- a/examples/tools/tavily-tools-advanced.mdx +++ b/examples/tools/tavily-tools-advanced.mdx @@ -1,6 +1,6 @@ --- title: "Tavily Tools - Advanced Search Parameters" -description: "Demonstrates scoping Tavily web search with the advanced parameters: domain restriction, recency, topic, and country localization." +description: "Scope Tavily web search by domain, recency, topic, and country." source: cookbook/91_tools/tavily_tools_advanced.py --- diff --git a/tools/toolkits/search/tavily.mdx b/tools/toolkits/search/tavily.mdx index 5c75206dc..37d18ceb3 100644 --- a/tools/toolkits/search/tavily.mdx +++ b/tools/toolkits/search/tavily.mdx @@ -49,17 +49,17 @@ agent.print_response("Search tavily for 'language models'") | `extract_timeout` | `Optional[int]` | `None` | Timeout in seconds for extraction requests. | | `extract_format` | `Literal['markdown', 'text']` | `'markdown'` | Output format for extracted content. | | `format` | `Literal['json', 'markdown']` | `'markdown'` | Output format - 'json' for raw data or 'markdown' for formatted text. | -| `topic` | `Optional[Literal['general', 'news', 'finance']]` | `None` | Search category - general, news, or finance. Uses the Tavily default when `None`. | +| `topic` | `Optional[Literal['general', 'news', 'finance']]` | `None` | Search category - general, news, or finance. | | `time_range` | `Optional[Literal['day', 'week', 'month', 'year', 'd', 'w', 'm', 'y']]` | `None` | Time window for results - day, week, month, year (or d/w/m/y). | | `start_date` | `Optional[str]` | `None` | Only include results published after this date (YYYY-MM-DD). | | `end_date` | `Optional[str]` | `None` | Only include results published before this date (YYYY-MM-DD). | | `days` | `Optional[int]` | `None` | Number of days back to include results. Applies to the news topic only. | | `include_domains` | `Optional[List[str]]` | `None` | Restrict results to these domains. | | `exclude_domains` | `Optional[List[str]]` | `None` | Exclude these domains from results. | -| `country` | `Optional[str]` | `None` | Boost results from this country (e.g. 'united states'). | -| `auto_parameters` | `bool` | `False` | Let Tavily auto-tune search parameters; explicitly set parameters (including the always-sent `search_depth` and `include_answer`) take precedence. | +| `country` | `Optional[str]` | `None` | Boost results from this country (e.g., 'united states'). | +| `auto_parameters` | `bool` | `False` | Let Tavily auto-tune search parameters. Explicitly set values (including the always-sent `search_depth` and `include_answer`) take precedence. | | `chunks_per_source` | `Optional[int]` | `None` | Number of content chunks per source (1-3). Advanced search only. | -| `search_params` | `Optional[Dict[str, Any]]` | `None` | Additional parameters merged into web search requests; overrides the named parameters on key collision. | +| `search_params` | `Optional[Dict[str, Any]]` | `None` | Additional parameters merged into web search requests. Overrides named parameters on key collision. | ## Toolkit Functions