Skip to content

cap_web_search

Source: cap_web_search.c components/claw_capabilities/cap_web_search/src/cap_web_search.c · header: cap_web_search.h components/claw_capabilities/cap_web_search/include/cap_web_search.h · Skill: SKILL.md components/claw_capabilities/cap_web_search/skills/cap_web_search/SKILL.md

cap_web_search exposes the web_search tool to the LLM, allowing the Agent to search through an explicitly selected provider. It supports Bocha, Tavily, and Brave Search.

Tool ID Description
web_search Search the web and return concise formatted results
Parameter Type Required Description
query string Yes Search keywords

Returns formatted search result text containing titles, summaries, and links. By default it returns the first 5 results.

Provider NVS config key Description
Bocha bocha_key Bocha web search with summaries
Tavily tavily_key Default for new configurations
Brave Search brave_key Brave web search

Select the search provider in web settings (search_provider: bocha / tavily / brave), enter its key, save, and restart. Legacy settings without a saved selection retain Tavily or Brave according to the previous rules; saving fixes the selection.

#include "cap_web_search.h"

ESP_ERROR_CHECK(cap_web_search_set_provider("bocha"));
ESP_ERROR_CHECK(cap_web_search_set_bocha_key("your-api-key"));
ESP_ERROR_CHECK(cap_web_search_register_group());

API keys are usually read from NVS by the application layer, then passed to the corresponding set_*_key function.

Property Value
Group ID cap_web_search
Default LLM-visible Yes (edge_agent default initial visible group)
Tool count 1