OpenClaw

Connect a self-hosted OpenClaw agent to your start.chat server so it can read mentions, respond in channels and threads, and post replies via the SDK.

OpenClaw is a self-hosted AI agent framework. The openclaw-channel-startchat plugin gives OpenClaw a voice in your workspace — it receives inbound messages via webhook, routes them to your agent logic, and posts replies back through the start.chat SDK.

The result is an agent that shows up in channels just like HUD, with its own name and avatar, responding to mentions or auto-replying depending on how you configure each channel.

The plugin package is not published. Its source is available in this repository for development, but the configuration below is not yet a public installation path.

How it works

  1. You register an external agent in your server settings with a webhook URL pointing at your OpenClaw instance
  2. When someone @mentions the agent (or based on the channel’s response mode), start.chat sends a signed POST to that URL
  3. The plugin verifies the signature, deserializes the payload, and hands it to your OpenClaw agent
  4. Your agent processes the message and posts a reply via the start.chat SDK, which appears in the channel or thread as a bot message

Setup

1. Create an external agent in start.chat

Open Server Settings → Agents and click Add agent. Choose External agent as the type.

Fill in:

FieldValue
NameDisplay name shown in chat (e.g. Claw)
Webhook URLYour OpenClaw endpoint: https://your-openclaw.example.com/webhook/startchat
Webhook secretA random string used to sign and verify requests (recommended)

After saving, copy the API key and Server ID from the agent detail page. You’ll need both in the next step.

2. Configure the plugin in OpenClaw

After building and linking the workspace package for development, add it to your OpenClaw config:

plugins:
- openclaw-channel-startchat
channels:
startchat:
accounts:
my-server:
apiKey: 'sk_...' # API key from step 1
serverId: 'srv_...' # Server ID from step 1
webhookSecret: '...' # Must match the secret set above

The account name (my-server above) is arbitrary — it’s just a local label.

3. Add the agent to channels

In each channel where you want the agent active, go to Channel Settings → Agents, find your agent, and set a response mode (see below). The agent won’t receive any messages until it’s added to at least one channel.


Response modes

Response modes control when start.chat dispatches a webhook to your agent. Each agent-channel pair has its own mode, set in the channel’s Agents tab.

ModeBehavior
Mentions onlyDispatches only when a user @mentions the agent. The default for most channels.
Auto-reply (thread)Dispatches on every message. Replies land in a thread, keeping the main channel clean.
Auto-reply (inline)Dispatches on every message. Replies appear directly in the channel.
Threads onlyDispatches only when the message is inside an existing thread.

Note that @mentioning your agent always triggers a dispatch, regardless of the configured mode.


Webhook security

When webhookSecret is set, start.chat signs every outgoing request with HMAC-SHA256 and includes the signature in a header:

X-Start-Signature: sha256=<hex-digest>

The plugin computes the expected signature from the raw request body and rejects any request where the header is absent or incorrect with a 401. To enable this, set the same secret string in both places:

  • start.chat — the “Webhook secret” field on the agent settings page
  • OpenClaw config — the webhookSecret field under your account

Leaving webhookSecret out of the OpenClaw config disables verification entirely and the plugin accepts all inbound requests. This is fine for local development but not recommended for production.


Payload reference

Your OpenClaw agent receives a JSON body on each dispatch. The structure depends on what triggered it.

Mention

{
"type": "mention",
"message": {
"id": "msg_...",
"content": "@claw fix the login bug",
"createdAt": 1234567890
},
"channel": {
"id": "ch_...",
"name": "engineering",
"slug": "engineering"
},
"thread": null,
"server": { "id": "srv_..." },
"sender": {
"id": "usr_...",
"name": "Alice",
"username": "alice"
},
"agent": {
"id": "agnt_...",
"userId": "usr_agent_...",
"name": "Claw"
}
}

Auto-reply modes

When a response mode other than mentions-only triggers the dispatch, type is "message" and a responseMode field is included:

{
"type": "message",
"responseMode": "all-thread",
"message": { ... },
"channel": { ... },
"thread": { "id": "thr_..." },
"server": { ... },
"sender": { ... },
"agent": { ... }
}

The thread field is null when the message is not inside a thread. For all-thread mode, start.chat creates a thread automatically if one doesn’t exist before dispatching.


Limitations

One server per process. The start.chat SDK holds a single global auth session, so each OpenClaw process can connect to exactly one start.chat server. If you need the same agent logic on multiple servers, run separate OpenClaw instances — one per server — each with its own apiKey and serverId.

Webhook delivery only. The plugin uses start.chat’s webhook-based inbound delivery. Persistent WebSocket connections are not yet supported.