Welcome to RDK S600 Developer Kit repository
15. OpenClaw Configure Web Search Capability
Configure Web Search Capability
Why Configure Web Search Capability
Although OpenClaw's local models are powerful, their knowledge is static and only includes data from training. This means:
- ❌ Cannot answer the latest news and events
- ❌ Doesn't know today's weather
- ❌ Cannot search for information
- ❌ Cannot access the latest technical documentation
By configuring web search capability, OpenClaw can:
- ✅ Search the internet in real-time
- ✅ Get the latest news and information
- ✅ Query real-time data (weather, stocks, etc.)
- ✅ Access the latest technical documentation and tutorials
- ✅ Conduct in-depth research and fact-checking
This section will configure OpenClaw's web search capability. OpenClaw supports multiple search engines, and the default web_search uses Brave API. However, as of the publication of this tutorial, Brave API has cancelled its free plan. Therefore, we use Tavily Web Search as an alternative.
Tavily Web Search is a search engine optimized specifically for AI agents, providing structured search results.
Preparation
Before starting, please ensure:
- ✅ OpenClaw is installed and running normally
- ✅ At least one model is configured (Ollama or cloud model)
- ✅ Network connection is available
- ✅ You have a valid email (for registering with Tavily)
Step 1: Get Tavily API Key
Tavily is an AI-optimized search engine that provides a free tier, with 1000 searches per month free of charge, sufficient for daily use. (Policies may change; actual quotas should be based on the actual situation.)
1.1 Visit Tavily Official Website
Open in your browser: https://tavily.com

1.2 Register an Account
Click the "Sign Up" or "Register" button on the page:

Fill in the registration information:
- Email Address: Fill in your real email
- Code: Graphic verification code
Click "Continue" to create an account.
1.3 Verify Email
Tavily will send a verification email to your inbox. Open your email, find the email from Tavily, and click the verification link. After successful verification, you will be automatically redirected to the Tavily console.
1.4 Get API Key
After logging in, go to the API Keys page:

You will see an API Key with a format similar to:
tvly-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
⚠️ Important Note:
- Please keep this key safe and do not share it with others
- Do not submit the key to code repositories or public platforms
Copy this API key. We will use it later.

Step 2: Install Tavily Web Search Skill
OpenClaw uses ClawHub to manage skills. We can install this plugin by simply talking to OpenClaw.
2.1 Open Terminal
Open the terminal on the S600 device and ensure a terminal has openclaw gateway running.
2.2 Install Skill
Before installing the skill, we need to log in to ClawHub first. This is an open-source OpenClaw skill publishing center. You can think of it as the "App Store" on your phone.
If you don't log in, you may encounter rate limiting when downloading.
Open the terminal and enter:
xxxxxxxxxxnpm i -g clawhub
Then open the ClawHub official website https://clawhub.ai/, click to log in with GitHub (you need to log in to GitHub first. This is not demonstrated here. To avoid network issues logging into GitHub, we have already pre-downloaded this Skill in our factory image. You can directly see Step 3: Configure API Key).

Redirect to the authorization page and click authorize:

Click on your username and go to settings:

Scroll down to API tokens and click Create token:

Copy the generated Token. We will use it below.

Next, run the following command on the server, replacing your Token with the one you just copied. Note that there is a space after -- token:
xxxxxxxxxxclawhub login --token your Token
You can see that the login was successful.

Next, we need to install the tavily-web-search Skill. There are many ways to install it. Here we use one of the more common methods. Enter in the terminal:
xxxxxxxxxxnpx clawhub@latest install tavily-search
If you see ✖ Rate limit exceeded, it means there was an error in the login step from the previous step. Please log in again.
2.3 Verify Installation
View the list of installed skills:
xxxxxxxxxxnpx clawhub@latest list
You should see tavily-web-search in the list.
Step 3: Configure API Key
Now we need to configure the Tavily API Key in OpenClaw.
3.1 Method 1: Configure via Environment Variable (Temporary)
Set the environment variable in the terminal:
xxxxxxxxxxexport TAVILY_API_KEY=tvly-your-api-key-hereNote: Replace tvly-your-api-key-here with the real API key you obtained in Step 1.
3.2 Method 2: Make Environment Variable Permanent
If you want the API key to be automatically set every time you open the terminal, you can add it to the Shell configuration file.
For users using Bash:
xxxxxxxxxxecho 'export TAVILY_API_KEY=tvly-your-api-key-here' >> ~/.bashrcsource ~/.bashrc3.3 Restart to Take Effect
Restart OpenClaw Gateway to make the configuration effective:
xxxxxxxxxxopenclaw gateway restartStep 4: Test Web Search Function
Now let's test if the web search is working properly.
4.1 Test Using TUI
Start TUI in the terminal:
xxxxxxxxxxopenclaw tui
4.2 Test Basic Search
Enter a question requiring the latest information in TUI, for example:
xxxxxxxxxxShow me important news today?

