Skip to content

Interface: WebSearchTool

Tool that enables searching the public internet for up-to-date information.

Extends

Properties

allowedDomains?

optional allowedDomains: string[]

Optional list of domains to restrict web search results to. When specified, only results from these domains will be returned. Omit the HTTP/HTTPS prefix (e.g., use docs.example.com not https://docs.example.com). Subdomains are automatically included in the search. Maximum of 100 domains allowed.

Example

agent.setTools({
  webSearch: {allowedDomains: ["docs.google.com", "stackoverflow.com"]},
});

type

type: WebSearch

The type identifier for this tool.

Inherited from

BaseTool.type