Skip to main content

Documentation Index

Fetch the complete documentation index at: https://spacesail.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

DuckDuckGo enables an Agent to search the web for information.

Prerequisites

The following example requires the ddgs library. To install DuckDuckGo, run the following command:
pip install -U ddgs

Example

cookbook/tools/duckduckgo.py
from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(tools=[DuckDuckGoTools()])
agent.print_response("Whats happening in France?", markdown=True)

Toolkit Params

ParameterTypeDefaultDescription
enable_searchboolTrueEnable DuckDuckGo search function.
enable_newsboolTrueEnable DuckDuckGo news function.
allboolFalseEnable all available functions in the toolkit.
modifierOptional[str]NoneA modifier to be used in the search request.
fixed_max_resultsOptional[int]NoneA fixed number of maximum results.
proxyOptional[str]NoneProxy to be used in the search request.
timeoutOptional[int]10The maximum number of seconds to wait for a response.
verify_sslboolTrueWhether to verify SSL certificates.

Toolkit Functions

FunctionDescription
duckduckgo_searchSearch DuckDuckGo for a query. Parameters include query (str) for the search query and max_results (int, default=5) for maximum results. Returns JSON formatted search results.
duckduckgo_newsGet the latest news from DuckDuckGo. Parameters include query (str) for the search query and max_results (int, default=5) for maximum results. Returns JSON formatted news results.

Developer Resources