openclaw-tavily 0.1.0 → 0.2.0

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 CHANGED
@@ -1,8 +1,19 @@
1
1
  # openclaw-tavily
2
2
 
3
- A [Tavily](https://tavily.com) web search plugin for [OpenClaw](https://github.com/openclaw/openclaw).
3
+ [![npm version](https://img.shields.io/npm/v/openclaw-tavily.svg)](https://www.npmjs.com/package/openclaw-tavily)
4
+ [![license](https://img.shields.io/npm/l/openclaw-tavily.svg)](https://github.com/framix-team/openclaw-tavily/blob/main/LICENSE)
4
5
 
5
- Exposes a `tavily_search` agent tool that returns structured search results with titles, URLs, content snippets, relevance scores, and an optional AI-generated answer.
6
+ A [Tavily](https://tavily.com) web tools plugin for [OpenClaw](https://github.com/openclaw/openclaw).
7
+
8
+ Exposes five agent tools:
9
+
10
+ | Tool | Description |
11
+ |------|-------------|
12
+ | `tavily_search` | Web search with structured results, AI answers, domain filtering |
13
+ | `tavily_extract` | Extract clean markdown/text content from URLs |
14
+ | `tavily_crawl` | Crawl a website and extract content from discovered pages |
15
+ | `tavily_map` | Discover and list all URLs from a website |
16
+ | `tavily_research` | Deep agentic research returning comprehensive reports |
6
17
 
7
18
  ## Install
8
19
 
@@ -60,23 +71,33 @@ Or configure it in `~/.openclaw/openclaw.json`:
60
71
  | `timeoutSeconds` | `number` | `30` | Timeout for API requests |
61
72
  | `cacheTtlMinutes` | `number` | `15` | In-memory cache TTL (0 to disable) |
62
73
 
63
- ## Tool: `tavily_search`
74
+ ## Tools
64
75
 
65
- The agent can call this tool with the following parameters:
76
+ ### `tavily_search`
77
+
78
+ Search the web with structured results and optional AI-generated answers.
66
79
 
67
80
  | Parameter | Required | Description |
68
81
  |-----------|----------|-------------|
69
82
  | `query` | **yes** | Search query string |
70
83
  | `count` | no | Number of results (1-20) |
71
- | `search_depth` | no | `"basic"` or `"advanced"` |
72
- | `include_answer` | no | Include AI answer |
73
- | `include_raw_content` | no | Include raw page content |
74
- | `topic` | no | `"general"` or `"news"` |
75
- | `days` | no | Days back for news search |
84
+ | `search_depth` | no | `"ultra-fast"`, `"fast"`, `"basic"`, or `"advanced"` |
85
+ | `include_answer` | no | Include AI answer (`true`/`false`/`"basic"`/`"advanced"`) |
86
+ | `include_raw_content` | no | Include raw page content (`true`/`false`/`"markdown"`/`"text"`) |
87
+ | `topic` | no | `"general"`, `"news"`, or `"finance"` |
88
+ | `time_range` | no | `"day"`, `"week"`, `"month"`, or `"year"` |
89
+ | `start_date` | no | Start date (ISO format, e.g. `"2024-01-01"`) |
90
+ | `end_date` | no | End date (ISO format) |
76
91
  | `include_domains` | no | Limit to these domains |
77
92
  | `exclude_domains` | no | Exclude these domains |
93
+ | `chunks_per_source` | no | Content chunks per source (1-3, advanced depth only) |
94
+ | `include_images` | no | Include images in results |
95
+ | `include_image_descriptions` | no | Include image descriptions |
96
+ | `include_favicon` | no | Include favicon URLs |
97
+ | `country` | no | Country code for geo-boosted results |
98
+ | `auto_parameters` | no | Let Tavily optimize parameters automatically |
78
99
 
79
- ### Example response
100
+ **Example response:**
80
101
 
81
102
  ```json
82
103
  {
@@ -99,12 +120,148 @@ The agent can call this tool with the following parameters:
99
120
  }
100
121
  ```
101
122
 
123
+ ### `tavily_extract`
124
+
125
+ Extract and clean content from one or more URLs.
126
+
127
+ | Parameter | Required | Description |
128
+ |-----------|----------|-------------|
129
+ | `urls` | **yes** | Array of URLs to extract content from |
130
+ | `query` | no | Rerank extracted chunks for relevance |
131
+ | `chunks_per_source` | no | Max snippets per source |
132
+ | `format` | no | `"markdown"` or `"text"` (default: `"markdown"`) |
133
+ | `include_favicon` | no | Include favicon URLs |
134
+ | `timeout` | no | Max seconds before timeout |
135
+
136
+ **Example response:**
137
+
138
+ ```json
139
+ {
140
+ "results": [
141
+ {
142
+ "url": "https://example.com/article",
143
+ "raw_content": "# Article Title\n\nFull markdown content..."
144
+ }
145
+ ],
146
+ "failed_results": [],
147
+ "provider": "tavily",
148
+ "tookMs": 1234
149
+ }
150
+ ```
151
+
152
+ ### `tavily_crawl`
153
+
154
+ Crawl a website starting from a root URL, traversing links and extracting content.
155
+
156
+ | Parameter | Required | Description |
157
+ |-----------|----------|-------------|
158
+ | `url` | **yes** | Root URL to start crawling |
159
+ | `instructions` | no | Natural language guidance for the crawl |
160
+ | `max_depth` | no | Crawl depth (1-5) |
161
+ | `max_breadth` | no | Max links per level (1-500) |
162
+ | `limit` | no | Total URL cap |
163
+ | `select_paths` | no | Regex include filters for paths |
164
+ | `select_domains` | no | Regex include filters for domains |
165
+ | `exclude_paths` | no | Regex exclude filters for paths |
166
+ | `exclude_domains` | no | Regex exclude filters for domains |
167
+ | `allow_external` | no | Follow external links |
168
+ | `include_images` | no | Include images |
169
+ | `extract_depth` | no | `"basic"` or `"advanced"` |
170
+ | `format` | no | `"markdown"` or `"text"` |
171
+ | `include_favicon` | no | Include favicons |
172
+ | `timeout` | no | Timeout in seconds (10-150) |
173
+
174
+ **Example response:**
175
+
176
+ ```json
177
+ {
178
+ "base_url": "https://example.com",
179
+ "results": [
180
+ {
181
+ "url": "https://example.com/page1",
182
+ "raw_content": "# Page Title\n\nContent..."
183
+ },
184
+ {
185
+ "url": "https://example.com/page2",
186
+ "raw_content": "# Another Page\n\nMore content..."
187
+ }
188
+ ],
189
+ "provider": "tavily",
190
+ "tookMs": 5678
191
+ }
192
+ ```
193
+
194
+ ### `tavily_map`
195
+
196
+ Generate a site map — discover and list all URLs from a website.
197
+
198
+ | Parameter | Required | Description |
199
+ |-----------|----------|-------------|
200
+ | `url` | **yes** | URL to map |
201
+ | `instructions` | no | Natural language guidance |
202
+ | `max_depth` | no | Crawl depth (1-5) |
203
+ | `max_breadth` | no | Links per level |
204
+ | `limit` | no | Total URL cap |
205
+ | `select_paths` | no | Include filters for paths |
206
+ | `select_domains` | no | Include filters for domains |
207
+ | `exclude_paths` | no | Exclude filters for paths |
208
+ | `exclude_domains` | no | Exclude filters for domains |
209
+ | `allow_external` | no | Follow external links |
210
+ | `categories` | no | Category filters |
211
+
212
+ **Example response:**
213
+
214
+ ```json
215
+ {
216
+ "results": [
217
+ "https://example.com/",
218
+ "https://example.com/about",
219
+ "https://example.com/docs",
220
+ "https://example.com/docs/getting-started",
221
+ "https://example.com/pricing"
222
+ ],
223
+ "provider": "tavily",
224
+ "tookMs": 2345
225
+ }
226
+ ```
227
+
228
+ ### `tavily_research`
229
+
230
+ Run a deep agentic research task with a comprehensive report.
231
+
232
+ | Parameter | Required | Description |
233
+ |-----------|----------|-------------|
234
+ | `input` | **yes** | Research question or topic |
235
+ | `model` | no | `"mini"`, `"pro"`, or `"auto"` (default: `"auto"`) |
236
+ | `output_schema` | no | JSON schema for structured output |
237
+ | `citation_format` | no | `"numbered"`, `"mla"`, `"apa"`, or `"chicago"` |
238
+
239
+ **Example response:**
240
+
241
+ ```json
242
+ {
243
+ "output": "# Research Report\n\n## Overview\n\nComprehensive analysis of...",
244
+ "sources": [
245
+ {
246
+ "title": "Source Article",
247
+ "url": "https://example.com/research"
248
+ }
249
+ ],
250
+ "provider": "tavily",
251
+ "tookMs": 45000
252
+ }
253
+ ```
254
+
102
255
  ## Features
103
256
 
104
- - **In-memory cache** — deduplicates identical queries within the TTL window
105
- - **Domain filtering** — include/exclude specific domains per query
106
- - **News search** — topic + date range support for news queries
107
- - **AI answers** — optional Tavily-generated summary alongside results
257
+ - **In-memory cache** — deduplicates identical search queries within the TTL window
258
+ - **Domain filtering** — include/exclude specific domains per search query
259
+ - **News & finance search** — topic + date range support
260
+ - **AI answers** — optional Tavily-generated summary alongside search results
261
+ - **URL extraction** — get clean markdown/text from any web page
262
+ - **Website crawling** — traverse and extract content from entire sites
263
+ - **Site mapping** — discover all URLs before targeted extraction
264
+ - **Deep research** — multi-step agentic research with comprehensive reports
108
265
  - **Graceful degradation** — goes idle if no API key is configured
109
266
 
110
267
  ## Requirements
@@ -112,6 +269,13 @@ The agent can call this tool with the following parameters:
112
269
  - OpenClaw **2025+**
113
270
  - A [Tavily API key](https://app.tavily.com) (free tier available)
114
271
 
272
+ ## Links
273
+
274
+ - **npm**: [openclaw-tavily](https://www.npmjs.com/package/openclaw-tavily)
275
+ - **GitHub**: [framix-team/openclaw-tavily](https://github.com/framix-team/openclaw-tavily)
276
+ - **Tavily API docs**: [docs.tavily.com](https://docs.tavily.com)
277
+ - **OpenClaw plugin docs**: [docs.openclaw.ai/tools/plugin](https://docs.openclaw.ai/tools/plugin)
278
+
115
279
  ## Made by
116
280
 
117
281
  [Framix](https://framix.net/) — Growth Web Presence for Scaling Companies