Skip to content

feat: add OpenClaw agent as third notification consumer 🦞#234

Open
Zeugh-eth wants to merge 1 commit intomainfrom
feat/openclaw-consumer
Open

feat: add OpenClaw agent as third notification consumer 🦞#234
Zeugh-eth wants to merge 1 commit intomainfrom
feat/openclaw-consumer

Conversation

@Zeugh-eth
Copy link
Member

Summary

Add a webhook-based consumer that delivers DAO proposal notifications to an OpenClaw AI agent for automated governance analysis and vote drafting.

How it works

When a new proposal is detected in any monitored DAO, the dispatcher routes it to the openclaw channel (alongside Telegram and Slack). The OpenClaw consumer forwards the notification via authenticated POST to a configured webhook URL, where the receiving AI agent can analyze the proposal and draft voting recommendations.

Logic System → RabbitMQ → Dispatcher → notifications.openclaw.* → OpenClaw Consumer → Webhook POST

Changes

File What
interfaces/openclaw-client.interface.ts New — client contract
clients/openclaw.client.ts New — HTTP webhook client with Bearer auth
services/bot/openclaw-bot.service.ts New — BotServiceInterface implementation
docs/openclaw-consumer.md New — setup guide, payload spec, DB registration
consumers/app.ts Wire OpenClaw as conditional third consumer
consumers/index.ts Instantiate client from env config
consumers/config/env.ts Add OPENCLAW_WEBHOOK_URL + OPENCLAW_API_KEY
dispatcher/app.ts Register openclaw channel in notification factory
docker-compose.yml Pass new env vars to consumers container
example.env Document new optional vars

Design decisions

  • Zero overhead when disabled — no RabbitMQ queue or consumer created unless OPENCLAW_WEBHOOK_URL is set
  • Follows existing patterns — same interface/client/service structure as Telegram and Slack
  • Auth enforced — webhook requires Authorization: Bearer <key> header
  • Notification-only — no interactive bot commands, just structured webhook delivery

Setup after merge

  1. Set OPENCLAW_WEBHOOK_URL and OPENCLAW_API_KEY in consumers env
  2. Register openclaw user via subscription API:
for DAO in AAVE NOUNS GTC OBOL COMP ENS SCR UNI SHU; do
  curl -X POST "$SUBSCRIPTION_SERVER_URL/subscriptions/$DAO" \
    -H "Content-Type: application/json" \
    -d '{"channel":"openclaw","channel_user_id":"cra","is_active":true}'
done
  1. Redeploy consumers service

Full documentation: docs/openclaw-consumer.md

Add a webhook-based consumer that delivers DAO proposal notifications
to an OpenClaw AI agent for automated governance analysis and vote drafting.

## What this does

When a new proposal is detected in any monitored DAO, the system can now
forward it to an OpenClaw agent via authenticated webhook — enabling
AI-powered proposal analysis, vote reasoning, and governance research
as part of the notification pipeline.

## New files

- `interfaces/openclaw-client.interface.ts` — client contract
- `clients/openclaw.client.ts` — HTTP webhook client with Bearer auth
- `services/bot/openclaw-bot.service.ts` — BotServiceInterface impl
- `docs/openclaw-consumer.md` — setup guide, payload spec, DB registration

## Changes

- `consumers/app.ts` — wire OpenClaw as conditional third consumer
- `consumers/index.ts` — instantiate client from env config
- `consumers/config/env.ts` — add OPENCLAW_WEBHOOK_URL + OPENCLAW_API_KEY
- `dispatcher/app.ts` — register 'openclaw' channel in notification factory
- `docker-compose.yml` — pass new env vars to consumers container
- `example.env` — document new optional env vars

## Design decisions

- **Conditional initialization**: no RabbitMQ queue or consumer created
  unless OPENCLAW_WEBHOOK_URL is set. Zero overhead when disabled.
- **Follows existing patterns**: same interface/client/service structure
  as Telegram and Slack consumers.
- **Auth required**: webhook endpoint enforces Bearer token authentication.
- **Notification-only**: no interactive bot commands — just receives and
  forwards structured proposal data via webhook POST.

## Setup required after merge

1. Set OPENCLAW_WEBHOOK_URL and OPENCLAW_API_KEY in consumers env
2. Register openclaw user via subscription API (see docs/openclaw-consumer.md)
3. Redeploy consumers service
@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flow-editor Ready Ready Preview, Comment Mar 20, 2026 7:31pm
notification-system-dashboard Ready Ready Preview, Comment Mar 20, 2026 7:31pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants