Skip to content
Agent

Web search

Web search and page fetching for the agent, with multiple search backends.

Let the agent search the web and fetch pages.

Two tools

  • web_search — keyword search. Parameters: query (required), max_results (optional, default 10, range 1–20). 60-second timeout.
  • web_fetch — fetch the main content of a URL. Parameters: url (required), max_length (optional, default 8000), extract_links (optional, default false). Waits up to 30 seconds per URL.

Models from Claude, OpenAI, and Kimi ship with built-in web search — it works out of the box. With other models, pick a search backend below (Bocha / Serper / custom) and set a key first; only then does the agent get search capability.

CLI command /websearch

SubcommandWhat it does
statusShow the current configuration
on / offEnable / disable web search
set-enginePick a backend: auto / bocha / serper / custom
set-urlSet a custom backend URL
set-keySet the backend API key

Desktop

You can also toggle web search, pick a backend, and set the key in Settings · Agent · Web search (turn on "Show advanced settings" at the bottom of the settings sidebar first).

Common patterns

  • "Look up the latest usage of X" → the agent finds it with web_search, then reads the page with web_fetch
  • In mainland China, set the backend to bocha — no extra network configuration needed