docs(web): add Tavily provider documentation
This commit is contained in:
parent
396b610d57
commit
af0d0692b5
@ -1,16 +1,17 @@
|
|||||||
---
|
---
|
||||||
summary: "Web search + fetch tools (Brave Search API, Perplexity direct/OpenRouter)"
|
summary: "Web search + fetch tools (Brave Search API, Perplexity, Tavily)"
|
||||||
read_when:
|
read_when:
|
||||||
- You want to enable web_search or web_fetch
|
- You want to enable web_search or web_fetch
|
||||||
- You need Brave Search API key setup
|
- You need Brave Search API key setup
|
||||||
- You want to use Perplexity Sonar for web search
|
- You want to use Perplexity Sonar for web search
|
||||||
|
- You want to use Tavily Search for AI-optimized results
|
||||||
---
|
---
|
||||||
|
|
||||||
# Web tools
|
# Web tools
|
||||||
|
|
||||||
Clawdbot ships two lightweight web tools:
|
Clawdbot ships two lightweight web tools:
|
||||||
|
|
||||||
- `web_search` — Search the web via Brave Search API (default) or Perplexity Sonar (direct or via OpenRouter).
|
- `web_search` — Search the web via Brave Search API (default), Perplexity Sonar, or Tavily Search.
|
||||||
- `web_fetch` — HTTP fetch + readable extraction (HTML → markdown/text).
|
- `web_fetch` — HTTP fetch + readable extraction (HTML → markdown/text).
|
||||||
|
|
||||||
These are **not** browser automation. For JS-heavy sites or logins, use the
|
These are **not** browser automation. For JS-heavy sites or logins, use the
|
||||||
@ -21,6 +22,7 @@ These are **not** browser automation. For JS-heavy sites or logins, use the
|
|||||||
- `web_search` calls your configured provider and returns results.
|
- `web_search` calls your configured provider and returns results.
|
||||||
- **Brave** (default): returns structured results (title, URL, snippet).
|
- **Brave** (default): returns structured results (title, URL, snippet).
|
||||||
- **Perplexity**: returns AI-synthesized answers with citations from real-time web search.
|
- **Perplexity**: returns AI-synthesized answers with citations from real-time web search.
|
||||||
|
- **Tavily**: returns high-quality search results optimized for AI applications.
|
||||||
- Results are cached by query for 15 minutes (configurable).
|
- Results are cached by query for 15 minutes (configurable).
|
||||||
- `web_fetch` does a plain HTTP GET and extracts readable content
|
- `web_fetch` does a plain HTTP GET and extracts readable content
|
||||||
(HTML → markdown/text). It does **not** execute JavaScript.
|
(HTML → markdown/text). It does **not** execute JavaScript.
|
||||||
@ -32,8 +34,7 @@ These are **not** browser automation. For JS-heavy sites or logins, use the
|
|||||||
|----------|------|------|---------|
|
|----------|------|------|---------|
|
||||||
| **Brave** (default) | Fast, structured results, free tier | Traditional search results | `BRAVE_API_KEY` |
|
| **Brave** (default) | Fast, structured results, free tier | Traditional search results | `BRAVE_API_KEY` |
|
||||||
| **Perplexity** | AI-synthesized answers, citations, real-time | Requires Perplexity or OpenRouter access | `OPENROUTER_API_KEY` or `PERPLEXITY_API_KEY` |
|
| **Perplexity** | AI-synthesized answers, citations, real-time | Requires Perplexity or OpenRouter access | `OPENROUTER_API_KEY` or `PERPLEXITY_API_KEY` |
|
||||||
|
| **Tavily** | AI-optimized results, fast, simple setup | Requires Tavily account | `TAVILY_API_KEY` |
|
||||||
See [Brave Search setup](/brave-search) and [Perplexity Sonar](/perplexity) for provider-specific details.
|
|
||||||
|
|
||||||
Set the provider in config:
|
Set the provider in config:
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ Set the provider in config:
|
|||||||
tools: {
|
tools: {
|
||||||
web: {
|
web: {
|
||||||
search: {
|
search: {
|
||||||
provider: "brave" // or "perplexity"
|
provider: "brave" // or "perplexity" or "tavily"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -138,6 +139,40 @@ If no base URL is set, Clawdbot chooses a default based on the API key source:
|
|||||||
| `perplexity/sonar-pro` (default) | Multi-step reasoning with web search | Complex questions |
|
| `perplexity/sonar-pro` (default) | Multi-step reasoning with web search | Complex questions |
|
||||||
| `perplexity/sonar-reasoning-pro` | Chain-of-thought analysis | Deep research |
|
| `perplexity/sonar-reasoning-pro` | Chain-of-thought analysis | Deep research |
|
||||||
|
|
||||||
|
## Using Tavily
|
||||||
|
|
||||||
|
Tavily is a search API built specifically for AI agents. It returns clean, relevant results
|
||||||
|
optimized for LLM consumption.
|
||||||
|
|
||||||
|
### Getting a Tavily API key
|
||||||
|
|
||||||
|
1) Create an account at https://tavily.com/
|
||||||
|
2) Generate an API key in your dashboard
|
||||||
|
|
||||||
|
Tavily offers a free tier with 1,000 searches/month.
|
||||||
|
|
||||||
|
### Setting up Tavily search
|
||||||
|
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
tools: {
|
||||||
|
web: {
|
||||||
|
search: {
|
||||||
|
enabled: true,
|
||||||
|
provider: "tavily",
|
||||||
|
tavily: {
|
||||||
|
// API key (optional if TAVILY_API_KEY is set)
|
||||||
|
apiKey: "tvly-..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Environment alternative:** set `TAVILY_API_KEY` in the Gateway environment.
|
||||||
|
For a gateway install, put it in `~/.clawdbot/.env`.
|
||||||
|
|
||||||
## web_search
|
## web_search
|
||||||
|
|
||||||
Search the web using your configured provider.
|
Search the web using your configured provider.
|
||||||
@ -148,6 +183,7 @@ Search the web using your configured provider.
|
|||||||
- API key for your chosen provider:
|
- API key for your chosen provider:
|
||||||
- **Brave**: `BRAVE_API_KEY` or `tools.web.search.apiKey`
|
- **Brave**: `BRAVE_API_KEY` or `tools.web.search.apiKey`
|
||||||
- **Perplexity**: `OPENROUTER_API_KEY`, `PERPLEXITY_API_KEY`, or `tools.web.search.perplexity.apiKey`
|
- **Perplexity**: `OPENROUTER_API_KEY`, `PERPLEXITY_API_KEY`, or `tools.web.search.perplexity.apiKey`
|
||||||
|
- **Tavily**: `TAVILY_API_KEY` or `tools.web.search.tavily.apiKey`
|
||||||
|
|
||||||
### Config
|
### Config
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user