99 lines
3.2 KiB
Plaintext
99 lines
3.2 KiB
Plaintext
---
|
|
title: OpenClaw notifier
|
|
description: Deliver notifications through a local OpenClaw gateway — personal, low-latency, private.
|
|
---
|
|
|
|
<div style={{ display: "flex", alignItems: "center", gap: "0.75rem", margin: "0.5rem 0 1.25rem" }}>
|
|
<Logo name="openclaw" size={28} />
|
|
<span style={{ fontSize: "0.8125rem", color: "var(--color-fd-muted-foreground)" }}>Slot: <code>notifier</code> · Name: <code>openclaw</code></span>
|
|
</div>
|
|
|
|
<PlatformSupport macos="full" linux="full" windows="full" />
|
|
|
|
[OpenClaw](https://github.com/composio-dev/openclaw) is a local gateway that routes AO events into whatever personal alert channel you've wired up — phone push, email, a local sound, etc. If it's running on your machine, this notifier uses it.
|
|
|
|
## Setup
|
|
|
|
Run AO's interactive helper:
|
|
|
|
```bash
|
|
ao setup openclaw
|
|
```
|
|
|
|
It will:
|
|
|
|
1. Auto-detect OpenClaw on `localhost` (or prompt for the URL).
|
|
2. Read `hooks.token` from your OpenClaw config.
|
|
3. If the token is missing, show where to add/generate it from the OpenClaw side.
|
|
4. Write only `agent-orchestrator.yaml`; AO does not generate the token or write shell-profile exports.
|
|
5. Let you review and change the URL, OpenClaw config path, or routing preset before saving.
|
|
|
|
Non-interactive variant:
|
|
|
|
```bash
|
|
ao setup openclaw --non-interactive --url http://127.0.0.1:18789/hooks/agent --routing-preset urgent-action
|
|
```
|
|
|
|
Refresh an existing setup or inspect status:
|
|
|
|
```bash
|
|
ao setup openclaw --refresh
|
|
ao setup openclaw --status
|
|
```
|
|
|
|
## Use
|
|
|
|
After setup, your config looks like:
|
|
|
|
```yaml title="agent-orchestrator.yaml"
|
|
notifiers:
|
|
openclaw:
|
|
plugin: openclaw
|
|
url: http://127.0.0.1:18789/hooks/agent
|
|
openclawConfigPath: ~/.openclaw/openclaw.json
|
|
wakeMode: now
|
|
```
|
|
|
|
The OpenClaw config keeps the actual secret:
|
|
|
|
```json title="~/.openclaw/openclaw.json"
|
|
{
|
|
"hooks": {
|
|
"enabled": true,
|
|
"token": "<openclaw-hooks-token>",
|
|
"allowRequestSessionKey": true,
|
|
"allowedSessionKeyPrefixes": ["hook:"]
|
|
}
|
|
}
|
|
```
|
|
|
|
## Config
|
|
|
|
| Key | Default | What it does |
|
|
|---|---|---|
|
|
| `url` | `http://127.0.0.1:18789/hooks/agent` | OpenClaw hook endpoint |
|
|
| `openclawConfigPath` | `~/.openclaw/openclaw.json` | Local OpenClaw config path that contains `hooks.token` |
|
|
| `token` | — | Remote/manual fallback. Avoid for local setups because it stores the secret in AO config |
|
|
| `name` | — | Identifier shown in OpenClaw |
|
|
| `sessionKeyPrefix` | — | Prefix for OpenClaw session keys |
|
|
| `wakeMode` | `next-heartbeat` | `now` = deliver immediately, `next-heartbeat` = batch on next OpenClaw tick |
|
|
| `deliver` | `true` | Disable to record-only without waking the user |
|
|
| `retries` | `3` | Retry count on transient failures |
|
|
| `retryDelayMs` | `1000` | Base retry delay |
|
|
| `healthSummaryPath` | — | Optional local path where OpenClaw writes a summary AO can pick up |
|
|
|
|
## Token precedence
|
|
|
|
Token is read in this order:
|
|
|
|
1. `token` in `agent-orchestrator.yaml` if explicitly configured
|
|
2. `hooks.token` from `openclawConfigPath`
|
|
3. Env var `OPENCLAW_HOOKS_TOKEN` as a legacy fallback
|
|
|
|
`ao setup openclaw --status` probes the OpenClaw gateway and token. To send a
|
|
real AO test notification through the configured notifier, run:
|
|
|
|
```bash
|
|
ao notify test --to openclaw --template basic
|
|
```
|