Skip to main content

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.
enableNews
boolean
default:"true"
Enable the duckduckgo_news tool.
maxResults
number
default:"5"
Default maximum results per search query.

Tools

ToolDescription
duckduckgo_searchSearch the web. Returns titles, URLs, and snippets.
duckduckgo_newsSearch 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");