PicoClaw provides web search capabilities through multiple search providers with intelligent fallback behavior. The agent can search the web to find current information, news, and answers to questions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sipeed/picoclaw/llms.txt
Use this file to discover all available pages before exploring further.
Available Providers
PicoClaw supports four web search providers with automatic priority-based selection:1. Perplexity (Priority 1)
Best for: AI-powered search with synthesized answers- Uses Perplexity’s
sonarmodel for intelligent search - Returns formatted results with titles, URLs, and descriptions
- Slower than traditional search (30s timeout) due to LLM processing
- Requires API key from Perplexity
2. Brave Search (Priority 2)
Best for: High-quality search results optimized for AI agents- Fast and reliable search results (10s timeout)
- Free tier: 2,000 queries per month
- Requires API key from Brave Search API
- Returns structured results with titles, URLs, and descriptions
3. Tavily (Priority 3)
Best for: AI-optimized search with advanced depth- Designed specifically for AI agents
- Free tier: 1,000 queries per month
- Requires API key from Tavily
- Advanced search depth with rich content extraction
4. DuckDuckGo (Priority 4 - Fallback)
Best for: No-setup fallback option- No API key required
- Free and unlimited
- HTML-based extraction using regex
- Automatically enabled as fallback when no other provider is configured
Configuration
Add web search configuration to~/.picoclaw/config.json:
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable/disable the provider |
api_key | string | - | API key for the provider (not needed for DuckDuckGo) |
max_results | integer | 5 | Maximum number of search results to return |
Fallback Behavior
PicoClaw automatically selects the best available provider based on priority:- Perplexity - If enabled and API key is configured
- Brave - If Perplexity unavailable and Brave is enabled
- Tavily - If Brave unavailable and Tavily is enabled
- DuckDuckGo - Always available as ultimate fallback (no API key needed)
Usage
The agent automatically uses web search when needed:web_search tool is invoked automatically by the agent with the following parameters:
Tool Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query |
count | integer | No | Number of results (1-10, default: configured max_results) |
Tool Response Format
The tool returns formatted search results:Getting API Keys
Brave Search API
- Visit https://brave.com/search/api
- Sign up for a free account
- Create an API key (starts with
BSA) - Free tier: 2,000 queries/month
Tavily API
- Visit https://tavily.com
- Sign up for an account
- Get your API key (starts with
tvly-) - Free tier: 1,000 queries/month
Perplexity API
- Visit https://perplexity.ai
- Access API settings
- Generate API key (starts with
pplx-) - Check pricing at Perplexity Pricing
Minimal Setup (No API Key)
To use web search without any API keys, simply enable DuckDuckGo:Implementation Details
Search Timeouts
- Standard providers (Brave, Tavily, DuckDuckGo): 10 seconds
- Perplexity: 30 seconds (due to LLM processing)
- Web fetch: 60 seconds
HTTP Client Features
- Configurable proxy support (HTTP, HTTPS, SOCKS5)
- Connection pooling (10 max idle connections)
- 30-second idle connection timeout
- 15-second TLS handshake timeout
- Custom User-Agent for compatibility
Provider Implementation
All providers implement theSearchProvider interface:
Troubleshooting
”API key configuration issue”
This message appears when no API key is configured. The agent will:- Automatically fall back to DuckDuckGo if enabled
- Provide helpful links for manual searching
”No results found”
If a search returns no results:- Try rephrasing the query
- Check internet connectivity
- Verify API key is valid
- Try a different provider
Rate Limiting
Free tier limits:- Brave: 2,000 queries/month
- Tavily: 1,000 queries/month
- DuckDuckGo: Unlimited (rate-limited by IP)
Related Tools
- Web Fetch - Fetch and extract content from specific URLs
- Scheduled Tasks - Schedule periodic web searches