@@ -6,16 +6,22 @@ Nekobot includes web tools that enable the agent to search the internet and fetc
66
77### 1. web_search
88
9- Search the web for current information using Brave Search API.
9+ Search the web for current information.
10+
11+ Provider behavior:
12+ - If ` brave_api_key ` is configured, use ** Brave Search API**
13+ - If Brave fails (or key is missing), fallback/use ** DuckDuckGo HTML search**
1014
1115** Configuration:**
1216``` json
1317{
1418 "tools" : {
1519 "web" : {
1620 "search" : {
17- "api_key" : " your-brave-search-api-key" ,
18- "max_results" : 5
21+ "brave_api_key" : " your-brave-search-api-key" ,
22+ "max_results" : 5 ,
23+ "duckduckgo_enabled" : true ,
24+ "duckduckgo_max_results" : 5
1925 }
2026 }
2127 }
@@ -30,7 +36,7 @@ Search the web for current information using Brave Search API.
3036
3137** Environment Variable:**
3238``` bash
33- export NEKOBOT_TOOLS_WEB_SEARCH_API_KEY =" your-brave-api-key"
39+ export NEKOBOT_TOOLS_WEB_SEARCH_BRAVE_API_KEY =" your-brave-api-key"
3440```
3541
3642** Usage Example:**
@@ -200,26 +206,13 @@ The agent automatically decides when to use these tools based on the conversatio
200206
201207## Troubleshooting
202208
203- ### web_search Not Available
209+ ### web_search Results Are Weak/Empty
204210
205- ** Issue:** "web search API key not configured"
211+ ** Issue:** DuckDuckGo fallback returns low-quality/limited results in some regions.
206212
207- ** Solution:**
213+ ** Solution:** configure Brave API key for better relevance and stability.
208214``` bash
209- export NEKOBOT_TOOLS_WEB_SEARCH_API_KEY=" your-api-key"
210- ```
211-
212- Or add to config.json:
213- ``` json
214- {
215- "tools" : {
216- "web" : {
217- "search" : {
218- "api_key" : " your-api-key"
219- }
220- }
221- }
222- }
215+ export NEKOBOT_TOOLS_WEB_SEARCH_BRAVE_API_KEY=" your-api-key"
223216```
224217
225218### web_fetch Fails
@@ -257,7 +250,7 @@ Or add to config.json:
2572502 . ** URL Validation** : Only http:// and https:// URLs are allowed
2582513 . ** Content Filtering** : HTML is sanitized during extraction
2592524 . ** Rate Limiting** : Respect API rate limits
260- 5 . ** Privacy** : Web requests are logged by Brave Search
253+ 5 . ** Privacy** : Web requests may be logged by upstream search providers (Brave/DuckDuckGo)
261254
262255## Cost
263256
@@ -274,7 +267,7 @@ Or add to config.json:
274267## Future Enhancements
275268
276269Planned improvements:
277- - [ ] Support for alternative search providers (Google, DuckDuckGo )
270+ - [ ] Support for additional providers (Google, Bing, etc. )
278271- [ ] Image search and fetch
279272- [ ] PDF content extraction
280273- [ ] Markdown output option
0 commit comments