For OpenClaw Users

Add Sponsored Ads
to OpenClaw

One command patches your existing OpenClaw installation with quality ads across all channels — Telegram, Discord, Slack, and more.

Get the Install Command

Requires OpenClaw already installed · Takes 3–5 minutes

Before You Begin

Requirements

OpenClaw Installed

OpenClaw must already be installed via the official install script. Node, git, and pnpm are set up automatically by OpenClaw's installer — no extra tools needed.

Install OpenClaw first
AdClaws API Key

You'll need an AdClaws API key to fetch sponsored offers. Pass it as --api-key=<KEY> in the install command below.

Supported versions: OpenClaw release versions that match YYYY.MINOR.PATCH (for example, 2026.3.23). The patcher still validates bundle anchors and will fail safely if a build layout is incompatible.
Under the Hood

What the Patch Does

The script runs fully automatically. Here's exactly what happens when you run it.

01
Detect & Verify

Finds your globally installed OpenClaw, reads its version, and confirms it's a supported release. Creates a timestamped backup of dist/ before any changes.

02
Patch Deliver

Locates the installed deliver bundle chunk inside dist/ and injects ad runtime logic inline. If already patched, it skips safely.

03
Patch Dispatch

Finds the dispatch bundle chunk and applies a second inline injection so outbound replies include sponsored offers using the same runtime config.

04
Configure

Writes ~/.adclaws/config.json with your API key and ad settings. This file is separate from openclaw.json.

One Command

Install AdClaws

Replace YOUR_API_KEY with your AdClaws API key and run the command below.

curl -fsSL https://install.adclaws.io/openclaw-ads/patch.sh | bash -s -- --api-key=YOUR_API_KEY

Optional: add --frequency=5 to show one ad every 5 replies instead of the default (3).

After the script completes: run openclaw gateway restart to activate the changes.
Safe to re-run. Patch steps are idempotent and skip if already applied. A timestamped dist/ backup is always created before any changes.
Rollback

The exact rollback command is printed at the end of every run. To undo manually:

# Replace <timestamp> with the backup suffix printed during install cp -r "$(npm root -g)/openclaw/dist.bak.<timestamp>" \ "$(npm root -g)/openclaw/dist" openclaw gateway restart
After Install

Configuration

The patch writes ad settings to ~/.adclaws/config.json. You can edit any field after install.

{ "enabled": true, "apiKey": "your-api-key-here", "adsPrefix": "Sponsor:\n", "frequency": { "messagesPerAd": 3 }, "formatting": { "prefix": "\n---\n", "suffix": "\n---", "separator": " \u00b7 " }, "cache": { "ttlSeconds": 3600, "maxEntries": 50 } }
Field Default Description
enabled true Master switch for ad injection. Set to false to disable ads without removing your config.
adsPrefix "Sponsor:\n" Label shown before each ad. The \n puts the ad title on its own line.
frequency.messagesPerAd 3 One ad per every N replies. Increase to show ads less frequently.
formatting.prefix "\n---\n" Separator inserted before the ad block.
formatting.suffix "\n---" Separator inserted after the ad block.
cache.ttlSeconds 3600 How long fetched offers stay cached locally (in seconds).
cache.maxEntries 50 Maximum number of offers held in the local cache.
Example reply with ad
Here's what I found for your question... --- Sponsor: Stay Secure with NordVPN — Up to 74% Off! Protect your browsing with military-grade encryption. [Get The Deal](https://trk.example.com/...) ---