OpenClaw
OpenClaw is a personal AI assistant that is designed to run on your local device. It connects directly to the messaging apps like Discord and Slack, and allows you to interact with it right in the app.
It acts as an "always-on" operator that can execute real tasks, such as searching and sending documents, managing calendars, or browsing webpages.
Learning objectives
By the end of this tutorial, you are be able to:
- Install and initialize the OpenClaw environment.
- Pair and connect the OpenClaw CLI and the Control UI.
- Configure OpenClaw to use the local AI model Ollama.
- Integrate OpenClaw with Discord.
- Manage skills and plug-ins.
- Enable the web search capability using Brave Search.
Prerequisites
Local model: Ensure Ollama is installed and running. You must have a tool-capable model installed, such as
glm-4.7-flash,qwen3, andllama3.1. This tutorial usesllama3.1:8b.Discord account: Required to create the bot application.
Discord server: A server where you have permissions to add bots.
(Optional) Brave search API key: Required for the agent to search the web for real-time information.
Tip
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.
Install OpenClaw
From the Olares Market, search for "OpenClaw".

Click Get, and then click Install. When the installation finishes, two shortcuts appear in the Launchpad:
- OpenClaw CLI: The command line interface
- Control UI: The graphical dashboard

Initialize OpenClaw
Run a quick setup for the agent in the OpenClaw CLI.
Open the OpenClaw CLI app from the Launchpad.
Enter the following command to start the onboarding wizard.
bashopenclaw onboard
The wizard guides you through a series of steps. Use the arrow keys to navigate and press Enter to confirm.
Note on configurations
- To get you started quickly, this tutorial skips several advanced settings in the wizard. You can configure or modify them later.
- Do not configure skills here, because the Olares security environment prevents the wizard from automatically installing skills. You need to install them manually. For more information, see Manage skills and plugins.
Settings Option I understand this is powerful and inherently
risky. Continue?Yes Onboarding mode QuickStart Config handling Use existing values Model/auth provider Skip for now Filter models by provider All providers Default model Keep current Select channel Skip for now Configure skills now No
(Manual installation required)How do you want to hatch your bot Do this later After you complete the wizard, close OpenClaw CLI and open it again.
Enter the following command to obtain the gateway token:
bashopenclaw config get gateway.auth.tokenCopy the token and keep the OpenClaw CLI window open for the next step.
Pair device
Connect the Control UI to the OpenClaw CLI to use the graphical dashboard.
Open the Control UI app from the Launchpad.
On the Overview page, in the Gateway Access panel, specify the following settings:
- Gateway Token: Enter the token you copied in the previous step.
- Default Session Key: Enter
agent:main:main.
Click Connect.
The connection error
disconnected[1008]:pairing requiredoccurs. This is expected and means the device connection is waiting for approval.Return to the OpenClaw CLI window and enter the following command:
bashopenclaw devices listIn the Pending table, find the Request ID associated with your current device.
INFO
The Request ID has a time limit. If the authorization fails, re-run
openclaw devices listto obtain a new valid ID.
Authorize the device by entering the following command:
bashopenclaw devices approve {RequestID}When the terminal displays
Approved {DeviceID}, return to the Control UI. Now the STATUS in the Snapshot panel should be Connected.
Configure local AI model
In the Control UI, select Config from the left sidebar.
Switch to the Raw tab to edit the configuration JSON file directly.
Find the
agentssection and update thedefaultsblock to specify your primary model. Ensure that the model name matches the one installed in Ollama.json"agents": { "defaults": { "model": { "primary": "ollama/llama3.1:8b" }, "workspace": "/home/node/.openclaw/workspace", "maxConcurrent": 4, "subagents": { "maxConcurrent": 8 } } },Click Save in the upper-right corner. The system validates the config and restarts automatically to apply the changes.
Integrate with Discord
To chat with your agent remotely, connect it to a Discord bot.
Step 1: Create a Discord bot
Log in to the Discord Developer Portal with your Discord account.
Click New Application.

Enter a name for the new app, agree to terms, and then click Create.

From the left sidebar, select Bot.
Scroll down to the Privileged Gateway Intents section and enable the following settings:
- Presence Intent
- Server Members Intent
- Message Content Intent
Click Save Changes.
Scroll up to the Token section, click Reset Token, and then copy the generated token for your Discord bot. You need the token for channel configuration later in Control UI.

