DuckDuckGo
Search the web and get the latest news using DuckDuckGo. No API key required — works out of the box.
Quick Start
import { Agent, openai, DuckDuckGoToolkit } from "@radaros/core";
const ddg = new DuckDuckGoToolkit();
const agent = new Agent({
name: "researcher",
model: openai("gpt-4o"),
instructions: "Search the web to answer questions with sources.",
tools: [...ddg.getTools()],
});
const result = await agent.run("What's happening in France?");
Config
Enable the duckduckgo_search tool.
Enable the duckduckgo_news tool.
Default maximum results per search query.
| Tool | Description |
|---|
duckduckgo_search | Search the web. Returns titles, URLs, and snippets. |
duckduckgo_news | Search for latest news. Returns headlines, sources, and URLs. |
Example: News Agent
const ddg = new DuckDuckGoToolkit({ enableSearch: false, enableNews: true });
const agent = new Agent({
name: "news-agent",
model: openai("gpt-4o"),
instructions: "Get the latest news and summarize it.",
tools: [...ddg.getTools()],
});
const result = await agent.run("Latest AI news");