Skip to main content

Overview

Tool identifier web_search. web_search lets the agent run web-wide searches. By default it uses the Volcengine Unified Information Search API; see the API docs. When CLOUD_PROVIDER is set to byteplus, the tool switches to the BytePlus SearchInfinity API. Import path: from veadk.tools.builtin_tools.web_search import web_search parallel_web_search provides parallel multi-query search and likewise uses the BytePlus SearchInfinity API in BytePlus mode.

Environment & prerequisites

Requirements:
  1. Configure Volcengine AK / SK, or use a temporary StsToken issued via Volcengine IAM. In BytePlus mode, use BYTEPLUS_WEB_SEARCH_API_KEY instead.
  2. Configure the API key for the agent’s reasoning model.
Or configure in config.yaml:
config.yaml
BytePlus mode example:

Usage

examples/tools/web_search/agent.py

Parameters and results

In Volcengine mode, credentials are resolved in this order: paired TOOL_WEB_SEARCH_ACCESS_KEY / TOOL_WEB_SEARCH_SECRET_KEY, AK/SK in the tool context, VOLCENGINE_ACCESS_KEY / VOLCENGINE_SECRET_KEY, and IAM temporary credentials from a managed environment. The session token comes from that final IAM flow; setting AK/SK directly does not attach an arbitrary STS token. Each query requests up to five results. Parallel results use query text as dictionary keys, so deduplicate queries first. An error response may appear as a list item; inspect results before using them in an answer. This example calls the search service without a reasoning model:
Last modified on September 19, 2026