Step 2: Invite the bot to server
From the left sidebar, select OAuth2, and then find the OAuth2 URL Generator section:
a. In Scopes, select Bot and applications.commands.

b. In Bot Permissions, set as the following image. You can modify the settings later.

Copy the Generated URL at the bottom.
Paste the URL into a new browser tab, select your Discord server, and then click Authorize. The bot is added to your server.

Step 3: Configure channel
Configure the Discord channel in Control UI.
Return to the Control UI > Config > Raw tab.
Find the
channelssection:a. Update with your Discord bot token.
b. Enable Discord DM (Direct Messages) and set the Discord DM Policy to Pairing.
json"channels": { "discord": { "enabled": true, "token": "{YOUR_BOT_TOKEN}", "allowBots": true, "dm": { "enabled": true, "policy": "pairing" } } },
Click Save.
From the left sidebar, select Channels. On the Discord card, Probe ok indicates successful connection.

Step 4: Authorize your account
For security, the bot does not talk to unauthorized users. You must pair your Discord account with the bot.
Open Discord and send a Direct Message to your new bot. The bot will reply with an error message containing a Pairing Code.
Open the OpenClaw CLI and enter the following command:
bashopenclaw pairing approve discord {Your-Pairing-Code}Once approved, you can start chatting with your agent in Discord.
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.
Open the OpenClaw CLI.
Run the following command to start the web configuration wizard:
bashopenclaw configure --section webConfigure the basic settings as follows:
Settings Option Where will the Gateway run Local (this machine) Enable web_search (Brave Search) Yes Brave Search API key Your BraveSearchAPIkeyEnable web_fetch (keyless HTTP
fetch)Yes Finalize the configuration in Control UI.
The CLI wizard sets up the API key, but you can customize specific tool parameters such as timeouts and limits in the Control UI.
a. Return to the Control UI > Config > Raw tab.
b. Find the
toolssection and update as follows:json"tools": { "web": { "search": { "enabled": true, "provider": "brave", "apiKey": "{Your-Brave-Search-API-Key}", "maxResults": 10, "timeoutSeconds": 30 }, "fetch": { "enabled": true, "timeoutSeconds": 30 } } },Now you can ask the agent in Discord to answer questions that require real-time internet data.
Manage skills and plugins
OpenClaw can be extended using skills and plugins:
- Skills add new capabilities to the AI. For example, managing Model Context Protocol servers.
- Plugins extend the system to support additional channels or community features. For example, adding iMessage via BlueBubbles.
Why manual installation required
To protect your device, OpenClaw runs in a restricted, non-root environment without administrative privileges. This prevents the agent from modifying your system or self-installing software.
Step 1: Install ClawHub
To manage skills and plugins, install ClawHub. It is the package manager for OpenClaw.
Open the OpenClaw CLI.
Enter the following command:
bashnpx clawhubWhen prompted to proceed, press Y.
Step 2: Install and enable skills
Check the list of available skills by entering the following command:
bashopenclaw skills
Find the target skill name in the Skill column, and then install by entering the following command:
bashnpx clawhub install {SkillName}For example, to install mcporter, enter the following command:
bashnpx clawhub install mcporterIf prompted to Install anyway, select Yes.
When the installation is completed, verify by entering the following command:
bashopenclaw skillsThe status of mcporter is ready, indicating the installation is successful.

Open the Control UI, go to the Skills page and find mcporter:
- If it is enabled, click Disable, and then click Enable again to force the system to save the configuration.
- If it is disabled, click Enable.

Click Save in the upper-right corner. The system validates the config and restarts automatically to apply the changes.
Step 3: Install plug-ins
In the OpenClaw CLI, check the list of compatible plug-ins by entering the following command:
bashopenclaw plugins listFind the target plug-in name in the Name column, and then install by entering the following command:
bashopenclaw plugins install {Name}For example, to install BlueBubbles, enter the following command:
bashopenclaw plugins install @openclaw/bluebubblesWhen the installation is completed, close OpenClaw CLI and open it again to load the new plug-in.
Verify by checking the plugin status:
bashopenclaw plugins listNow the status of the plug-in is loaded.
Open the Control UI, go to Config > Plugins, and then find @openclaw/bluebubbles on the All tab:
- If it is enabled, turn off the toggle switch, and then turn on again to force the system to explicitly save the configuration.
- If it is disabled, turn on the toggle switch.

Click Save in the upper-right corner. The system validates the config and restarts automatically to apply the changes.