diff --git a/docs/tools/brave-search.md b/docs/tools/brave-search.md index d3d5d43cf97..907c309f016 100644 --- a/docs/tools/brave-search.md +++ b/docs/tools/brave-search.md @@ -26,6 +26,7 @@ OpenClaw supports Brave Search API as a `web_search` provider. config: { webSearch: { apiKey: "BRAVE_API_KEY_HERE", + mode: "web", // or "llm-context" }, }, }, @@ -46,6 +47,11 @@ OpenClaw supports Brave Search API as a `web_search` provider. Provider-specific Brave search settings now live under `plugins.entries.brave.config.webSearch.*`. Legacy `tools.web.search.apiKey` still loads through the compatibility shim, but it is no longer the canonical config path. +`webSearch.mode` controls the Brave transport: + +- `web` (default): normal Brave web search with titles, URLs, and snippets +- `llm-context`: Brave LLM Context API with pre-extracted text chunks and sources for grounding + ## Tool parameters | Parameter | Description | @@ -54,6 +60,7 @@ Legacy `tools.web.search.apiKey` still loads through the compatibility shim, but | `count` | Number of results to return (1-10, default: 5) | | `country` | 2-letter ISO country code (e.g., "US", "DE") | | `language` | ISO 639-1 language code for search results (e.g., "en", "de", "fr") | +| `search_lang` | Brave search-language code (e.g., `en`, `en-gb`, `zh-hans`) | | `ui_lang` | ISO language code for UI elements | | `freshness` | Time filter: `day` (24h), `week`, `month`, or `year` | | `date_after` | Only results published after this date (YYYY-MM-DD) | @@ -88,6 +95,9 @@ await web_search({ - OpenClaw uses the Brave **Search** plan. If you have a legacy subscription (e.g. the original Free plan with 2,000 queries/month), it remains valid but does not include newer features like LLM Context or higher rate limits. - Each Brave plan includes **\$5/month in free credit** (renewing). The Search plan costs \$5 per 1,000 requests, so the credit covers 1,000 queries/month. Set your usage limit in the Brave dashboard to avoid unexpected charges. See the [Brave API portal](https://brave.com/search/api/) for current plans. - The Search plan includes the LLM Context endpoint and AI inference rights. Storing results to train or tune models requires a plan with explicit storage rights. See the Brave [Terms of Service](https://api-dashboard.search.brave.com/terms-of-service). +- `llm-context` mode returns grounded source entries instead of the normal web-search snippet shape. +- `llm-context` mode does not support `ui_lang`, `freshness`, `date_after`, or `date_before`. +- `ui_lang` must include a region subtag like `en-US`. - Results are cached for 15 minutes by default (configurable via `cacheTtlMinutes`). ## Related diff --git a/docs/tools/web.md b/docs/tools/web.md index 53ed1a24593..3bf54472a2c 100644 --- a/docs/tools/web.md +++ b/docs/tools/web.md @@ -260,6 +260,7 @@ show the `x_search` prompt. | `count` | Results to return (1-10, default: 5) | | `country` | 2-letter ISO country code (e.g. "US", "DE") | | `language` | ISO 639-1 language code (e.g. "en", "de") | +| `search_lang` | Search-language code (Brave only) | | `freshness` | Time filter: `day`, `week`, `month`, or `year` | | `date_after` | Results after this date (YYYY-MM-DD) | | `date_before` | Results before this date (YYYY-MM-DD) |