A tool that searches the web with DuckDuckGo's HTML search page and returns
the title, URL and snippet of each result. Needs the httr2 package. For
better results, use a provider's own search tool (see tools_web()) or a
dedicated search API.
Format
A tool definition created with ellmer::tool().
Examples
if (FALSE) { # \dontrun{
agent <- Agent$new(
chat = ellmer::chat("openai/gpt-6-luna"),
tools = list(tool_web_search),
permissions = Permissions(web = TRUE)
)
} # }