Web search providers
The agent uses a web search tool when it needs current information from the internet. By default WednesdayAI ships with support for Brave Search and SearXNG. Plugins can register additional providers — or replace the built-in ones — by implementing theWebSearchProviderPlugin interface.
Quick example
WebSearchProviderPlugin fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique lowercase identifier, e.g. "brave-search". Must be stable — used in config to select the provider. |
label | string | Yes | Display name shown in logs and status output |
hint | string | Yes | Short description shown in provider selection UI |
envVars | string[] | Yes | Environment variable names that credential this provider. Used for auto-detection: if any listed var is set, the provider is considered available. |
autoDetectOrder | number | No | Auto-detection priority — lower = higher priority. If omitted, the provider is not auto-detected (requires explicit config). |
createTool | function | Yes | Returns the tool definition for this provider, or null if unavailable |
createTool contract
createTool receives a WebSearchProviderContext and must return either a tool definition or null:
- Return
nullwhen the provider is not available in this context (missing API key, base URL, etc.). The dispatcher tries the next candidate in priority order. - Return a tool definition that matches the standard
AnyAgentToolshape — it will be registered as the active search tool.
createTool is called once at startup per search invocation context, not per search query. Do not perform network requests inside createTool itself.
Auto-detection vs explicit config
When multiple providers are registered, the gateway selects one using:- Explicit config —
webSearch.provider: "my-search"inopenclaw.json(always wins) - Auto-detection — providers with
autoDetectOrderset, ordered ascending. The first one wherecreateToolreturns non-null is selected. - Fallback — if no provider is configured or detected, web search is unavailable.
autoDetectOrder: 10 (Brave Search) and autoDetectOrder: 20 (SearXNG). Use autoDetectOrder >= 50 for third-party providers to avoid conflicting with bundled defaults.
Admin configuration
Admins select the active provider via config:autoDetectOrder available provider is used. The agent will not use web search if no provider is available — no error, the tool simply will not appear in the agent’s tool list.
What not to do
Related
- Agent tools — general tool registration guide
- Plugin SDK reference — full exported surface
- Admin: AI providers — configuring AI and search providers