Prerequisites
The following example requires theduckduckgo-search library. To install DuckDuckGo, run the following command:
Example
cookbook/tools/duckduckgo.py
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
duckduckgo-search library. To install DuckDuckGo, run the following command:
pip install -U duckduckgo-search
from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools
agent = Agent(tools=[DuckDuckGoTools()], show_tool_calls=True)
agent.print_response("Whats happening in France?", markdown=True)
| Parameter | Type | Default | Description |
|---|---|---|---|
search | bool | True | Enables the use of the duckduckgo_search function to search DuckDuckGo for a query. |
news | bool | True | Enables the use of the duckduckgo_news function to fetch the latest news via DuckDuckGo. |
fixed_max_results | int | - | Sets a fixed number of maximum results to return. No default is provided, must be specified if used. |
headers | Any | - | Accepts any type of header values to be sent with HTTP requests. |
proxy | str | - | Specifies a single proxy address as a string to be used for the HTTP requests. |
proxies | Any | - | Accepts a dictionary of proxies to be used for HTTP requests. |
timeout | int | 10 | Sets the timeout for HTTP requests, in seconds. |
| Function | Description |
|---|---|
duckduckgo_search | Use this function to search DuckDuckGo for a query. |
duckduckgo_news | Use this function to get the latest news from DuckDuckGo. |
Was this page helpful?