Web Search Skill

Enable your Moltbot agent to search the web for information.

Web Search

Give your AI agent the ability to search the web and retrieve current information.

What It Does

  • Search the web using various search engines
  • Retrieve current information beyond training data
  • Find documentation, news, and answers
  • Support for multiple search providers

Install / Enable

# .env
SKILL_WEB_SEARCH_ENABLED=true

# Choose your search provider
SEARCH_PROVIDER=google  # or: bing, duckduckgo, serper

# Provider-specific keys
GOOGLE_SEARCH_API_KEY=your-api-key
GOOGLE_SEARCH_ENGINE_ID=your-engine-id

# Or for Serper (easier setup)
SERPER_API_KEY=your-serper-key

Permissions Required

PermissionDescription
NetworkAccess to search APIs
API KeyRequired for most providers

Example Commands

User: What's the latest version of Node.js?
Agent: [Searches web for "Node.js latest version 2024"]
       Node.js 22 is the current version, with Node.js 20 being
       the active LTS release...

User: Find documentation for React hooks
Agent: [Searches for "React hooks documentation"]
       Here's a summary of React hooks from the official docs...

User: What happened in tech news today?
Agent: [Searches for "tech news today"]
       Here are today's top tech headlines...

Configuration

Provider Options

Google Custom Search (Most accurate)

SEARCH_PROVIDER=google
GOOGLE_SEARCH_API_KEY=AIza...
GOOGLE_SEARCH_ENGINE_ID=017...

Serper (Easiest setup)

SEARCH_PROVIDER=serper
SERPER_API_KEY=your-key

DuckDuckGo (Free, no API key)

SEARCH_PROVIDER=duckduckgo
# No API key required

Bing

SEARCH_PROVIDER=bing
BING_SEARCH_API_KEY=your-key

Search Options

VariableDescriptionDefault
SEARCH_MAX_RESULTSResults per search5
SEARCH_SAFE_MODEEnable safe searchtrue
SEARCH_REGIONGeographic regionus
SEARCH_LANGUAGEResult languageen

Risks

API Costs: Each search costs API credits. Set usage limits.

Misinformation: Web results may be inaccurate. Don't use for critical decisions.

Privacy: Search queries are sent to third-party providers.

Troubleshooting

No results returned

  • Check API key is valid
  • Verify network connectivity
  • Check provider's dashboard for quota/errors

Rate limited

  • Reduce search frequency
  • Upgrade API plan
  • Use caching for repeated queries

Results not relevant

  • Try different search provider
  • Increase SEARCH_MAX_RESULTS
  • Fine-tune prompts to generate better queries

Getting API Keys

  1. Go to Google Cloud Console
  2. Create a project
  3. Enable "Custom Search API"
  4. Create credentials (API key)
  5. Go to Programmable Search Engine
  6. Create a search engine, copy the ID

Serper

  1. Go to serper.dev
  2. Sign up for free account
  3. Copy API key from dashboard

Alternatives