Lesson 4. Assistant Tools#
Why you need this#
An AI model by itself can only generate text. But thanks to tools, your OpenClaw assistant can run commands on the computer, search the internet, control a browser, read and create files. Tools turn the assistant from a “talking head” into a real helper that takes action.
What tools are available#
🖥️ exec — running commands#
What it does: runs commands in the terminal (command line) of your computer.
Usage examples:
- “Show how much free disk space there is”
- “Create a folder for the project”
- “Run the data processing script”
How it looks in action:
You message the assistant: “What’s the current date and time on the server?”
The assistant runs the date command and shows the result.
Important parameters:
command— the command to run (required)timeout— maximum execution time (default 30 minutes)background— run in the background (don’t wait for completion)
About security: by default, commands run in an isolated environment (sandbox). This protects your system from accidental errors.
🔍 web_search — internet search#
What it does: searches for information on the internet through the Brave Search engine.
Usage examples:
- “Find the current dollar exchange rate”
- “What’s the weather tomorrow in New York?”
- “Find a recipe for lasagna”
How to set up:
You need a free API key from Brave Search:
openclaw configure --section webOr in the configuration file:
{
tools: {
web: {
search: {
enabled: true,
// The key is best stored in the BRAVE_API_KEY environment variable
}
}
}
}Search parameters:
query— search querycount— number of results (from 1 to 10)
📄 web_fetch — loading web pages#
What it does: opens a web page and extracts readable text from it (removes ads, menus, and other “junk”).
Usage examples:
- “Read this article and make a summary” (with a link)
- “What’s on the homepage of this website?”
Parameters:
url— page addressextractMode— extraction format:markdown(default) ortextmaxChars— maximum number of characters (for long pages)
Limitation: web_fetch doesn’t execute JavaScript. If a website loads dynamically (e.g., a single-page application), it’s better to use the browser.
🌐 browser — browser control#
What it does: opens a real browser and can interact with it — click buttons, fill out forms, take screenshots.
Usage examples:
- “Open the website and take a screenshot”
- “Go to the website, fill out the form, and click submit”
- “Check the order status on the store’s website”
Main browser actions:
| Action | What it does |
|---|---|
start / stop |
Start / stop the browser |
open |
Open a new tab |
snapshot |
Get a “snapshot” of the page (text description of elements) |
screenshot |
Take a screenshot (image) |
act |
Perform an action: click, type text, scroll |
navigate |
Go to an address |
How browser automation works:
- The assistant takes a
snapshot— gets a list of elements on the page - Finds the needed element (button, input field)
- Performs
act— clicks or types text - Checks the result with a new
snapshotorscreenshot
📁 Working with files: read, write, edit#
read — read a file’s contents write — create or overwrite a file edit — make precise changes to a file
Examples:
- “Read the file report.txt”
- “Create a file with a task list”
- “Replace the word ‘draft’ with ‘final version’ in the document”
📨 message — sending messages#
What it does: sends messages to messengers (Telegram, WhatsApp, Discord, Slack, and others).
Examples:
- “Send a message to the Telegram group”
- “Create a poll in Discord”
How to manage tools#
Disabling unnecessary tools#
If you want to prevent the assistant from using certain tools:
{
tools: {
deny: ["browser"] // block the browser
}
}Tool profiles#
For quick setup, there are ready-made profiles:
| Profile | What’s included |
|---|---|
minimal |
Only session status |
coding |
Files, commands, sessions, memory |
messaging |
Messages and sessions |
full |
All tools (default) |
Example — only for messaging:
{
tools: {
profile: "messaging"
}
}Tool groups#
For convenience, tools are organized into groups:
| Group | Tools |
|---|---|
group:runtime |
exec, bash, process |
group:fs |
read, write, edit |
group:web |
web_search, web_fetch |
group:ui |
browser, canvas |
group:memory |
memory_search, memory_get |
group:messaging |
message |
group:nodes |
nodes |
Example — allow only files and browser:
{
tools: {
allow: ["group:fs", "browser"]
}
}Practical example#
Say you ask the assistant: “Search the internet for the euro to dollar exchange rate and write it to a file.”
The assistant will perform a chain of actions:
- web_search — find the current rate
- write — create a file with the result
This all happens automatically — you just describe the task in plain language.
Lesson summary#
- Tools are the assistant’s abilities to act in the real world
- exec — runs commands on the computer
- web_search — searches the internet (requires Brave Search key)
- web_fetch — loads and extracts text from web pages
- browser — controls a real browser
- read/write/edit — working with files
- message — sending messages to messengers
- Tools can be enabled, disabled, and grouped through settings
- The assistant automatically chooses the right tools for your task
Next lesson: Skills