Skip to content

webTools

Web tools: agents that search the web and read a page, without a computer.

On this page 6
TypeScript
import { webTools } from "copilotz/plugins/agents";

What it keeps

It keeps nothing of its own.

What it lets callers do

Agents act through its 2 tools, as whoever they work for:

ToolWhat it doesCalls
read_pageReads a web page (http or https): its title, its main text and its links.
web_searchSearches the web.

Other plugins call it through its adapters: search (duckduckgo, fake, serper).

Where it shows

It shows to the model through its tools.

  • Agents' tools: read_page, web_search.
  • What it adds to resources: cost (duckduckgo).

What it needs

You set it in resources.webTools.

SettingTypeRequiredWhat it is
webTools.searchobjectno
webTools.timeoutnumbernoHow long a search or a page may take, in ms (15 s).
webTools.maxBytesnumbernoThe most of a page that is read, in bytes (2 MB); more fails.
webTools.pageCharsnumbernoHow much text one read_page answer holds, in characters (20,000).
webTools.redirectsnumbernoHow many redirects a page may follow (4).
webTools.readsPerTurnnumbernoHow many pages one agent turn may read (8).
webTools.portsnumber[]noPorts besides 80 and 443 a page may be fetched on.
webTools.userAgentstringnoThe user agent pages are asked with.
webTools.resolveResolvenoHosts whose addresses are looked up some other way (tests; a resolver over DoH).

It also reads spending, resource kinds the app and other plugins fill.

What it requires

The runtime doesn't start without chat: add it too.

It ships with copilotz@1.0.0-rc.34.

Listing

It keeps every listing rule.