OpenClaw will:
- Identify the need to search for the latest information
- Call Tavily API to search
- Get search results
- Answer your question based on the search results
Advanced Usage Tips
Tip 1: Limit Search Sources
If you only want to search content from specific websites:
xxxxxxxxxxSearch only on Zhihu: How to learn PythonSearch only in MDN docs: CSS Flexbox usage

Tip 2: Get Original Content
If you need to get the complete content of a webpage:
xxxxxxxxxxExtract and summarize the full content of this page: [https://www.yahboom.com/study/K230]

Common Issues
Issue 1: Search Prompt Invalid API Key
Error Message:
xxxxxxxxxxError: Invalid API key
Possible Causes:
- API key entered incorrectly
- Environment variable not set correctly
- API key has expired
Solutions:
- Check if the API key is correctly copied:
xxxxxxxxxxecho $TAVILY_API_KEY- Reset the environment variable:
xxxxxxxxxxexport TAVILY_API_KEY=tvly-your-api-key-here- If the key has expired, log in to Tavily official website to get a new one.
Issue 2: No Search Results
Symptoms: After sending a search request, the AI replies "Unable to find relevant information".
Possible Causes:
- Network connection issue
- Tavily service temporarily unavailable
- Search keywords too vague
Solutions:
- Check network connection:
xxxxxxxxxxping tavily.com- Try more specific search keywords.
- Try again later.
Issue 3: Search is Very Slow
Symptoms: Search requests take a long time to return results.
Possible Causes:
- Using deep search mode
- High network latency
- High Tavily server load
Solutions:
- Use fast search mode:
xxxxxxxxxxFast search: [your question]
- Check network speed:
xxxxxxxxxxcurl -o /dev/null -s -w "%{time_total}\n" https://tavily.com- If it continues to be slow, try changing the network environment.
Issue 4: Quota Exhausted
Error Message:
xxxxxxxxxxError: API quota exceeded
Possible Cause: Free quota (1000 per month) has been used up.
Solution:
- Log in to Tavily console to check usage.
- Wait for quota reset next month.
Issue 5: Skill Installation Failed
Error Message:
xxxxxxxxxxError: Failed to install skill
Possible Causes:
- Network connection issue
- npm version too old
- Insufficient permissions (rate limited due to not logging in)
Solutions:
- Check network connection.
- Update npm:
xxxxxxxxxxnpm install -g npm@latest- Use sudo permission to install (if needed):
xxxxxxxxxxsudo npx clawhub@latest install tavily-web-searchSearch Mode Comparison
| Mode | Speed | Coverage | Applicable Scenario | Example |
|---|---|---|---|---|
| Basic Mode | 1-2 sec | Good | Quick factual queries, simple searches | "How's the weather today?" |
| Advanced Mode | 5-10 sec | Excellent | Complex research, comprehensive answers | "Compare the pros and cons of two technologies" |
| News Mode | 2-3 sec | Last 7 days | Current events, breaking news | "What tech news is there lately?" |
Best Practices
1. Use Search Quota Wisely
- ✅ Prioritize using fast search mode
- ✅ Avoid repeatedly searching the same content
- ✅ Leverage AI's memory capability to avoid repeated queries
- ❌ Don't frequently test the search function
2. Optimize Search Keywords
- ✅ Use specific, clear questions
- ✅ Include key information (time, location, object)
- ✅ Use natural language to describe needs
- ❌ Avoid overly vague queries
3. Verify Search Results
- ✅ Cross-verify important information
- ✅ Check the reliability of search result sources
- ✅ Pay attention to the timeliness of information
- ❌ Don't rely entirely on a single source
4. Combine with Local Knowledge
- ✅ For static knowledge, prioritize using local models
- ✅ For dynamic information, use web search
- ✅ Combine both for the best answer
- ❌ Don't use search for every question
Advanced Configuration
Configuration 1: Adjust Search Depth
In the OpenClaw configuration file, you can adjust the default search depth:
xxxxxxxxxx{ "skills": { "entries": { "tavily-web-search": { "enabled": true, "apiKey": "tvly-your-api-key-here", "config": { "searchDepth": "basic", "maxResults": 10, "includeAnswer": true, "includeRawContent": false } } } }}Configuration Description:
searchDepth:basicoradvancedmaxResults: Maximum number of results returned (1-10)includeAnswer: Whether to include AI-generated answer summaryincludeRawContent: Whether to include raw page content
Configuration 2: Set Domain Filtering
If you only want to search content from specific websites:
xxxxxxxxxx{ "skills": { "entries": { "tavily-web-search": { "enabled": true, "apiKey": "tvly-your-api-key-here", "config": { "includeDomains": ["github.com", "stackoverflow.com"], "excludeDomains": ["ads.example.com"] } } } }}Configuration 3: Configure News Mode
Set to use news mode by default:
xxxxxxxxxx{ "skills": { "entries": { "tavily-web-search": { "enabled": true, "apiKey": "tvly-your-api-key-here", "config": { "searchDepth": "basic", "topic": "news", "days": 7 } } } }}Configuration Description:
topic:generalornewsdays: Number of days for news search range (1-30)
Practical Scenario Examples
Scenario 1: Learning New Technology
xxxxxxxxxxSearch for the latest React tutorials suitable for beginners
OpenClaw:
- Search for the latest React beginner tutorials
- Filter content suitable for beginners from multiple sources
- Provide tutorial links and brief descriptions
- Give learning suggestions
Scenario 2: Shopping Decisions
xxxxxxxxxxSearch for detailed comparison of iPhone 15 and iPhone 15 Pro, including price and performance
OpenClaw:
- Search for the latest product comparison information
- Summarize price, performance, and feature differences
- Provide purchase suggestions
- Give official purchase links
Scenario 3: Travel Planning
xxxxxxxxxxSearch for comparison of transportation from Beijing to Shanghai, including time, price, and comfort
OpenClaw:
- Search for the latest transportation information
- Compare airplane, high-speed rail, car, etc.
- Provide price and time references
- Give recommended solutions
Scenario 4: Health Consultation
xxxxxxxxxxSearch for natural methods to relieve insomnia, based on authoritative medical websites
OpenClaw:
- Search for information from authoritative medical websites
- Provide scientifically verified methods
- Give precautions
- Recommend consulting a professional doctor
Scenario 5: Programming Questions
You:
xxxxxxxxxxSearch for how to implement async programming in Python, including code examples
OpenClaw:
- Search for the latest programming tutorials
- Provide detailed code examples
- Explain key concepts
- Give best practice suggestions
Security and Privacy
Data Privacy
Tavily's privacy policy:
- ✅ Zero data retention: Search data is not permanently stored
- ✅ SOC 2 certified: Complies with international security standards
- ✅ Prompt injection protection: Prevents malicious queries
- ✅ Does not record personal identity information
Security Suggestions
Protect API Keys
- Do not include keys in public code
- Replace keys periodically
- Use environment variables or key managers
Verify Search Results
- Check the reliability of information sources
- Cross-verify important information
- Pay attention to the timeliness of information
Reasonable Use
- Comply with Tavily's terms of use
- Do not abuse the search function
- Respect website content policies
Final
Congratulations! You have successfully configured the web search capability. OpenClaw can now access real-time internet information!
Next steps you can take:
- 📖 Continue learning other skill configurations
- 🎮 Explore more practical scenarios
- 🔧 Learn more about OpenClaw's advanced features
- 💡 Use your creativity to create more applications
Tip: If you encounter problems, you can run openclaw doctor for diagnosis at any time, or visit Tavily Official Documentation for more help.