ML 136: OpenClaw: exec and Email (20 pts extra)

What You Need

Purpose

To install skills that make OpenClaw more useful.

Enabling exec

This is a fundamental tool--the ability to run shell commands from OpenClaw. It used to be a standard function, but it was broken in early March.

Updating and Doctoring OpenClaw

Execute these commands to fix a problem left over from project ML 135 with openclaw running as a service.
openclaw update
openclaw doctor
It asks "Update gateway service config to the recommended defaults now?" reply Yes.

It asks "Restart gateway service now?" reply Yes.

Execute this command:

openclaw doctor --fix

Troubleshooting

When I tried this on Mar 16, 2026, the new version of openclaw had broken exec again.

These commands fixed it, by installing a specific older version that works:

npm install -g openclaw@2026.3.12 --force
openclaw doctor --fix
openclaw gateway

Repairing the Tools Configuration

Execute this command:
nano ~/.openclaw//openclaw.json
Replace the "tools" section with this:
  "tools": {
    "allow": [
      "*"
    ],
    "exec": {
      "ask": "off",
      "host": "gateway",
      "security": "full"
    },
    "profile": "full"
  },
as shown below.

Press Ctrl+X, Y, Enter to save the file.

Restarting the OpenClaw Gateway

Execute these commands to fix a problem left over from project ML 135 with openclaw running as a service.
openclaw gateway restart

Launching Ollama

Execute this command:
ollama launch openclaw
A list of models appears.

Select "minimix-m2.5:cloud" and press Enter.

It asks "Proceed?" reply Yes.

Leave this process running.

Opening the Dashboard

Open a new Terminal and execute this command:
openclaw dashboard
The OpenClaw dashboard opens in Firefox.

Flag ML 136.1: Exec (10 pts)

In the OpenClaw dashboard, on the Chat tab, enter this prompt:
Execute the "ss -pantl" command with exec. Show the port numbers and the service each provides.
The flag is covered by a green rectangle in the image below.

Creating an AgentMail Account

In a browser, go to https://www.agentmail.to

At the top right, click the "GET STARTED" button.

Log in with Google.

Follow the on-screen instructions to create an inbox.

You are prompted to send an email to your new email address ending in "agentmail.to". When I did it from a Gmail account, it worked, but only if I put some text in the body of the email, as shown below.

On the left side, click "API Keys".

At the top right, click the "CREATE API KEY" button.

Enter a name of OpenClaw and click the "CREATE API KEY" button.

Your key appears, as shown below.

Save it.

Installing ClawHub

Execute this command:
npm i -g clawhub 

Installing the AgentMail Skill in Openclaw

Execute this command:
clawhub install agentmail 
If you get a "Rate limit exceeded" message, just wait a minute or two and try again.

When it works, you'll get the Ok message as shown below.

Inserting the API Key

Execute this command:
nano ~/.openclaw/openclaw.json
Near the end, insert this skills section, as shown below.

Notice that you will need to add a comma after the preceding "}".

    "skills": {
        "entries": {
            "agentmail": {
                "enabled": true,
                "env": {
                    "AGENTMAIL_API_KEY": "your-api-key-here"
                }
            }
        }
    }
Press Ctrl+X, Y, Enter to save the file.

Verifying the Skill Installation

Execute this command:
openclaw skills list --eligible
The agentmail skill should be ready, as shown below.

Sending a Test Email

Send an email to your agentmail.to email address from some other account, such as Gmail. Include both a subject and body that are non-empty, such as "test".

Flag ML 136.2: Email (10 pts)

In the OpenClaw dashboard, on the Chat tab, enter this prompt:
Please show me the raw version of the latest agentmail email.
The flag is covered by a green rectangle in the image below.

References

7 Essential OpenClaw Skills You Need Right Now

Connect Openclaw to Gmail: Step-by-Step Tutorial (2026)

3 Tools That Make OpenClaw Actually Useful

Fix for OpenClaw 'exec' tools not working after the latest update

Posted 3-7-26
"ollama dashboard" corrected to "openclaw dashboard" 3-16-26
Troubleshooting tip to install old version of openclaw added, and flag changed 3-16-26
Signal linking added 4-11-26 and removed on 4-12-26