Search the Web with DuckDuckGo
Search DuckDuckGo for instant answers or full search results.
Why it matters
Leverage the DuckDuckGo search engine to retrieve instant answers or full search results for your queries. This tool empowers agents to access up-to-date information directly from the web.
Outcomes
What it gets done
Perform instant searches for quick answers.
Conduct comprehensive web searches for detailed information.
Integrate web search capabilities into AI agents.
Retrieve and parse search results for further processing.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-tool-tools-duckduckgo | bash Capabilities
What this skill does
Searches the web and retrieves relevant sources.
Fetches and parses content from web pages.
Condenses long documents or threads into key takeaways.
Overview
DuckDuckGo Search Tool
What it does
This tool enables agents to search and retrieve results from the DuckDuckGo search engine. It can fetch instant query answers or conduct a full search and parse the results.
How it connects
Use this tool when an agent needs to search DuckDuckGo for information. The tool supports fetching instant answers or performing a full search.
Source README
DuckDuckGo Search Tool
This tool enables agents to search and retrieve results from the DuckDuckGo search engine. It utilizes the duckduckgo_search package, which either fetches instant query answers from DuckDuckGo or conducts a full search and parses the results.
Usage
This tool has a more extensive example usage documented in a Jupyter notebook here
Here's an example usage of the DuckDuckGoSearchToolSpec.
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
tool_spec = DuckDuckGoSearchToolSpec()
agent = FunctionAgent(
tools=DuckDuckGoSearchToolSpec.to_tool_list(),
llm=OpenAI(model="gpt-4.1"),
)
print(await agent.run("What's going on with the superconductor lk-99"))
print(await agent.run("what are the latest developments in machine learning"))
Available tool functions:
duckduckgo_instant_search: Make a query to DuckDuckGo api to receive an instant answer.duckduckgo_full_search: Make a query to DuckDuckGo search to receive a full search results.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.