Skip to content

Optional: Enable web search

By default, OpenClaw answers questions only based on its training data, which means it doesn't know about current events or real-time news. To give your agent access to the live internet, you can enable the web search tool.

OpenClaw officially recommends Brave Search. It uses an independent web index optimized for AI retrieval, ensuring your agent finds accurate information.

Prerequisites

A Brave Search API key is required to complete this setup. You can obtain a free API key from the Brave Search API. The free tier of the "Data for Search" plan is usually sufficient for personal use.

  1. Open the OpenClaw CLI.

  2. Run the following command to start the web configuration wizard:

    bash
    openclaw configure --section web
  3. Configure the basic settings as follows:

    SettingsOption
    Where will the Gateway runLocal (this machine)
    Enable web_searchYes
    Search providerBrave Search
    Brave Search API keyYour BraveSearchAPIkey
    Enable web_fetch (keyless HTTP fetch)Yes
  4. Finalize the settings in the configuration file.

    TIP

    While the CLI wizard sets up the API key, the configuration file allows you to customize specific parameters, such as timeouts and limits.

    a. Open the Files app, and then go to Data > clawdbot > config.

    b. Double-click the openclaw.json file to open it.

    c. Click edit_square in the upper-right corner to enter the edit mode.

    d. Find the tools section and update as follows. Replace {Your-Brave-Search-API-Key} with your actual key.

    json
    "tools": {
        "web": {
        "search": {
            "enabled": true,
            "provider": "brave",
            "apiKey": "{Your-Brave-Search-API-Key}",
            "maxResults": 10,
            "timeoutSeconds": 30
        },
        "fetch": {
            "enabled": true,
            "timeoutSeconds": 30
        }
        }
    },

    e. Click save in the upper-right corner to save the changes.

  1. To verify the search tool is working, open Discord and ask your agent a question that requires real-time internet data.