web-search-plus-plugin 1.1.4 โ 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +142 -46
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,82 +1,178 @@
|
|
|
1
|
-
# web-search-plus-plugin
|
|
1
|
+
# ๐ web-search-plus-plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Multi-provider web search as a native OpenClaw tool.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- **Serper (Google)** โ best for factual/shopping queries
|
|
7
|
-
- **Tavily** โ best for research & analysis
|
|
8
|
-
- **Exa (Neural)** โ best for discovery & semantic search
|
|
9
|
-
- **Perplexity** โ AI-synthesized answers with citations
|
|
10
|
-
- **You.com** โ real-time web + RAG
|
|
11
|
-
- **SearXNG** โ self-hosted privacy-first search
|
|
5
|
+
A standalone OpenClaw plugin that registers `web_search_plus` as a first-class tool with intelligent auto-routing. No skill dependency needed โ install, configure, and go.
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
## โจ Features
|
|
14
8
|
|
|
15
|
-
|
|
9
|
+
- **Intelligent auto-routing** โ analyzes query intent and picks the best provider automatically
|
|
10
|
+
- **6 search providers** โ use one or all, graceful fallback if any is down
|
|
11
|
+
- **Local result caching** โ saves API costs on repeated queries
|
|
12
|
+
- **Interactive setup wizard** โ guided configuration via `python3 scripts/setup.py`
|
|
13
|
+
- **Native OpenClaw tool** โ registers as `web_search_plus`, not a skill
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
- Runs bundled script at `scripts/search.py`
|
|
19
|
-
- Supports:
|
|
20
|
-
- `query` (required)
|
|
21
|
-
- `provider` (`serper` | `tavily` | `exa` | `perplexity` | `you` | `searxng` | `auto`)
|
|
22
|
-
- `count` (result count)
|
|
15
|
+
## ๐ Supported Providers
|
|
23
16
|
|
|
24
|
-
|
|
17
|
+
| Provider | Best for | Free tier |
|
|
18
|
+
|----------|----------|-----------|
|
|
19
|
+
| **Serper** (Google) | Facts, news, shopping, local businesses | 2,500 queries/month |
|
|
20
|
+
| **Tavily** | Deep research, analysis, explanations | 1,000 queries/month |
|
|
21
|
+
| **Exa** (Neural) | Semantic discovery, finding similar content | 1,000 queries/month |
|
|
22
|
+
| **Perplexity** | AI-synthesized answers with citations | Via API key |
|
|
23
|
+
| **You.com** | Real-time RAG, LLM-ready snippets | Limited free tier |
|
|
24
|
+
| **SearXNG** | Privacy-first, self-hosted, $0 cost | Free (self-hosted) |
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
## ๐ง Auto-Routing Examples
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
The plugin analyzes your query and picks the best provider:
|
|
29
|
+
|
|
30
|
+
| Query | Routed to | Why |
|
|
31
|
+
|-------|-----------|-----|
|
|
32
|
+
| "iPhone 16 Pro price" | Serper | Shopping intent detected |
|
|
33
|
+
| "how does TCP/IP work" | Tavily | Research/explanation intent |
|
|
34
|
+
| "companies like Stripe" | Exa | Discovery/semantic intent |
|
|
35
|
+
| "what is quantum computing" | Perplexity | Direct answer intent |
|
|
36
|
+
| "latest news AI regulation" | Serper | News intent |
|
|
37
|
+
|
|
38
|
+
You can always override with `provider: "tavily"` (or any other) to force a specific provider.
|
|
39
|
+
|
|
40
|
+
## ๐ฆ Installation
|
|
41
|
+
|
|
42
|
+
### Option 1: npm
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install web-search-plus-plugin
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Option 2: Clone
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git clone https://github.com/robbyczgw-cla/web-search-plus-plugin.git
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Configure API Keys
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cp .env.template .env
|
|
58
|
+
# Edit .env and add your API keys (at least one required)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Add to OpenClaw Config
|
|
29
62
|
|
|
30
63
|
```json
|
|
31
64
|
{
|
|
32
65
|
"plugins": {
|
|
33
66
|
"load": {
|
|
34
67
|
"paths": [
|
|
35
|
-
"/
|
|
68
|
+
"./node_modules/web-search-plus-plugin"
|
|
36
69
|
]
|
|
37
70
|
},
|
|
38
|
-
"entries":
|
|
39
|
-
{
|
|
40
|
-
"id": "web-search-plus-plugin",
|
|
71
|
+
"entries": {
|
|
72
|
+
"web-search-plus-plugin": {
|
|
41
73
|
"enabled": true
|
|
42
74
|
}
|
|
43
|
-
|
|
75
|
+
}
|
|
44
76
|
}
|
|
45
77
|
}
|
|
46
78
|
```
|
|
47
79
|
|
|
48
|
-
|
|
80
|
+
Restart your gateway after adding the plugin.
|
|
49
81
|
|
|
50
|
-
|
|
82
|
+
## ๐ Environment Variables
|
|
51
83
|
|
|
52
|
-
|
|
53
|
-
- `SERPER_API_KEY` โ [console.serper.dev](https://console.serper.dev)
|
|
54
|
-
- `TAVILY_API_KEY` โ [tavily.com](https://tavily.com)
|
|
55
|
-
- `EXA_API_KEY` โ [exa.ai](https://exa.ai)
|
|
56
|
-
- `KILOCODE_API_KEY` or `PERPLEXITY_API_KEY` โ [perplexity.ai](https://docs.perplexity.ai) (optional, also works via [Kilo Gateway](https://kilocode.ai))
|
|
57
|
-
- `YOU_API_KEY` โ [you.com/api](https://you.com/api) (optional)
|
|
58
|
-
- `SEARXNG_URL` โ your SearXNG instance URL (optional, self-hosted)
|
|
84
|
+
Copy `.env.template` to `.env` and add at least one API key:
|
|
59
85
|
|
|
60
|
-
|
|
86
|
+
| Variable | Provider | Sign up |
|
|
87
|
+
|----------|----------|---------|
|
|
88
|
+
| `SERPER_API_KEY` | Serper (Google) | [console.serper.dev](https://console.serper.dev) |
|
|
89
|
+
| `TAVILY_API_KEY` | Tavily | [tavily.com](https://tavily.com) |
|
|
90
|
+
| `EXA_API_KEY` | Exa | [exa.ai](https://exa.ai) |
|
|
91
|
+
| `PERPLEXITY_API_KEY` | Perplexity | [perplexity.ai](https://docs.perplexity.ai) |
|
|
92
|
+
| `KILOCODE_API_KEY` | Perplexity via Kilo | [kilocode.ai](https://kilocode.ai) |
|
|
93
|
+
| `YOU_API_KEY` | You.com | [you.com/api](https://you.com/api) |
|
|
94
|
+
| `SEARXNG_URL` | SearXNG (self-hosted) | [docs.searxng.org](https://docs.searxng.org) |
|
|
61
95
|
|
|
62
|
-
|
|
96
|
+
## ๐ค Enable for an Agent
|
|
97
|
+
|
|
98
|
+
Allow the tool in your agent config:
|
|
63
99
|
|
|
64
100
|
```json
|
|
65
101
|
{
|
|
66
102
|
"agents": {
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
103
|
+
"list": [
|
|
104
|
+
{
|
|
105
|
+
"name": "my-agent",
|
|
106
|
+
"tools": {
|
|
107
|
+
"allow": ["web_search_plus"]
|
|
108
|
+
}
|
|
72
109
|
}
|
|
73
|
-
|
|
110
|
+
]
|
|
74
111
|
}
|
|
75
112
|
}
|
|
76
113
|
```
|
|
77
114
|
|
|
78
|
-
##
|
|
115
|
+
## ๐ ๏ธ Tool Parameters
|
|
116
|
+
|
|
117
|
+
The registered `web_search_plus` tool accepts:
|
|
118
|
+
|
|
119
|
+
| Parameter | Type | Required | Description |
|
|
120
|
+
|-----------|------|----------|-------------|
|
|
121
|
+
| `query` | string | โ
| Search query |
|
|
122
|
+
| `provider` | string | โ | Force a provider: `serper`, `tavily`, `exa`, `perplexity`, `you`, `searxng`, or `auto` (default) |
|
|
123
|
+
| `count` | number | โ | Number of results (default: 5) |
|
|
124
|
+
|
|
125
|
+
## ๐งช Test Directly
|
|
126
|
+
|
|
127
|
+
You can test the search script standalone:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Auto-route
|
|
131
|
+
python3 scripts/search.py -q "your query here"
|
|
132
|
+
|
|
133
|
+
# Force a specific provider
|
|
134
|
+
python3 scripts/search.py -q "your query" -p tavily
|
|
135
|
+
|
|
136
|
+
# More results
|
|
137
|
+
python3 scripts/search.py -q "your query" --max-results 10
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## โ FAQ
|
|
141
|
+
|
|
142
|
+
### Do I need all 6 providers?
|
|
143
|
+
No. The plugin works with just one API key. Configure whichever providers you have โ the auto-router will use what's available and skip what's not.
|
|
144
|
+
|
|
145
|
+
### What's the difference between this plugin and the `web-search-plus` skill?
|
|
146
|
+
The **plugin** registers a native tool that any agent can use directly. The **skill** provides a SKILL.md with instructions for the agent. Both use the same search backend. Use the plugin for cleaner integration โ it's the recommended approach.
|
|
147
|
+
|
|
148
|
+
### Do I need Python?
|
|
149
|
+
Yes, Python 3 is required. The search logic runs as a Python script. Most Linux servers and macOS have Python 3 pre-installed.
|
|
150
|
+
|
|
151
|
+
### How does auto-routing work?
|
|
152
|
+
The router scores each provider based on query signals โ keywords like "price" or "buy" boost Serper, research-oriented queries boost Tavily, semantic/discovery queries boost Exa, and direct questions boost Perplexity. The highest-scoring provider wins.
|
|
153
|
+
|
|
154
|
+
### Does it cache results?
|
|
155
|
+
Yes. Results are cached locally in a `.cache/` directory inside the plugin folder. Identical queries return cached results instantly and don't consume API credits. Cache is file-based and survives restarts.
|
|
156
|
+
|
|
157
|
+
### Can I use Perplexity through Kilo Gateway?
|
|
158
|
+
Yes. Set `KILOCODE_API_KEY` in your `.env` โ the plugin routes Perplexity requests through the Kilo Gateway automatically. You can also use a direct `PERPLEXITY_API_KEY`.
|
|
159
|
+
|
|
160
|
+
### What about SearXNG?
|
|
161
|
+
SearXNG is a self-hosted meta search engine that aggregates 70+ sources. It's free but requires your own instance. The plugin validates the instance URL on setup and includes SSRF protection for security.
|
|
162
|
+
|
|
163
|
+
### Does it work in sandboxed agents?
|
|
164
|
+
Yes, as long as the tool is allowed in the agent's tool config. The plugin runs on the host alongside the gateway.
|
|
165
|
+
|
|
166
|
+
## ๐ Requirements
|
|
167
|
+
|
|
168
|
+
- **OpenClaw** gateway (any recent version)
|
|
169
|
+
- **Python 3** (3.8+)
|
|
170
|
+
- At least **one API key** from a supported provider
|
|
171
|
+
|
|
172
|
+
## ๐ License
|
|
173
|
+
|
|
174
|
+
MIT
|
|
175
|
+
|
|
176
|
+
## ๐ค Maintainer
|
|
79
177
|
|
|
80
|
-
-
|
|
81
|
-
- No dependency on external skill paths.
|
|
82
|
-
- Publishable as a standalone plugin repository.
|
|
178
|
+
**robbyczgw-cla** โ [GitHub](https://github.com/robbyczgw-cla)
|
package/package.json
CHANGED